sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 (edited) can you post the code between lines 80 and 95 in your admin/includes/classes/order.php please Edited December 26, 2003 by sw45859 Quote Link to comment Share on other sites More sharing options...
Guest Posted December 26, 2003 Share Posted December 26, 2003 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: Quote Link to comment Share on other sites More sharing options...
Guest Posted December 26, 2003 Share Posted December 26, 2003 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 Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 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']); Quote Link to comment Share on other sites More sharing options...
Guest Posted December 26, 2003 Share Posted December 26, 2003 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 Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 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? Quote Link to comment Share on other sites More sharing options...
Guest Posted December 26, 2003 Share Posted December 26, 2003 Yes... my sessions are stored in the database Also, on my local machine I do not have ssl Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 26, 2003 Share Posted December 26, 2003 Maybe just for external components such as the Case/keyboard/speakers etc? Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 so i will add it and have it able to be disabled by category, like keyboards, monitors, harddrives Quote Link to comment Share on other sites More sharing options...
Guest Posted December 26, 2003 Share Posted December 26, 2003 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 Quote Link to comment Share on other sites More sharing options...
mjpcomp Posted December 27, 2003 Share Posted December 27, 2003 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 Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 27, 2003 Author Share Posted December 27, 2003 no it doesn't i have a new readme with everything that is current, i will post it now. Quote Link to comment Share on other sites More sharing options...
John Doswell Posted December 27, 2003 Share Posted December 27, 2003 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 Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 27, 2003 Author Share Posted December 27, 2003 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 27, 2003 Share Posted December 27, 2003 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 Quote Link to comment Share on other sites More sharing options...
Kristofor Posted December 27, 2003 Share Posted December 27, 2003 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 Quote Don't die with the music in you!!! Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere... Link to comment Share on other sites More sharing options...
mjpcomp Posted December 28, 2003 Share Posted December 28, 2003 (edited) 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 December 28, 2003 by mjpcomp Quote Link to comment Share on other sites More sharing options...
Guest Posted December 28, 2003 Share Posted December 28, 2003 Thanx Stephen for hard work! Looking forward to new features! Regards Jiten Quote Link to comment Share on other sites More sharing options...
Zickarena Posted December 28, 2003 Share Posted December 28, 2003 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. Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 28, 2003 Author Share Posted December 28, 2003 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. Quote Link to comment Share on other sites More sharing options...
vadim Posted December 28, 2003 Share Posted December 28, 2003 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? Quote Link to comment Share on other sites More sharing options...
Guest Posted December 28, 2003 Share Posted December 28, 2003 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 Quote Link to comment Share on other sites More sharing options...
vadim Posted December 28, 2003 Share Posted December 28, 2003 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted December 29, 2003 Share Posted December 29, 2003 i could use the working version also, joligario@recoverdata.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.