Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Product Qty Units: What exactly is this

Product Qty Units: What exactly is this

Locked

Views: 3,146

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
26 Jan 2008, 9:23 PM
#1
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Product Qty Units: What exactly is this

Hi

Ok I have a client who is setting her products to have a minimum order of 3

so
Product Qty Minimum: 3

But she is also setting

Product Qty Units: 3

And I am not quite sure what that does, I can't find it in the FAQs and the wiki just seems to talk about gift certs, I just assumed you would leave it blank, but now I'm not sure?

26 Jan 2008, 9:26 PM
#2
kobra avatar

kobra

Black Belt

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

Re: Product Qty Units: What exactly is this

Product Qty Units: 3 should be Product Qty Units: 1 if the actual unit is one and you must buy 3 of them

27 Jan 2008, 6:44 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Qty Units: What exactly is this

Units are used to force the customer to buy a Product in a set number of items such as:

By the dozen would use: Unit of 12

By the half dozen would use: Unit of 6

So to use Minimum and Units together for something like:
Purchase in groups of 3, such as, 9, 12, 15, 18 21 etc. etc. etc. would use Unit 3 and Minimum 9 ...

Now you would force both the increment or Unit of 3 and the Minimum purchase of 9 ...

When no unit is required, or the customer may buy 1 ... the default is: Unit 1 ...

NOTE: Unit 0 does NOT work as there is no such thing as buying 0 quantity and the logic on Qunatity Purchased divided by zero will result in a logic error ...

28 Jan 2008, 6:03 AM
#4
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Product Qty Units: What exactly is this

Thanks for that, i have always left the setting as the default (1), but as it was being changed i thought i had better find out what it actually does

28 Jan 2008, 2:55 PM
#5
kobra avatar

kobra

Black Belt

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

Re: Product Qty Units: What exactly is this

Yeah, I only stated you set it to 1 thinking that the minimum was 3 but one could buy 4 or 5. If you want this to be in only multiples of 3 then both are 3

27 Apr 2008, 8:26 PM
#6
craigkendall avatar

craigkendall

New Zenner

Join Date:
May 2007
Posts:
46
Plugin Contributions:
0

Re: Product Qty Units: What exactly is this

Great info. This is very helpful. I have a customer who is clearancing some slightly used products and wants to sell them in quantities of 10 or more so this may be very helpful. I can set the Product Qty Min to 10. That makes sense. But let's say she has 34 of these available. What happens if someone buys 30 and only 4 our are left. Is the programming sophisticated enough to know only four remain and allow an order of 4 instead of enforcing the 10 minimum with only 4 in stock?

28 Apr 2008, 12:12 AM
#7
kobra avatar

kobra

Black Belt

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

Re: Product Qty Units: What exactly is this

Is the programming sophisticated enough to know only four remain and allow an order of 4 instead of enforcing the 10 minimum with only 4 in stock?
NO one would have to monitor a situation like this or sell in some factor of the total available - and this will not work fully for any prime number

2 May 2009, 5:52 AM
#8
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: Product Qty Units: What exactly is this

If I want the minimum order to be 10 and quantiy in multiples of 10, I should use the following, correct?

Product Qty Minimum: 10
Product Qty Units: 10

Does this automatically change the quantity in the cart, or does it only display a warning?

Also, what exactly does 'Product Qty Min/Unit Mix' do?

2 May 2009, 3:19 PM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Qty Units: What exactly is this

What it will do on Minimum 10 and Unit 10 is set the input box to 10 ...

If you order 9, it will warn you need 10 ... but if you go to the Product page, you will see it has 1 set as you need 1 more to make 10 ...

If you order 13, it will warn you need units of 10, and if you go to the Product page, you will now see 7 is set to get to the next Unit of 10 ...

3 May 2009, 6:34 AM
#10
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: Product Qty Units: What exactly is this

Thank you for the clarification.

Is there some setting I can change to automatically change the quantity added to the cart if the minimum is not met.

The current method works for regular checkout because it does not allow to continue checkout until the minimum quantity is met. However, it does not work with alternative checkout methods such as GoogleCheckout.

What is the file that controls this?

3 May 2009, 4:48 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Qty Units: What exactly is this

In the shopping_cart.php class file, around line 1133, you could try using this code by uncommenting the line:

          if ($fix_once == 0) {
            if ($check_quantity < $check_quantity_min) {
              $fix_once ++;
// this can reset the order amount to Minimum when set to less by uncommenting the line
//              $this->contents[$products_id]['qty'] = $check_quantity_min;
              $_SESSION['valid_to_checkout'] = false;
              $_SESSION['cart_errors'] .= ERROR_PRODUCT . $products->fields['products_name'] . ERROR_PRODUCT_QUANTITY_MIN_SHOPPING_CART . ERROR_PRODUCT_QUANTITY_ORDERED . $check_quantity  . ' <span class="alertBlack">' . zen_get_products_quantity_min_units_display((int)$prid, false, true) . '</span> ' . '<br />';
            }
          }

I have not tested this for all circumstances but it does manage the minimum ...

Around that section of code, you could work out other controls for Minimum and Units on the current quantity ...

25 May 2009, 8:15 PM
#12
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: Product Qty Units: What exactly is this

Sorry for the late reply.

Thank you so much, the code works great.