Jump to content
Sign in to follow this  
sw45859

Custom Computer Creator v9 Support

Recommended Posts

can you post the code between lines 80 and 95 in your admin/includes/classes/order.php please

Edited by sw45859

Share this post


Link to post
Share on other sites

Stephen mate!

 

RELAX!

 

Too much time on the bloody computers! Thats the problem!

 

I am gonna go for a Pint now and u should too! Its boxing day and we have spent more time on this then probably with family/friends! So relax mate and we try sort it out later

 

Again thanx for help and support! Nearly close to finishing! Hopefully have it working soon! I am also commenting the changes actually within the files you mention and have reworked the catalog pages so that the form is easier on the eye and fits the standard MS2 layout tables (My columns etc were messing up previously) together with all images!

 

Take it easy mate & MERRY (SLIGHTLY LATE) XMAS TO EVERYBODY!

 

Regards

 

Jiten :lol:

Share this post


Link to post
Share on other sites

Just coz we close to solution here goes:

 

These are lines 69-96 in admin/includes/classes/order.php

 

      $this->billing = array('name' => $order['billing_name'],
                            'company' => $order['billing_company'],
                            'street_address' => $order['billing_street_address'],
                            'suburb' => $order['billing_suburb'],
                            'city' => $order['billing_city'],
                            'postcode' => $order['billing_postcode'],
                            'state' => $order['billing_state'],
                            'country' => $order['billing_country'],
                            'format_id' => $order['billing_address_format_id']);

     $index = 0;
     $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
     while ($orders_products = tep_db_fetch_array($orders_products_query)) {
       $this->products[$index] = array('qty' => $orders_products['products_quantity'],
                                       'name' => $orders_products['products_name'],
                                       'model' => $orders_products['products_model'],
                                       'tax' => $orders_products['products_tax'],
                                       'price' => $orders_products['products_price'],
                                       'final_price' => $orders_products['final_price']);

       $subindex = 0;
       $attributes_query = tep_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int)$order_id . "' and orders_products_id = '" . (int)$orders_products['orders_products_id'] . "'");
       if (tep_db_num_rows($attributes_query)) {
         while ($attributes = tep_db_fetch_array($attributes_query)) {
           $this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'],
                                                                    'value' => $attributes['products_options_values'],
                                                                    'prefix' => $attributes['price_prefix'],
                                                                    'price' => $attributes['options_values_price']);

 

Hope this helps!

 

Regards

 

Jiten

Share this post


Link to post
Share on other sites

i put this in an earlier post:

replace

     $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
    while ($orders_products = tep_db_fetch_array($orders_products_query)) {
      $this->products[$index] = array('qty' => $orders_products['products_quantity'],
                                      'name' => $orders_products['products_name'],
                                      'model' => $orders_products['products_model'],
                                      'tax' => $orders_products['products_tax'],
                                      'price' => $orders_products['products_price'],
                                      'final_price' => $orders_products['final_price']);

with

      $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");
     while ($orders_products = tep_db_fetch_array($orders_products_query)) {
      $description_query = tep_db_query("select products_description as desc_info from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = " . $orders_products['products_id']);
             $description_info = tep_db_fetch_array($description_query);

       $this->products[$index] = array('qty' => $orders_products['products_quantity'],
                                       'name' => $orders_products['products_name'],
	 //CCC 
         'description' => $description_info['desc_info'],
	 //DONE
                                       'model' => $orders_products['products_model'],
                                       'tax' => $orders_products['products_tax'],
                                       'price' => $orders_products['products_price'],
                                       'final_price' => $orders_products['final_price']);

Share this post


Link to post
Share on other sites

Thats great!

 

It's now working! Thanks mate!

 

I kept modifying catalog/includes/classes.order.php

 

Sorry tired eyes!

 

Again thanx!

 

Now I am trying to sort out sessions issues - maybe I should define ccc.php in application_top.php on the catalog side?

 

Regards

 

Jiten

Share this post


Link to post
Share on other sites

the thing i am trying to figure out is that my site doesn't lose the session, do you have your sessions stored in mysql?

Share this post


Link to post
Share on other sites

SHOW OF HANDS:

1. Bring Back Pictures?

2. If So Enable Them By Category Or Product?

 

 

not saying that this last release is completly fixed, but this is one of the next additions if it is wanted.

Share this post


Link to post
Share on other sites

so i will add it and have it able to be disabled by category, like keyboards, monitors, harddrives

Share this post


Link to post
Share on other sites

yeah that will be great!

 

OK Stephen cheers for all your help!

 

Im gonna try and figure out why the session is lost BUT leave that for tomorrow!

 

I am going for my pint!

 

If you can PM me your email address, tomorrow I will email you all the files that I have amended with comments within the files with the changes you proposed and working!

 

Regards,

 

Jiten

Share this post


Link to post
Share on other sites

Stephen:

 

Does the updated readme (in the contrib download) include everything discussed over the past few days? Just wanted to know whether I'd have to go back through all the postings...

 

Thanks,

Jas

Share this post


Link to post
Share on other sites
Admin/Includes/Functions /html_output.php
Around Line 209 Replace: 
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
?function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') {
? ?$selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

? ?if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';

? ?if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) {
? ? ?$selection .= ' CHECKED';
? ?}

? ?$selection .= '>';

? ?return $selection;
?}
?
With: 
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
?function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '', $params = '') {
? ?$selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

? ?if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';
? ?if (tep_not_null($params)) $selection .= $params;

? ?if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) {
? ? ?$selection .= ' CHECKED';
? ?}

