[FLAW] Add to Cart Min Qty Not Working
38 posts
• Page 1 of 2 • 1, 2
[FLAW] Add to Cart Min Qty Not Working
I have set many of my products to have minimum quantities to order. If a customer goes to the product page they will see the minimum quantity. If the button "Add to Cart" is selected then the minimum is added to the shopping cart.
The problem occurs when the customer is on the list products page and clicks the "add to cart" button the minimum quantity rules are not obeyed. A quantity of 1 is entered for the shopping cart.
Is this a bug or do I need to change something?
OC v1.5.3.1
The problem occurs when the customer is on the list products page and clicks the "add to cart" button the minimum quantity rules are not obeyed. A quantity of 1 is entered for the shopping cart.
Is this a bug or do I need to change something?
OC v1.5.3.1
Last edited by avvici -arvixe- on Thu Jul 26, 2012 10:33 am, edited 2 times in total.
Reason: Moved, title adjusted
Reason: Moved, title adjusted
- raymanj
- Posts: 27
- Joined: Thu May 13, 2010 1:33 am
Re: Add to Cart Min Qty Not Working
Wow, good find. This truly is a flaw....and needs rectifying. I will work up a vQmod to fix it for the time being. Will be ready by tomorrow. I'll pass this along.
-

avvici -arvixe- - Posts: 4408
- Joined: Tue Apr 05, 2011 4:09 am
- Location: Charlotte, NC
Re: Add to Cart Min Qty Not Working
there is a big red notice when you get to the cart page!
OpenCart®
Project Owner & Developer.
OpenCart commercial support now available!
Project Owner & Developer.
OpenCart commercial support now available!
-

Daniel - Administrator
- Posts: 5185
- Joined: Fri Nov 03, 2006 10:57 am
Re: Add to Cart Min Qty Not Working
With all due respect Daniel, we all know about that notice. That notice is a little late in the game. Why force the actual minimum number in the quantity box on product details page but not force a minimum on category listing page? Both have Add To Cart buttons. Both need to function the same. Your current solution allows people to add a gazillion items to their ajax cart with wrong quantities "which is actually 1" only to find out later? They might get lucky enough to be redirected to the product details page because the item has REQUIRED OPTIONS but why count on that?
There is already a redirect in the add() function within the checkout control. Why not add a check if > 1 for minimum? That way it will take them to product details page where they need to be and the item won't be added to the ajax cart.
It's counter intuitive at the least....at the most it's a waste of customers time. These are just my thoughts. Not asking you to reinvent the wheel:)
There is already a redirect in the add() function within the checkout control. Why not add a check if > 1 for minimum? That way it will take them to product details page where they need to be and the item won't be added to the ajax cart.
It's counter intuitive at the least....at the most it's a waste of customers time. These are just my thoughts. Not asking you to reinvent the wheel:)
-

avvici -arvixe- - Posts: 4408
- Joined: Tue Apr 05, 2011 4:09 am
- Location: Charlotte, NC
Re: Add to Cart Min Qty Not Working
I imagine the check could be made easily in checkout/cart/update to add the minimum if there's not enough, or return a json error if it's below minimum stating that the minimum is X and to add via the product page

Better Product SEO URL's - Perfectly structured product links
Better Category SEO URL's - Give subcategories the same SEO keyword
SEO URL's Route Editor - Fix all of your index.php links

-

JAY6390 - Posts: 4639
- Joined: Wed May 26, 2010 3:47 pm
- Location: United Kingdom
Re: Add to Cart Min Qty Not Working
Throwing it on-page like with JSON option errors would probably be best.
-Ryan
VQMod Manager: FREE extension to fully manage your VQMods from Admin!
Admin Enhancement Suite: Powerful Admin features and enhancements
Dependent Options: Option values displayed based on customer input
Catalog Mode: Disable "Add to Cart" and display your store in view-only
Unofficial OpenCart Wiki | Commercial Support and Development
VQMod Manager: FREE extension to fully manage your VQMods from Admin!
Admin Enhancement Suite: Powerful Admin features and enhancements
Dependent Options: Option values displayed based on customer input
Catalog Mode: Disable "Add to Cart" and display your store in view-only
Unofficial OpenCart Wiki | Commercial Support and Development
-

