Zen Cart Logo
Forums / Features Wish List / Global minimum quantity

Global minimum quantity

Locked

Views: 1,519

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
05 Jul 2006, 16:42
#1
imagenation avatar

imagenation

New Zenner

Join Date:
Jul 2006
Posts:
11
Plugin Contributions:
0

Global minimum quantity

I am seeting up a site for a Wine Merchant who specialises in mixed cases of rare wines. Therefore I need to configure Zen Cart to have a minimum order of 12 bottles (a case), and multiples of 12 bottles thereafter.

I could probably ask my programmer friend to code something in JavaScript that will check that the total qty is 12 or above before allowing the user to progress to checkout stage, but I was wondering if there is anything that could be done with ZenCart. I haven't seen an admin option to set global min quantity, but perhaps I am just looking in the wrong places.

Any advice would be much appreciated. All the best.

05 Jul 2006, 21:37
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Global minimum quantity

There are probably many ways to skin this cat but you could start looking in tpl_checkout_confirmation_default.php and possibly add an if sequence that will check for qty and a calc for qty/12 greater than 1 and something else to insure that it is a multiple of 12.

This will only function if e sells only by the bottle and one would have to order 12 to get a case.

05 Jul 2006, 21:43
#3
imagenation avatar

imagenation

New Zenner

Join Date:
Jul 2006
Posts:
11
Plugin Contributions:
0

Re: Global minimum quantity

Thanks for your advice and pointing me in the right direction, just wish my PHP skills where up to the job :down:

05 Jul 2006, 22:37
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Global minimum quantity

:oops: ADDENDUM:

The add to cart function starts with includes/main_cart_actions.php at line 41, which calls the function actionAddProduct() that is in includes/classes/shopping_cart.php etc

05 Jul 2006, 22:45
#5
imagenation avatar

imagenation

New Zenner

Join Date:
Jul 2006
Posts:
11
Plugin Contributions:
0

Re: Global minimum quantity

Thanks again, I'll look in to it.

26 Oct 2007, 15:38
#6
cosmogol avatar

cosmogol

New Zenner

Join Date:
Oct 2007
Posts:
12
Plugin Contributions:
0

Re: Global minimum quantity

Hi there.

I have exactly the same need… and Kobra gave the good direction.

…that is in includes/classes/shopping_cart.phpI've found a solution that works for me : in "shopping_cart.php", changing the line 1128 of the "get_products" function from

if ($check_quantity < $check_quantity_min) {
```to

if (($check_quantity % $check_quantity_min) != 0) {


After that you may wish to change all text relative to minimum quantity so it talks about "multiple of" quantity :wink: …
30 Nov 2007, 17:48
#7
fromtheriviera avatar

fromtheriviera

New Zenner

Join Date:
Aug 2007
Location:
South of France
Posts:
45
Plugin Contributions:
0

Re: Global minimum quantity

I really have the same need and in fact wonder how this could be included in the basic package in future versions ?

Don't know how we can live without it .
Clients keep calling me to change the min product quantity while they shop.
Then I have to change it back again when they have finished.

very annoying and infact lost alot of conversions when client saw they could not mix products without having to buy 6 of each .

If your solution works the I really appreciate your posting this problem and
solution !