jim_d Posted June 26, 2004 Posted June 26, 2004 How can I force product quantities to always be one? I’ve tried the Download Controller and the Drop Down Button in Shopping Cart contributions. I’ve also tried a change I found on this forum that prevents users from changing the number in the quantity column of the shopping cart. However, in all cases, if the user “Adds to Cart” a product that’s already in the cart, the quantity gets incremented. I want the quantities to always be “1” since all I have are downloadable documents. Ideally, each product should have it's own attribute that determines the maximum quantity that can be ordered. I don't need that level of sophistication at this time though. For now, I'd be happy if all products are limited to a quantity of one. Am I overlooking something on this forum or a contribution? Quote
♥ecartz Posted June 26, 2004 Posted June 26, 2004 This has nothing to do with order_total modules, but you just need to change the add_to_cart quantity sections in includes/application_top.php from $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1 to just 1. Hth, Matt Quote Always back up before making changes.
jim_d Posted June 26, 2004 Author Posted June 26, 2004 Thank you. That works great! I had been trying (unsuccessfully) to figure out where (in what file) the increment was taking place. I didn't even look in "application_top.php." That brings me to another question. I gather from other posts in the forum that there is no flowchart for the osCommerce code. But, is there perhaps a description of the function of each file? The only thing that I know about is "tep_database-pr2.2-CVS.pdf," which only gives me insight into database structure, not functionality. Quote
zebraplayer Posted January 3, 2005 Posted January 3, 2005 I tried doing this, but I get the following error. Parse error: parse error, unexpected T_LNUMBER in /mnt/web_i/d25/s09/b01fe479/www/FilmShowcase/nfoscomm/catalog/includes/application_top.php on line 358 What did I do wrong? Thanks in advance. Quote
zebraplayer Posted January 3, 2005 Posted January 3, 2005 Okay, I figured out what I was doing wrong. However, this only stops people from adding more of the same item to their cart if they click the "Add to cart" button in the product description page. If they browse by categories and click the "Buy Now" button or "Add to cart" from the Reviews page, the item still gets added. Where can we modify those two instances? Thanks! -LG Quote
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.
Note: Your post will require moderator approval before it will be visible.