? ?$selection .= '>';

? ?return $selection;
?}

Around Line 231 Replace: 
// Output a form radio field
?function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') {
? ?return tep_draw_selection_field($name, 'radio', $value, $checked, $compare);
?}
?
With: 
// Output a form radio field
?function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '', $params = '') {
? ?return tep_draw_selection_field($name, 'radio', $value, $checked, $compare, $params);
?}

that should fix that problem

great, it worked for me to be able to add products

 

Regards John

Share this post


Link to post
Share on other sites

well guys, honestly i don't know what other options anyone could ask for, i have now added:

1.Admin ability to enable/disable pictures per category.

2.Admin ability to enable/disable products per fsb/system type.

3.Admin ability to add/delete/enable/disable fsb speeds.

4.Customer ability to enable/disable pictures per session.

5.Working on the admin ability to add templates to the prebuilt systems.

 

if you can think of anything you would like to see that isn't in this contribution please let me know so i can get it added, i want to make you guys happy with this contribution, and in turn make me happy.

Share this post


Link to post
Share on other sites

Hi Stephen,

 

I'd like to say a big thank you for the great contrib. It's fantastic!!

 

The latest things you are adding are great, too! It would be nice to be able to have the ability to adjust the computer after it's been added to the cart, if the customer clicks on the continue shopping button, for instance. Would this be possible to add to the contrib?

 

Also, I was wondering if there was a specific reason you chose to use the add to cart function, instead of the buy now function. I couldn't get the built system added to the cart using the add to cart, but if I changed it to the buy now function it works.

 

Thanks again,

 

Katrina

Share this post


Link to post
Share on other sites

Hi,

yeh those extra things sound good, when will you have them ready for us. hehehe, i been putting off installing it till you have these extra things finished. When will u release the updated version?

 

but i cant think of anything else really that needs to be added. just about everything has been convered.

 

thanks

 

kristofor


Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Share this post


Link to post
Share on other sites

Stephen:

 

Couple suggestions I'd hope you consider...

 

1 - Allow for individual prices to be hidden. Sometimes, we don't want them to know what we're charging since we charge less for components in a prebuilt system (than individual parts). Sure, they can calculate it manually by going through all the options, but it would be better just to have the final pricing down below. Sidenote: possibly adjust the item name to display a +$x or -$x amount so they know what they add or subtract.

 

2 - Allow for changing individual (admin selectable) components in a pre-built system. We offer pre-built configs, but the customer may want to upgrade the memory or add a DVD+-RW, etc... Allow us (admin) to set what items can be changed, or items that can be added along (i.e. printer, scanner, mouse, keyboard, monitor etc...).

 

Just some thoughts for the future...

 

Jas

Edited by mjpcomp

Share this post


Link to post
Share on other sites

