knrit Posted October 29, 2008 Posted October 29, 2008 Hi all ... I'm hoping somebody can tell me how to get this done ... My client wants a portion of the product description information from the product page to display when the customer views their cart. There is currently only 1 product they are selling, but there is also a potential for more products to be added in the future, so I need something dynamic, not necessarily hard coded for this particular product. I searched all these forums and couldn't find anything related (maybe I missed it) and I see nowhere in the admin section of OSC to enable or disable this function (using the latest release) Is there a way to get this done? Right now all that shows in the cart when you view it is the title of the product and my client wants more than that, but not necessarily the entire product description (which includes an addition picture file coded into the html for the description), although they do want the additional picture to show if possible. So I'm not sure if this can be modified in the existing php files, and if so which one(s), or if I need to write a procedure to call another (new) file and put it in the includes somewhere. I would appreciate any assistance anyone can provide on this ... this is my first OSC site and this is the only thing I can't figure out how to do efficiently and dynamically... Thanks Lou KNR IT Solutions Delivering your business to the world!
ianric Posted October 29, 2008 Posted October 29, 2008 Hi all ... I'm hoping somebody can tell me how to get this done ... My client wants a portion of the product description information from the product page to display when the customer views their cart. There is currently only 1 product they are selling, but there is also a potential for more products to be added in the future, so I need something dynamic, not necessarily hard coded for this particular product. I searched all these forums and couldn't find anything related (maybe I missed it) and I see nowhere in the admin section of OSC to enable or disable this function (using the latest release) Is there a way to get this done? Right now all that shows in the cart when you view it is the title of the product and my client wants more than that, but not necessarily the entire product description (which includes an addition picture file coded into the html for the description), although they do want the additional picture to show if possible. So I'm not sure if this can be modified in the existing php files, and if so which one(s), or if I need to write a procedure to call another (new) file and put it in the includes somewhere. I would appreciate any assistance anyone can provide on this ... this is my first OSC site and this is the only thing I can't figure out how to do efficiently and dynamically... Thanks Lou Hi Lou There's a function called get_products in the file /catalog/includes/classes/shopping_cart.php. You need to modify the SQL. This is mine (I've added a stack of xtra fields to the database) $products_query = tep_db_query("select p.products_date_added, p.products_id, pd.products_name, p.products_image, p.products_title, p.products_model, p.products_category, p.products_label, p.products_catno, p.products_media, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); Then in catalog/shopping_cart I've added a few xtra headings, eg $info_box_contents[0][] = array('align' => 'left', 'params' => 'height="20" class="productListing-heading"', 'text' => ' Cat No'); $info_box_contents[0][] = array('align' => 'center', 'params' => 'height="20" class="productListing-heading"', 'text' => 'Format'); Then further down, just before if (STOCK_CHECK == 'true') { I have $products_name = tep_draw_hidden_field('cart_quantity[]', $products[$i]['quantity']) . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . '1 of: ' . ' <a style= "text-decoration: underline;" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . $products[$i]['name'] . ' - ' . $products[$i]['title'] . '</a>'; then similar further down to show price Check it out at My Website. Just add anything to the cart. I hope this is what you're looking for, maybe someone more knowledgeable will be able to do it easier Cheers Ian
knrit Posted October 29, 2008 Author Posted October 29, 2008 I hope this is what you're looking for, maybe someone more knowledgeable will be able to do it easier Cheers Ian Thank you Ian .. I will take a look at the code ... I did take a look at your site and that's similar to what they want but they want even a little more than that LOL ... I appreciate your assistance and I'll let you know how it works out ... at least I have an idea now what files to go after :) Thanks! Lou KNR IT Solutions Delivering your business to the world!
knrit Posted October 31, 2008 Author Posted October 31, 2008 Ian .. I wanted to thank you for your help .. that wasn't exactly what I wanted but I got what I needed .. it's hard coded at this time because there's only one product in there, but it'll work for now .. :rolleyes: At least now when I'm ready to go back and hit the SQL again I know where to start and what needs to be done ... LOL .. so I appreciate it! If you want to take a look ... http://multiplestreamsofinspiration.com ... just go to order at the top and then add the product to your cart and see what they were looking for ... Thanks again! Lou KNR IT Solutions Delivering your business to the world!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.