KingOfMyCastle Posted July 1, 2007 Share Posted July 1, 2007 Hi, thanks to the help from this board I have now added a 'quantity' ordered field to the product_info.php page. This is updating the shopping cart as required but it isn't updating the product_info.php page when you go back to it again. The code I've added to create the input field is: <input type="text" name="cart_quantity" value="1" maxlength="2" size="2"> Because value is hardcoded to '1' every time you go to this product page it shows that you have only ordered 1 product. On the shopping cart page itself it shows the correct quantity. What I want to do is insert the current order quantity into the form like so: <input type="text" name="cart_quantity" value="<?php echo $current_quantity; ?>" maxlength="2" size="2"> I was hoping something like this would work but it doesn't. I've looked at the code used on the shopping cart page and it uses an array to store information about attributes for each product. But I've had no luck trying to use any of that code to display the quantity ordered on the single product info page. Does anybody know how to make it appear? Thanks in advance. Link to comment Share on other sites More sharing options...
web-project Posted July 2, 2007 Share Posted July 2, 2007 Read the following topics: http://www.oscommerce.info/kb/osCommerce/G..._and_Tricks/246 and http://www.oscommerce.com/forums/index.php?sho...p;#entry1088640 Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you. Link to comment Share on other sites More sharing options...
KingOfMyCastle Posted July 6, 2007 Author Share Posted July 6, 2007 Thanks for the reply but I don't think that was what I was looking for. I was looking for a way to display the 'current order item quantity number' on the product info page. The solution you sent me to allows you to add a quantity box but not display the number of units of that item the customer has already put in the shopping basket. Any ideas? Link to comment Share on other sites More sharing options...
tigergirl Posted July 6, 2007 Share Posted July 6, 2007 The solution you sent me to allows you to add a quantity box but not display the number of units of that item the customer has already put in the shopping basket. Any ideas? Isn't that shown on the shopping cart info box? It does on mine displayed on the top right corner of the screen - 1 x product A, 5 x product B etc Tiger I'm feeling lucky today......maybe someone will answer my post! I do try and answer a simple post when I can just to give something back. ------------------------------------------------ PM me? - I'm not for hire Link to comment Share on other sites More sharing options...
KingOfMyCastle Posted July 6, 2007 Author Share Posted July 6, 2007 Isn't that shown on the shopping cart info box? It does on mine displayed on the top right corner of the screen - 1 x product A, 5 x product B etc Tiger Yeah, it shows up there. I just wanted it on the product info itself. The logic would be: IF none ordered already THEN put '1' in quantity box ELSE put quantity already ordered value into box. Link to comment Share on other sites More sharing options...
Silverado05 Posted July 6, 2007 Share Posted July 6, 2007 This would only show up on product info pages that the customer as currently added to the shopping cart already right? If the customer doesn't have that item in the cart it would just say 1 right? Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
KingOfMyCastle Posted July 6, 2007 Author Share Posted July 6, 2007 This would only show up on product info pages that the customer as currently added to the shopping cart already right? If the customer doesn't have that item in the cart it would just say 1 right? Yes. If the customer hasn't added any so far then the standard '1' should appear. Otherwise the number already added to the cart should appear. Could it be done? Easily? ;) Link to comment Share on other sites More sharing options...
Silverado05 Posted July 12, 2007 Share Posted July 12, 2007 After noticing my qty boxes go back to one when you add say 5 to the cart. It should echo the qty in the box. I know exatcly what you are talking about know and I would also be interested in this as well. Anyone know how to display the current qty in the qty box after it is added to the cart. Currently after you add more then one it just reverts back to one instead of the amount you have added. Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.