rph - Posts: 2831
- Joined: Thu Jan 07, 2010 9:05 pm
- Location: Lincoln, Nebraska
Re: Add to Cart Min Qty Not Working
Daniel wrote:there is a big red notice when you get to the cart page!
Could be, but why have a minimum amount on the product page but you can ignore that when ordering it from the product list?
If it is not considered a bug at least classify it as a (big) flaw.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9854
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: Add to Cart Min Qty Not Working
Daniel wrote:there is a big red notice when you get to the cart page!
Oh, dear, the big red notice is too late in the buying cycle. Where the merchant should be clinching the sale, instead customers will have dissonance when they have to fix their quantities. This will cause customers to not trust the store and abandon their cart. Other customers who are in a hurry and don't read the notice will purchase the wrong quantities, then the merchants will be re-shipping the correct quantity at their own expense.
OpenCart really is better than this.
Merry
Most answers are from my OpenCart 1.5 User Manual UPDATED TO 1.5.5.1 and includes free updates.
FREE HELP! 60-page user guide with OpenCart Admin Menu Cheatsheet, Install Guide & 30 Minute QuickStart Guide: http://oscmanuals.com/opencart
FREE HELP! 60-page user guide with OpenCart Admin Menu Cheatsheet, Install Guide & 30 Minute QuickStart Guide: http://oscmanuals.com/opencart
-

merry - Posts: 465
- Joined: Wed Dec 08, 2010 4:51 pm
- Location: Mexico and sometimes Texas
Re: Add to Cart Min Qty Not Working
avvici wrote:There is already a redirect in the add() function within the checkout control. Why not add a check if > 1 for minimum? That way it will take them to product details page where they need to be and the item won't be added to the ajax cart.
I think that would be a great ideea, just like when it has options. Would also be cool if when out of stock redirects to product page because even tho the product is out of stock, on product page you would see the actual status (2-3 days, pre-order etc) and that might help the customer decide if he should buy the products at that time.
-

florinsith - Posts: 2747
- Joined: Thu May 13, 2010 6:36 pm
Re: Add to Cart Min Qty Not Working
florinsith wrote:avvici wrote:There is already a redirect in the add() function within the checkout control. Why not add a check if > 1 for minimum? That way it will take them to product details page where they need to be and the item won't be added to the ajax cart.
I think that would be a great idea, just like when it has options. Would also be cool if when out of stock redirects to product page because even tho the product is out of stock, on product page you would see the actual status (2-3 days, pre-order etc) and that might help the customer decide if he should buy the products at that time.
Elegant.
Merry
Most answers are from my OpenCart 1.5 User Manual UPDATED TO 1.5.5.1 and includes free updates.
FREE HELP! 60-page user guide with OpenCart Admin Menu Cheatsheet, Install Guide & 30 Minute QuickStart Guide: http://oscmanuals.com/opencart
FREE HELP! 60-page user guide with OpenCart Admin Menu Cheatsheet, Install Guide & 30 Minute QuickStart Guide: http://oscmanuals.com/opencart
-