I second the hiding of prices for the individual components. I think they should be hidden by default, but still have the option to turn them on as some people may prefer them to be shown.

Share this post


Link to post
Share on other sites
Stephen:

 

Couple suggestions I'd hope you consider...

 

1 - Allow for individual prices to be hidden. Sometimes, we don't want them to know what we're charging since we charge less for components in a prebuilt system (than individual parts). Sure, they can calculate it manually by going through all the options, but it would be better just to have the final pricing down below. Sidenote: possibly adjust the item name to display a +$x or -$x amount so they know what they add or subtract.

 

2 - Allow for changing individual (admin selectable) components in a pre-built system. We offer pre-built configs, but the customer may want to upgrade the memory or add a DVD+-RW, etc... Allow us (admin) to set what items can be changed, or items that can be added along (i.e. printer, scanner, mouse, keyboard, monitor etc...).

 

Just some thoughts for the future...

 

Jas

for number 1 i will add the ability to either hide or show them from the admin area, as for number 2 if i am reading correctly that is already possible all you have to do is create that category and add the products, then tell that category to only be shown under either prebuilt system.

 

 

 

and on another note, until i see any other suggestions i am going to work up some screenshots to create a tutorial on how to use this thing, if you guys can either pm me or post to the thread what parts you have the most difficulty figuring out how to do so i can make sure i hit those areas very well. thank you for supporting this contribution and a special thanks to unified for his help and support in identifying the errors and things i left out.

Share this post


Link to post
Share on other sites

Hi everyone!

I am new to all this and strugled today all day to make the CCC work.

Apart of changes described so far, I had to add tables that nowhere are mentioned to make it function ?

I wonder if is everything correct or is anything missing?

CREATE TABLE `ccc_prebuilt` (
 `sys` int(11) NOT NULL default '0',
 `description` int(11) NOT NULL default '0'
) TYPE=MyISAM;

 

CREATE TABLE `ccc_prebuilt_templates` (
 `sys` int(11) NOT NULL default '0',
 `template` int(11) NOT NULL default '0'
) TYPE=MyISAM;

 

CREATE TABLE `ccc_products` (
 `products_id` int(11) NOT NULL default '0',
 `products_image` int(11) NOT NULL default '0',
 `products_description` int(11) NOT NULL default '0',
 `products_language` int(11) NOT NULL default '0',
 `products_name` int(11) NOT NULL default '0',
 `products_model` int(11) NOT NULL default '0',
 `products_price` int(11) NOT NULL default '0',
 `intel` int(11) NOT NULL default '0',
 `fsb_100` int(11) NOT NULL default '0',
 `fsb_133` int(11) NOT NULL default '0',
 `fsb_266` int(11) NOT NULL default '0',
 `fsb_333` int(11) NOT NULL default '0',
 `fsb_400` int(11) NOT NULL default '0',
 `fsb_533` int(11) NOT NULL default '0',
 `fsb_800` int(11) NOT NULL default '0',
 `fsb_111` int(11) NOT NULL default '0',
 `fsb_222` int(11) NOT NULL default '0',
 `amd` int(11) NOT NULL default '0',
 `cat_id` int(11) NOT NULL default '0'
) TYPE=MyISAM;

 

CREATE TABLE `ccc_temp_products` (
 `products_id` int(11) default NULL
) TYPE=MyISAM;

 

In the rest - is a great contribution, that has to be improved by combined efforts - well done so far!

When is the next release going to appear?

Share this post


Link to post
Share on other sites

Hi Vadim

 

I think there were some tables missing in the zipped version of the readme.html file.

 

I do not have the exact table sql files that stephen originally supplied - I forgot to save them!

 

There is a link for an uptodate readme on one of these pages somewhere that has the full SQL.

 

If not I am gonna add a working version of CCC with MS2 and michelles VAT contrib in the contributions section once I get consents from relevant people.

 

If you want I can try and extract the SQL tables from the database?

 

REgards

 

Jiten

Share this post


Link to post
Share on other sites

Hi Jiten,

Thanks for help! The link to updated readme is not working - dont know why. And if is not a big problem for you please send me the working version please! I need it to launch the new site as soon as possible. :rolleyes:

my email is admin@vadim.co.uk

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×