Zen Cart Logo
Forums / Basic Configuration / min purchase setup

min purchase setup

Locked

Views: 3,553

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
9 Nov 2006, 2:57 PM
#1
gwaitsi avatar

gwaitsi

New Zenner

Join Date:
Oct 2006
Posts:
48
Plugin Contributions:
0

min purchase setup

I am trying to setup a wine site.

I want to have minimum quantities for individual products i.e. 2 bottles, but have an overall minimum quantity for the order i.e. 12 bottles.

I still haven't been able to work out what is: -

product qty minimum
product qty maximum
product qty units
Product qty min/unit mix

Grateful if someone can explain these and advise how i may achieve above example.

Thanks

9 Nov 2006, 3:01 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: min purchase setup

You can set the minimum quantity for a Product by setting the:

Product Minimum: 2

when adding/editing a product ...

As to the minimum quantity for the order, you would need to alter the code in the checkout_blah header_php.php files to test for what is in the cart or alter the code that allows the links to checkout to display on the main header and shopping_cart ...

Personally, I'd do both ... changing the links to not show so they don't try to check out but rather see something like 12 bottle minimum for checkout somewhere ... and then a safety in case they try to circumvent the block ...

9 Nov 2006, 3:06 PM
#3
gwaitsi avatar

gwaitsi

New Zenner

Join Date:
Oct 2006
Posts:
48
Plugin Contributions:
0

Re: min purchase setup

bugger, that wasn't what i wanted to hear but thanks....

What is the follow for please

product qty units
Product qty min/unit mix

Thanks GwaiTsi

9 Nov 2006, 3:15 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: min purchase setup

To make the customer order: 2, 4, 6, 8, 10 ... you need units of 2

To utilize Attributes and allow 1 Red and 1 Green to equal 2 you need Mixed ON ... to utilize Attributes and Force 2 Red or 2 Green to equal 2 you need Mixed OFF ...

23 Nov 2006, 5:18 PM
#5
cosmicomic avatar

cosmicomic

New Zenner

Join Date:
Feb 2006
Posts:
32
Plugin Contributions:
0

Re: min purchase setup

Hi Ajeh, you seem to understand the product mix attribute, i am trying to create a product which is 9 bottles of cider, which can be made up of any combination of 3 types to make 9. In your previous post you mentioned having 1 blue and 1 red to equal 2. I cant see how this works. When i set up an example, i followed the instructions and looked in the example set up store and couldnt figure this out. i could give it attributes, but not make each attribute equal a unit. Could you give me a pointer as to where i am going wrong?

would be grateful for any help!

Thanks!

13 Jan 2007, 10:09 AM
#7
jrb1512 avatar

jrb1512

Zen Follower

Join Date:
Sep 2006
Location:
Cheshire, UK
Posts:
100
Plugin Contributions:
0

Re: min purchase setup

im trying to set a minimum order quantity of say £300 on all products on the site, i think i'll have more success selling items as single units. Please help i've had no joy searching so far

13 Jan 2007, 3:44 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: min purchase setup

There is an add-on either in the Downloads or the older contributions for a minimum order amount ...

I am not sure precisely where ... but it does exist ...

14 Jan 2007, 4:44 PM
#9
sunabac avatar

sunabac

Zen Follower

Join Date:
Dec 2006
Location:
Summer:Ontaio, Winter:Texas
Posts:
211
Plugin Contributions:
0

Re: min purchase setup

I am also trying to find the download for minimum order. I went to http://www.modyourzencart.com/free-of-charge/general-modules/min-order-amount but the download does not work for me. I got "file" which I cannot read anyway.. Most of the stuff regarding the minimum order on that web site does not work for me..

18 Jan 2007, 6:01 PM
#10
paulinenmu avatar

paulinenmu

New Zenner

Join Date:
Sep 2005
Posts:
23
Plugin Contributions:
0

Re: min purchase setup

My understanding is that the Minimum Order Mod only lets you set a minimum monetary amount, not the number of products purchased.

Ajeh, you mentioned editing code in the header/checkout files which seems like the best solution. (Until some sort of admin-based feature could be added hopefully?) Is there anyone out there that could help with the php for this? I'm guessing it needs to be some sort of if/then where you just set the number you want the minimum to be, but I'm not sure where to look exactly. Would these be the files under the templates? Or in the languages? Or elsewhere?

Thanks in advance!

3 Feb 2007, 6:38 PM
#11
alargent avatar

alargent

New Zenner

Join Date:
Feb 2007
Posts:
1
Plugin Contributions:
0

Re: min purchase setup

The minimum order module download that Sunabac posted seems to be working for me, but it's true that this mod is based on the total order price, rather than quantity.

That said, if you download and have a look at its code, it's a really simple mod. So if you don't mind hard-coding your minimum quantity, don't even install the mod, just have a look at the file here:

includes/templates/yourtemplate/templates/tpl_shopping_cart_default.php

Diff'ing his version to the standard version, I figured out I needed to add this section at line 51 (right after <?php } //endif flagAnyOutOfStock ?>):

<?php // BOF MIN ORDER AMOUNT
if ($_SESSION['cart']->count_contents() < 12) {?>
<div class="messageStackError"><?php echo sprintf('You must have at least 12 items in your cart to checkout.'); ?></div>
<?php }// EOF MIN ORDER AMOUNT ?>
```Then, lower in the same file, starting at line 132 (right after *<!--bof shopping cart buttons-->*), replace this section of code:

<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>'; ?></div> ```With a wrapped version that also checks for the cart's quantity:
<?php // BOF MIN ORDER AMOUNT
if ($_SESSION['cart']->count_contents() >= 12) {?>
<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT, BUTTON_CHECKOUT_ALT) . '</a>'; ?></div>
<?php }// EOF MIN ORDER AMOUNT ?>
```Obviously change the error message and number 12 to whatever your minimum quantity really is.

This is my first foray into ZenCart hacking, but if I'm feeling really ambitious maybe I'll repackage this mod into one that does this quantity check automagically.

BTW, very nicely customized wine shop cosmicomic, you wouldn't know it's ZC...

Also, thanks to Ajeh and the ZC team, this is really impressive stuff.  While I hope the admin section gets a usability overhaul sooner rather than later, you can't beat the ability to customize!
4 Feb 2007, 4:18 PM
#12
sunabac avatar

sunabac

Zen Follower

Join Date:
Dec 2006
Location:
Summer:Ontaio, Winter:Texas
Posts:
211
Plugin Contributions:
0

Re: min purchase setup

I am actually using the minimum amount, rather than the quantity, that was not a problem. If I set-up admin with 2 wholesale amounts they will work ONLY as long as I don't edit that product. If I go to edit, it will drop the cents for the first price and the full amount of the second price.... So I have to keep on re-entering price(s) every time I edit a product...

22 Jan 2008, 9:46 AM
#13
benmckechnie avatar

benmckechnie

New Zenner

Join Date:
Nov 2007
Location:
North East United Kingdom
Posts:
25
Plugin Contributions:
0

Re: min purchase setup

Hi Pauline,
did you manage to find out if / how to do this?
I am looking for the same feature and having the same problems you did!
Any help or suggestions from your own experience would be greatly appreciated.
Cheers,
Ben