merry - Posts: 465
- Joined: Wed Dec 08, 2010 4:51 pm
- Location: Mexico and sometimes Texas
Re: Add to Cart Min Qty Not Working
Another solution would be to just automatically add the minimum to the $quantity variable depending upon if min quantity check returns true and > 1. This way ajax cart adds an accurate number to the cart and no redirect takes place. Problem with this is that there is no notice of this happening. Customer thinks they are adding one...when it may be 6.
Something simple like this:
Something simple like this:
- Code: Select all
if($product_info['minimum']){
if($product_info['minimum'] > 1){
$quantity = $product_info['minimum'];
}
}
if (!$json) {
$this->cart->add($this->request->post['product_id'], $quantity, $option);
-

avvici -arvixe- - Posts: 4408
- Joined: Tue Apr 05, 2011 4:09 am
- Location: Charlotte, NC
Re: Add to Cart Min Qty Not Working
i2Paq wrote:Daniel wrote:there is a big red notice when you get to the cart page!
Could be, but why have a minimum amount on the product page but you can ignore that when ordering it from the product list?
If it is not considered a bug at least classify it as a (big) flaw.
This is one of the first fixes I did when I downloaded 1.5.3.1. My shop has many min quantities and it wasn't going over well. Thanks for looking in to it.
- samolesong76
- Posts: 21
- Joined: Sat Apr 21, 2012 4:39 pm
Re: Add to Cart Min Qty Not Working
avvici wrote:Another solution would be to just automatically add the minimum to the $quantity variable depending upon if min quantity check returns true and > 1. This way ajax cart adds an accurate number to the cart and no redirect takes place. Problem with this is that there is no notice of this happening. Customer things they are adding one...when it may be 6.
Something simple like this:
- Code: Select all
if($product_info['minimum']){
if($product_info['minimum'] > 1){
$quantity = $product_info['minimum'];
}
}
if (!$json) {
$this->cart->add($this->request->post['product_id'], $quantity, $option);
That is THE best solution, and maybe there should be a small notice that this product has a minimum ordering amount and that it has been automatically adjusted.
Like there is now the information bar telling the customer there is a minimum ordering amount.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9854
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: [FLAW] Add to Cart Min Qty Not Working
i don't think you have fully thought this out.
1st. the minimum order quantity is the default quantity in the quantity field on the product page next the add to cart button. a customer has to change this quantity him self and will see the minimum amount notice on the product page.
2nd. how do you know how many a customer is going to buy? the products may have options where they decide to buy 10 green 5 red etc..
the red banner is in the right place.
1st. the minimum order quantity is the default quantity in the quantity field on the product page next the add to cart button. a customer has to change this quantity him self and will see the minimum amount notice on the product page.
2nd. how do you know how many a customer is going to buy? the products may have options where they decide to buy 10 green 5 red etc..
the red banner is in the right place.
OpenCart®
Project Owner & Developer.
OpenCart commercial support now available!
Project Owner & Developer.
OpenCart commercial support now available!
-

Daniel - Administrator
- Posts: 5185
- Joined: Fri Nov 03, 2006 10:57 am
Re: [FLAW] Add to Cart Min Qty Not Working
Daniel wrote:i don't think you have fully thought this out.
1st. the minimum order quantity is the default quantity in the quantity field on the product page next the add to cart button. a customer has to change this quantity him self and will see the minimum amount notice on the product page.
2nd. how do you know how many a customer is going to buy? the products may have options where they decide to buy 10 green 5 red etc..
the red banner is in the right place.
When ordering from the product list you get a green bar telling you the product has been added to your Cart.
If someone continues to shop and add more product he / she will only see that red bar when checking out.
I find this confusing looking from a customer perspective.
Maybe instead of adding it to the Cart it should redirect you to the product-page it self like when a product has options.
Second there could be the red bar telling the customer that he / she needs to order the minimum amount.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9854
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: [FLAW] Add to Cart Min Qty Not Working
Daniel wrote:i don't think you have fully thought this out.
1st. the minimum order quantity is the default quantity in the quantity field on the product page next the add to cart button. a customer has to change this quantity him self and will see the minimum amount notice on the product page.
2nd. how do you know how many a customer is going to buy? the products may have options where they decide to buy 10 green 5 red etc..
the red banner is in the right place.
Yes, the red banner is in the correct place and serves its purpose in the main shopping cart page.
Let me simplify things:
If I go to target to purchase 10 items all of which have a minimum quantity of 10 it's like taking 2 hours to shop only for a checkout clerk (after standing in the checkout line for 20 minutes) to tell you that there is a minimum quantity. The checkout clerk == your red banner on the cart page.
Customers shopping at Target need a notice about the minimum quantity at the time they take it off the shelf otherwise they'd be wasting their time.
Obviously this doesn't matter for product.tpl add to cart. Only for category.tpl add to cart
-

avvici -arvixe- - Posts: 4408
- Joined: Tue Apr 05, 2011 4:09 am
- Location: Charlotte, NC
Re: [FLAW] Add to Cart Min Qty Not Working
again! the default quantity is the minimum order quantity with a minimum notice next to the field. the customer knows the quantity before they change it. so they know before waiting in the queue. you seem to be arguing rather then just saying yes your right. instead to check the add to cart from the categories page.
OpenCart®
Project Owner & Developer.
OpenCart commercial support now available!
Project Owner & Developer.
OpenCart commercial support now available!
-

Daniel - Administrator
- Posts: 5185
- Joined: Fri Nov 03, 2006 10:57 am
Re: [FLAW] Add to Cart Min Qty Not Working
Daniel wrote:again! the default quantity is the minimum order quantity with a minimum notice next to the field. the customer knows the quantity before they change it. so they know before waiting in the queue. you seem to be arguing rather then just saying yes your right. instead to check the add to cart from the categories page.
First, No one is arguing.
Second, you do realize we are talking about category.tpl? This isn't about product.tpl. You can't even change the quantity on category.tpl. There is only an add to cart button which defaults to a quantity of one when adding. This was the ENTIRE problem to begin with. If there was no AJAX cart it wouldn't matter but the fact of the matter is that there is which allows one to peruse a bunch of category pages adding tons of items to cart all of which have a minimum quantity unknowingly to them. If you can't see that then so be it. No harm no foul.
-

avvici -arvixe- - Posts: 4408
- Joined: Tue Apr 05, 2011 4:09 am
- Location: Charlotte, NC
Re: [FLAW] Add to Cart Min Qty Not Working
avvici wrote:You do realize we are talking about category.tpl? This isn't about product.tpl. You can't even change the quantity on category.tpl. There is only an add to cart button which defaults to a quantity of one when adding. This was the ENTIRE problem to begin with. If there was no AJAX cart it wouldn't matter but the fact of the matter is that there is which allows one to peruse a bunch of category pages adding tons of items to cart all of which have a minimum quantity unknowingly to them. If you can't see that then so be it. No harm no foul.
@ Daniel, read what I wrote earlier about a solution.
i2Paq wrote:Maybe instead of adding it to the Cart it should redirect you to the product-page it self like when a product has options.
Second there could be the red bar telling the customer that he / she needs to order the minimum amount.
From a customers (my customer or any customer visiting a OpenCart based store) point of view it is a FLAW, an un-logical way of how it should work.
Maybe you disagree, but it is the customer (my customer ar anyone else's) that should have an easy way of using the shop, not the programmer that thinks what he does is the only way workable way.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
FREE manuals: ShowMe Guides OpenCart, Opencart Check List and Our Documentation section.
BUGs?: Known BUGS for All OC Versions.
[How to] BTW + Verzend & betaalmethodes.
-

i2Paq - Global Moderator
- Posts: 9854
- Joined: Mon Nov 09, 2009 11:00 am
- Location: Winkel - The Netherlands
Re: [FLAW] Add to Cart Min Qty Not Working
i2Paq has a point here. I will say go with redirecting to the product page, just like how options work. The customer will then see that there's a minimum order of xx amount. So he knows that he has to pick the right quantity.
Looking from daniel's point of view, he makes a point too. We won't know how many quantity the customer wants. There's many permutation to this. So I would say checking for minimum quantity OR forcing minimum quantity at the category page is a 'no good'. I will say i2Paq idea is better
it solves both sides of a problem
Looking from daniel's point of view, he makes a point too. We won't know how many quantity the customer wants. There's many permutation to this. So I would say checking for minimum quantity OR forcing minimum quantity at the category page is a 'no good'. I will say i2Paq idea is better
it solves both sides of a problem-

MarketInSG - Posts: 2675
- Joined: Wed Nov 16, 2011 3:53 am
- Location: Singapore
38 posts
• Page 1 of 2 • 1, 2

















