Zen Cart Logo
Forums / Basic Configuration / Minimum order total

Minimum order total

Views: 1,321

Results 1 to 10 of 10
27 Jun 2012, 2:54 AM
#1
sweetemotions avatar

sweetemotions

Zen Follower

Join Date:
Apr 2008
Posts:
100
Plugin Contributions:
0

Minimum order total

I have one category that offers free items. There is no shipping for the free item. You must make a purchase of at least $0.01 to get the free item. I was able to do this using 1.3.9 and really need this feature back. Is there way to implement this in version 1.5.0? Any help will be greatly appreciated. Thank you.

27 Jun 2012, 11:37 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Minimum order total

You could try the add on Plugin:
http://www.zen-cart.com/downloads.php?do=file&id=402

NOTE: you will need to customize this a little and change the code in:
/includes/classes/observers/class.minimum_order_amount.php

and change all references to:
&& $_SESSION['cart']->show_total() > 0

to not be included ...

Example, change:

//                  if($_SESSION['cart']->show_total() < MIN_FIRST_ORDER_AMOUNT && $_SESSION['cart']->show_total() > 0) {
                  if($_SESSION['cart']->show_total() < MIN_FIRST_ORDER_AMOUNT) {

and all similar references ...

Then, you can set the Minimum to 0.01 or whatever amount you want, for:

Minimum Order Amount
The minimum amount an order must total to be able to checkout. Empty means no minimum.

13 Jul 2012, 3:57 AM
#3
david52 avatar

david52

Zen Follower

Join Date:
Jun 2010
Location:
USA
Posts:
176
Plugin Contributions:
0

Re: Minimum order total

Ajeh, is that the only way. I dont know if i am on the right track, but got a question can i set my cart to only accept the order if the total of the product is a min of $25.00,
david52

14 Jul 2012, 1:47 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Minimum order total

You want to test the total of 1 Product or the whole order being >= $25.00 ...

14 Jul 2012, 3:49 PM
#5
david52 avatar

david52

Zen Follower

Join Date:
Jun 2010
Location:
USA
Posts:
176
Plugin Contributions:
0

Re: Minimum order total

Ajeh, What I want to do is if the "Order" does not total $25.00 I do not want the cart to process it. I thought I had it set up, and I had a order come in for $2.50 for a set of clock hands. Im going to process it but I would not like for it to happen again.
Tks in advance
david52 "ohio too"

14 Jul 2012, 4:19 PM
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Minimum order total

Andrew Berezin wrote a "Minimum Amount In Cart" plugin - for ZC 1.3

I later made a small modification to it and submitted a "Maximum Amount In Cart" plugin (it just reverses what Andrew's original algorithm does).

This mod allows you to set a minimum value that MUST be in the cart, before checkout is allowed.

You can set this amount in "minimum values" in the admin panel.

AGAIN... this was for Zc1.3 I do not know if it has been upgraded for 1.5

14 Jul 2012, 4:30 PM
#7
david52 avatar

david52

Zen Follower

Join Date:
Jun 2010
Location:
USA
Posts:
176
Plugin Contributions:
0

Re: Minimum order total

Im a litle chicken to do that man I am running 1.39h and I have never upgraded for I did not create custom pages in the beginning and I put a lot of work and effort into this considering a while ago I did not know squat bout any of this. I red the read me file in the plug in and this sounds a little rough for me.

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES (NULL, 'Minimum Order Amount', 'MIN_ORDER_AMOUNT', '10', 'The minimum amount an order must total to be able to checkout. Empty means no minimum.', '2', '99', NOW(), NULL, NULL);

INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES (NULL, 'Minimum First Order Amount', 'MIN_FIRST_ORDER_AMOUNT', '10', 'The minimum amount a first order must total to be able to checkout. Empty means no minimum. Make it the same as the Minimum Order Amount, if you always want the same minimum.', '2', '99', NOW(), NULL, NULL);

14 Jul 2012, 7:15 PM
#8
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Minimum order total

david52:

Im a litle chicken to do that man I am running 1.39h and I have never upgraded for I did not create custom pages in the beginning and I put a lot of work and effort into this considering a while ago I did not know squat bout any of this. I red the read me file in the plug in and this sounds a little rough for me.

We run this on a few sites in 1.3.9h

What frightens you? As with any plugin, you do a full backup first.

In this case, there are NO over-ride files, so you just port the INCLUDES folder to your server's INCLUDES folder... Then run the install.sql .

You do not need to run install_UPGRADE.sql

I see Melanie Prough has upgraded the mod for ZC 1.5 - but as you are running 1.3 then you can ignore all references to 1.5

It's really simple to add... Takes less than 30 seconds to install this plugin...

Just FTP the FILES to your server

Then, in your zencart ADMIN, go to TOOLS >>> INSTALL SQL PATCHES and then copy and paste the "install.sql" text into that window and send it off.

As I say, you should backup your dbase first.

14 Jul 2012, 10:24 PM
#9
david52 avatar

david52

Zen Follower

Join Date:
Jun 2010
Location:
USA
Posts:
176
Plugin Contributions:
0

Re: Minimum order total

ok schoolboy, I will give it a try. I looked into it and I was awaiting a repsonse. I just did not know if I put in all the text or not. I will let you know how it goes.
david2

14 Jul 2012, 10:35 PM
#10
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Minimum order total

david52:

I just did not know if I put in all the text or not. I will let you know how it goes.
david2

What "text"?

The install.sql is dbase update code that you put into the database via the INSTALL SQL PATCHES feature under your TOOLS menu.

What you do is OPEN "install.sql" in a PLAIN TEXT EDITOR.

Then you highlight the code, and [ctrl+c] (copy) it.

Then you [ctrl+v] (paste) it into the input field in the INSTALL SQL PATCHES screen... then SUBMIT/SEND/UPDATE... whatever that button says.

This will write the changes to the dbase, giving you the ADMIN CONTROLS you need to set the module's features.