sw45859 Posted December 24, 2003 Share Posted December 24, 2003 i was told to move over to a new thread so i have done that, anyone who needs help with ccc9 please post here. Quote Link to comment Share on other sites More sharing options...
John Doswell Posted December 24, 2003 Share Posted December 24, 2003 hi there, i am trying to implement the construbution to my osc but when i go to admin/ccc_add.php i can chose a product to add (radio button), but it will not refresh and it does not show up a update button, how do i add products to the database? looking on your site it is also not possible to add products to database. Please help!!! Merry x-mas John Quote Link to comment Share on other sites More sharing options...
Guest Posted December 24, 2003 Share Posted December 24, 2003 Im getting an error of no admin/table_template.php and I searched the files there is not one what should I do??? BTW this is in CCC Version 9 Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 24, 2003 Author Share Posted December 24, 2003 on adding the products to the database, when you click the radio button the side menu refreshes showing that the product has been added to the queue, the click on queued products in the ccc side menu and that will show you the screen for choosing where the product is allowed, i will be creating a tutorial with screenshots after the holidays to help along with the process of learning to use the creator. Quote Link to comment Share on other sites More sharing options...
John Doswell Posted December 24, 2003 Share Posted December 24, 2003 if i click the radio button the page does not refresh and does not add the product to the database. i checked the database tables and its all there. also i get a error on the catalog side AMD & INTEL Prebuilt System Warning: main() [function.main]: Unable to access admin/table_template1.php in /localhost/www/htdocs/newshop/build.php on line 73 Warning: main(admin/table_template1.php) [function.main]: failed to create stream: No such file or directory in /localhost/www/htdocs/newshop/build.php on line 73 Warning: main() [function.main]: Failed opening 'admin/table_template1.php' for inclusion (include_path='') in /localhost/www/htdocs/newshop/build.php on line 73 Merry X-Mas John Quote Link to comment Share on other sites More sharing options...
Guest Posted December 24, 2003 Share Posted December 24, 2003 (edited) From my previous post on that other thread I noticed something strange in the admin part where you have to add products. The 'onclick=submit()' part on line 209 in ccc_add.php does not show up when I browse to the category making it impossible to add products. Is this just me or has anyone else experienced this behaviour as well? I also noticed that this works fine in stephen's shop, so I'm not sure if this was something ommited from the contribution. Stephen, that's exactly what I'm talking about, I mean what folks above are experiencing as well - The refresh of the page when a products check box is clicked on. For some reason the onclick=submit() part that I mentioned above does not show up... Any ideas? (The only diff. with my php setup is that I receive no errors) Edited December 24, 2003 by jessicasy Quote Link to comment Share on other sites More sharing options...
Kristofor Posted December 24, 2003 Share Posted December 24, 2003 hey, im bout to install it, i wonder if im gonna get this problem aswell, 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...
Guest Posted December 25, 2003 Share Posted December 25, 2003 hey, im bout to install it, i wonder if im gonna get this problem aswell, All I can say is that I tried it on a few different TEP versions MS1, CVS and MS2 and get the same issue on all of them - But, I guess if you really wanted to confirm that, try it out and report back to us here :) --jess Quote Link to comment Share on other sites More sharing options...
Guest Posted December 25, 2003 Share Posted December 25, 2003 Anyone know what is supposed to be contained in ccc_temp_products (size, etc), as this table is called however it is not in the sql statement when installing. Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 25, 2003 Author Share Posted December 25, 2003 Anyone know what is supposed to be contained in ccc_temp_products (size, etc), as this table is called however it is not in the sql statement when installing. that table for the most part will constantly stay empty, it is for the queued products in the admin area Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 25, 2003 Author Share Posted December 25, 2003 (edited) sorry i just read the error message, i will post code shortly. Edited December 25, 2003 by sw45859 Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 25, 2003 Author Share Posted December 25, 2003 ok for the table_template problem, in build.php on line 73 replace that line with. include('/table_template'.$template['template'].'.php');?></td> Quote Link to comment Share on other sites More sharing options...
Guest Posted December 25, 2003 Share Posted December 25, 2003 So this is just an empty table then? or are there values for the fields? Quote Link to comment Share on other sites More sharing options...
Guest Posted December 25, 2003 Share Posted December 25, 2003 (edited) Hello Stephen I tried the code above to resolve the error - but it did not work - So i just copied the template files from the catalog directory into the admin directory and it works fine now. One problem that I cannot sort out is with the listing of the components in checkout_confirmation.php , shopping_cart.php , account_history_info.php etc All I get is the title "Custom Computer" without the list of components that have been selected. Any ideas why this may be happening? I have tried to fiddle with the following line but do not know what to do as I do not know where the names of the components are being called from: ... $order->products[$i]['name'] . '<small><i>' . $order->products[$i]['description'] . '</small></i>' This is a major problem as I will not know what the customers have ordered - Nor they! Cheers mate! Regards, Jiten Edited December 25, 2003 by Unified Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 sorry guys, i hope you understand that with the size of this contribution i keep missing stuff i have forgotten that i edited, with that said, in catalog/includes/classes/order.php line 104 you should see: $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)) { $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], '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']); replace it 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)) { //CCC $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); //DONE $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], '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...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 So this is just an empty table then? or are there values for the fields? that table is empty yes, no values are supposed to be in it until you queue a product for database entry. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 26, 2003 Share Posted December 26, 2003 Hello Stephen, I just tried the changes that you have made. Unfortunately nothing has changed. The listing of components is still not appearing in checkout_confirmation.php , shopping_cart.php , account_history_info.php etc. The same problem still persists - all you see is "Custom Computer" . I tried to rearrange the your code snippet by putting the "$description_query" before the "while" statement and that had no effect either. Am I the only person with this error? All your instructions have been followed correctly? Again thank you for your hard work Regards Jiten Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 (edited) do you have a page set up that i can look at, or some code from those files, specifically the areas i said to edit. and the query does have to be in the while statement or it will not pick up all products listed Edited December 26, 2003 by sw45859 Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 also look in your database under the table products_description and see if the very last product has the description there. Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 dangit, i forgot another area in the order.php, around line 223 replace: $this->products[$index] = array('qty' => $products[$i]['quantity'], 'name' => $products[$i]['name'], 'model' => $products[$i]['model'], 'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'price' => $products[$i]['price'], 'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), 'weight' => $products[$i]['weight'], 'id' => $products[$i]['id']); with $this->products[$index] = array('qty' => $products[$i]['quantity'], 'name' => $products[$i]['name'], 'model' => $products[$i]['model'], //CCC 'description' => $products[$i]['description'], //DONE 'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'price' => $products[$i]['price'], 'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), 'weight' => $products[$i]['weight'], 'id' => $products[$i]['id']); sorry Quote Link to comment Share on other sites More sharing options...
Guest Posted December 26, 2003 Share Posted December 26, 2003 Hi Stephen Here is the snippet of code from my catalog/includes/classes/order.php file: $index = 0; // BEGIN - Product Serial Numbers $orders_products_query = tep_db_query("select orders_products_id, products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price, products_serial_number from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'"); // END - Product Serial Numbers while ($orders_products = tep_db_fetch_array($orders_products_query)) { //BOF CCC $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); //EOF CCC $this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], //BOF CCC 'description' => $description_info['desc_info'], //EOF CCC 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], // BEGIN - Product Serial Numbers 'serial_number' => $orders_products['products_serial_number'], // END - Product Serial Numbers 'final_price' => $orders_products['final_price']); $subindex = 0; Note that I am using serial numbers contribution - but that shouldn't be causing any problems Here is my code snippet from catalog/shopping_cart.php $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'], false,'onFocus="advisecustomer();"')); /* $products_name = '<table border="0" cellspacing="2" cellpadding="2">' . ' <tr>' . ' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . ' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>'; */ // BOF CCC nb replaces above if ($products[$i]['name'] == "Custom Computer"){ $products_name = '<table border="0" cellspacing="2" cellpadding="2">' . ' <tr>' . ' <td class="productListing-data" align="center">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</td>' . ' <td class="productListing-data" valign="top"><b>' . $products[$i]['name'] . '</b>' . '<br><small><i>' . $products[$i]['description'] . '</small></i>'; }else{ $products_name = '<table border="0" cellspacing="2" cellpadding="2">' . ' <tr>' . ' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . ' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>'; } // EOF CCC if (STOCK_CHECK == 'true') { I am using the Options type feature contribution by Chandra - changes to shopping_cart.php, orders.php etc were also made - may this be causing any problems? Thank you Jiten Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 (edited) try that other code i just posted and see if it makes it work. good thing i am keeping this on record, i am tired of going through this every time i release a contribution i forget to put all the edits in, i will be posting the edited readme file whem i get a few of you guys worked out so i can hopefully get all the edits included. 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 I inserted the other change and still nothing. Can you expand on the database information. I do have descriptions for the products but they have html in it - will this cause any problems? Also I am using header tags controller by Linda McGrath and this has altered the products_description table Also another prob noted - I am losing my sessions. If i have products in my cart and then I goto ccc.php the select a FSB speed, I lose my session - If i am logged in i also get logged out? Regards Jiten Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 as far as the sessions, i have to add them, i didn't think about the sessions but it is a problem that will be fixed, and for the products description table, as long as the prodcut_id matches with the product_id under the products table it should pull it up, let me look and see if there are any other changes i may have missed. Quote Link to comment Share on other sites More sharing options...
sw45859 Posted December 26, 2003 Author Share Posted December 26, 2003 OOOOOOOKKK, heres another one i forgot, in catalog/includes/classes/shopping_cart.php around line 281 replace: $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], 'weight' => $products['products_weight'], 'final_price' => ($products_price + $this->attributes_price($products_id)), 'tax_class_id' => $products['products_tax_class_id'], 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : '')); with $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'image' => $products['products_image'], //CUSTOM COMPUTER 'description' => $products['products_description'], //DONE 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], 'weight' => $products['products_weight'], 'final_price' => ($products_price + $this->attributes_price($products_id)), 'tax_class_id' => $products['products_tax_class_id'], 'attributes' => (isset($this->contents[$products_id]['attributes']) ? $this->contents[$products_id]['attributes'] : '')); that is updated in the new readme as well, now. 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.