bkellum Posted October 18, 2007 Share Posted October 18, 2007 (edited) TO SHOW PRODUCT QUANTITY IN PRODUCT DETAIL PAGE (using osc 2.2-MS2, sts 4.5.4) Hello Bill .. before I go any further, I just need to say I don't know how you do this coz you have such a BIG heart to answer so many questions and help so many people! :thumbsup: Thank you. Yes, I know it is an "out of the box" modification. I was hoping someone would tell me how I could modify the code so I can display the quantity in the product detail page. I thought maybe I could define a placeholder (maybe in /includes/modules/sts_inc/sts_user_code.php file?). But I just didn't know how to do that. And obviously there is some sort of variable/placeholder in osc ($products_quantity) from somewhere so that the qty shows in the Product Listing pages, I thought maybe I could caputre that somehow and put it into my (sts) product contents template? If anyone can give me some pointers, that would be like heaven! Thanks, Helena Helena, Here is the code you would be interested in: If you are using the product_info content templates, then this is very simple to do. How to add the Product Quantity to your product detail pages (using content templates): Open your catalog/includes/modules/sts_inc/product_info.php file. Find: $template_pinfo['productname'] = $product_info['products_name']; $template_pinfo['productmodel'] = $product_info['products_model']; Add this line after: $template_pinfo['productquantity'] = $product_info['products_quantity']; It should look like this: $template_pinfo['productname'] = $product_info['products_name']; $template_pinfo['productmodel'] = $product_info['products_model']; $template_pinfo['productquantity'] = $product_info['products_quantity']; Now add the following placeholder anywhere you want in your catalog/includes/sts_templates/template folder/content/product_info.php.html file: $productquantity$ You may have to tweak the above but that should get you in the right direction. Hope it helped, Edited October 18, 2007 by bkellum Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.