Zen Cart Logo
Forums / General Questions / Minimum FIRST TIME order fee

Minimum FIRST TIME order fee

Views: 2,507

Results 1 to 20 of 21
7 Dec 2009, 6:52 PM
#1
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Minimum FIRST TIME order fee

I'm running a medical supply site. We often get orders from home users for a $2.00 bag of cotton balls, and it costs us more to ship the product than we bought the product for. The solution that my company came up with was requiring at least $100.00 for the first time order, which will prevent granny from ordering $2.00 worth of product.

In the admin, I know you can add a "low-order fee." Is there a mod, or a way to easily make this low order fee apply ONLY to first time orders.

Thanks in advance everyone,

7 Dec 2009, 6:59 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,616
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

So, if granny decides to order more than $100 the first time, you don't care if she comes back and then orders the $2 cotton balls?

7 Dec 2009, 7:07 PM
#3
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

We primarily supply home health agencies, hospitals, different types of medical facilities. The minimum first time order fee exists only to deter granny and her cronies from trying to order in the first place.

But, to answer your question, yes, if a customer decided to order $2.00 cotton balls after fulfilling the $100.00 first time order fee, we would go ahead and begrudgingly fulfill the order.

If it were me, I'd require a minimum for every order but, I don't make the decisions, I just do what I'm told.

7 Dec 2009, 7:12 PM
#4
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Minimum FIRST TIME order fee

In my experience, if people want a product badly enough, they will pay the shipping - regardless.

I have a number of client websites that sell cheap items ... Some under £1.00 . You'd be surprised at the number of orders they get where the basket total is less than the shipping fee.

People don't mind paying a proper rate for shipping - as long as you are up-front about your shipping and handling costs and don't try to "bury" the shipping fees in either the product prices or by springing a surprise at stage 3 of checkout.

Very often (and we have evidence of this too), people will add a few more items to their cart (even if they don't really need or want them) so that the shipping charge is more "justifiable". They kinda argue that if they are required to pay £4.50 for postage for a cart weight of upto 2kg, then might as well fill it up with products until that weight threshold is reached...

... but to insist that a person orders 400 tons of cotton wool is, I belive, not the right approach...

7 Dec 2009, 7:49 PM
#5
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

I agree that having a "minimum first time order fee" is a crappy idea. That doesn't change the fact that my employer is insisting upon it being there. Please, if anyone can think of a way to implement this, let me know.

7 Dec 2009, 9:47 PM
#6
aussiesapphire avatar

aussiesapphire

Zen Follower

Join Date:
Apr 2006
Posts:
114
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

Hopefully others who know coding will be able to help more with this issue but in the meantime, I did have this thought. I was thinking a work-around solution might be this:

Set up the minimum order fee and then after the first order, give your customers a discount coupon for that amount for future orders. You could choose not to issue the coupon if you thought they might be "granny" type buyers or give it to everyone - if for everyone, could include it in the order confirmation to make it automatic.

Not a perfect solution as it requires the buyer remember to claim the discount for next orders but might satisfy the boss until you come up with a more elegant fix or you can convince them to tackle it another way.

cheers
Leah

8 Dec 2009, 8:12 AM
#7
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

jdw1979:

We primarily supply home health agencies, hospitals, different types of medical facilities. The minimum first time order fee exists only to deter granny and her cronies from trying to order in the first place.

But, to answer your question, yes, if a customer decided to order $2.00 cotton balls after fulfilling the $100.00 first time order fee, we would go ahead and begrudgingly fulfill the order.

If it were me, I'd require a minimum for every order but, I don't make the decisions, I just do what I'm told.

For low value products, set up a minimum quantity - force the customer to buy 10 of a particular item. As your major clients are businesses that probably buy in bulk they will not have a problem with having to buy a minimum of 10 bales of cottonwool.

Additionally, set up a minimum order fee, so if the total value of the shopping cart is under $30, for example, a small fee is added.

You can also consider the Minimum Order Module by Andrew Berezin, where the checkout process is halted until the cart value meets or exceeds a specified amount.

I would also have a diplomatic chat with the boss... Tell him/her that their logic stinks and that clever people on the zencart forum know better! :D

8 Dec 2009, 10:24 AM
#8
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

when I sell to the public I find Free Shipping is a great advantage.

You must be the first B2B that I know of that doesn't seem to charge shipping (at least under a minimum order amount)

Standard B2B features to me seem to be all about cost recovery

I agree with fairestcape go with:

Minimum order amount.
Freight charged, perhaps Free over a certain amount

I can't see why you offer Free Shipping to businesses for small amounts

8 Dec 2009, 1:24 PM
#9
aliepinieks avatar

aliepinieks

Zen Follower

Join Date:
Jun 2009
Location:
Brisbane, QLD AUS
Posts:
209
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

aussiesapphire:

...Not a perfect solution...

i think it will cause you more headaches than granny buying her cotton balls. from a pure business perspective, you want to put as few obstacles as possible in front of your customer base, especially whoelsale or B2B customers as their business is more lucrative via its frequency and it's volume.

losing a $200 order will prbably hurt more than shipping to granny (we're really getting on the granny bandwagon aren't we?), so i suspect a better solution would be to find another solution.

i don't have an answer, however can see custom code being the best solution as it would not take much to check the number of previous orders before applying a restriction.

andy

8 Dec 2009, 3:24 PM
#10
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Minimum FIRST TIME order fee

After thinking about this and reading all about granny.
The one thing that you need is granny to be logged in before you know if she has previously ordered.

So your options are.
Must log in for pricing.
Add first time monies to all carts.
Wait till check out to add first time monies.

It is easy enough to add the first time monies code needed to do what you want.

It all comes down to you need to know who is ordering and where in zc you find out.

Skip

8 Dec 2009, 8:11 PM
#11
aussiesapphire avatar

aussiesapphire

Zen Follower

Join Date:
Apr 2006
Posts:
114
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

ALiepinieks:

i think it will cause you more headaches than granny buying her cotton balls. from a pure business perspective, you want to put as few obstacles as possible in front of your customer base, especially whoelsale or B2B customers as their business is more lucrative via its frequency and it's volume.

losing a $200 order will prbably hurt more than shipping to granny (we're really getting on the granny bandwagon aren't we?), so i suspect a better solution would be to find another solution.

i don't have an answer, however can see custom code being the best solution as it would not take much to check the number of previous orders before applying a restriction.

andy

I entirely agree with you except the OP said his boss was insisting on this system which we all agree is a bad idea. For our new site, we've decided to go with a flat rate shipping fee which more than covers the real cost for very tiny orders but FREE shipping for modest to large orders. We're trying to attract larger buyers and dont want to fiddle around with very low value small orders so free shipping and a flat rate that easily covers the small orders should work (I hope - we're not up and running on this one yet). We can switch back to actual cost if we find it is necessary but trying to offer something really simple and attractive.

Simple is best of course - it is really nice to be able to explain our shipping policy in one short sentence. And I do think it would be best to try and change the boss' mind on this one.

cheers
Leah

9 Dec 2009, 4:41 PM
#12
ajeh avatar

ajeh

Oba-san

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

Re: Minimum FIRST TIME order fee

Have you looked at the Minimum Order in the Free Software Add Ons ...
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=599

You could probably adapt that to check if the customer has made an order or not and use this to prevent checkouts of less than $100.00 if the customer does not yet have their first order ...

8 Feb 2010, 3:20 AM
#13
adam2020 avatar

adam2020

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

Ajeh:

Have you looked at the Minimum Order in the Free Software Add Ons ...
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=599

You could probably adapt that to check if the customer has made an order or not and use this to prevent checkouts of less than $100.00 if the customer does not yet have their first order ...

This would help with my current project.

It looks like this is the section of the addon to edit:

          if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
            $_SESSION['valid_to_checkout'] = false;
            $messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
          }

How would I amend statement to check if customer has ordered before?

Thanks for any help :)

8 Feb 2010, 4:25 AM
#14
ajeh avatar

ajeh

Oba-san

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

Re: Minimum FIRST TIME order fee

// check for at least 1 existing order 
$sql = "SELECT orders_id from " . TABLE_ORDERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "' limit 1";
$chk_customers_orders = $db->Execute($sql);
if (!$chk_customers_orders->fields['orders_id'] > 0) {
  $charge_minimum = true;
} else {
  $charge_minimum = false;
}

          if($charge_minimum && $_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
            $_SESSION['valid_to_checkout'] = false;
            $messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
          }
8 Feb 2010, 6:26 AM
#15
adam2020 avatar

adam2020

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

Thanks for your help.

I tried that and it doesn't work. Causes white screen.

I think I should have posted more of the code.

This is the whole class.minimum_order_amount.php file in includes/classes/observers

<?php
/**
 * class.minimum_order_amount.php
 *
 * @copyright Copyright 2005-2007 Andrew Berezin eCommerce-Service.com
 * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: config.minimum_order_amount.php 1.0.1 20.09.2007 0:06 AndrewBerezin $
 */

/**
 * Observer class used to check minimum order amount
 *
 */
class minimum_order_amount extends base {
  /**
   * constructor method
   *
   * Attaches our class to the ... and watches for 4 notifier events.
   */
  function minimum_order_amount() {
    global $zco_notifier;
//      $_SESSION['cart']->attach($this, array('NOTIFIER_CART_GET_PRODUCTS_START', 'NOTIFIER_CART_GET_PRODUCTS_END'));
    $zco_notifier->attach($this, array('NOTIFY_HEADER_END_SHOPPING_CART', 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING', 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT', 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION'));
  }
  /**
   * Update Method
   *
   * Called by observed class when any of our notifiable events occur
   *
   * @param object $class
   * @param string $eventID
   */
  function update(&$class, $eventID) {
    global $messageStack;
    global $currencies;
    switch ($eventID) {
      case 'NOTIFIER_CART_GET_PRODUCTS_END':
      case 'NOTIFY_HEADER_END_SHOPPING_CART':
        if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
		
		// check for at least 1 existing order 
			$sql = "SELECT orders_id from " . TABLE_ORDERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "' limit 1";
			$chk_customers_orders = $db->Execute($sql);
			if (!$chk_customers_orders->fields['orders_id'] > 0) {
				$charge_minimum = true;
			} else {
  $charge_minimum = false;
			}
          if($charge_minimum && $_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
            $_SESSION['valid_to_checkout'] = false;
            $messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
          }
        }
        break;
      case 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING':
      case 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT':
      case 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION':
        if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
          if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
            zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
          }
        }
        break;
      default:
        break;
    }
  }
}
?>
8 Feb 2010, 11:30 PM
#16
ajeh avatar

ajeh

Oba-san

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

Re: Minimum FIRST TIME order fee

And if you add a
global $db;

above the line that starts:
$sql

what happens?

9 Feb 2010, 4:33 AM
#17
adam2020 avatar

adam2020

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

It works like a charm. Thank you for your help Ajeh :clap:

If anyone is interested in Minimum Order for first order only, use the Minimum Order addon and substitute includes/classes/observers/class.minimum_order_amount.php with the code below:

<?php
/**
 * class.minimum_order_amount.php
 *
 * @copyright Copyright 2005-2007 Andrew Berezin eCommerce-Service.com
 * @copyright Portions Copyright 2003-2006 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: config.minimum_order_amount.php 1.0.1 20.09.2007 0:06 AndrewBerezin $
 */

/**
 * Observer class used to check minimum order amount
 *
 */
class minimum_order_amount extends base {
  /**
   * constructor method
   *
   * Attaches our class to the ... and watches for 4 notifier events.
   */
  function minimum_order_amount() {
    global $zco_notifier;
//      $_SESSION['cart']->attach($this, array('NOTIFIER_CART_GET_PRODUCTS_START', 'NOTIFIER_CART_GET_PRODUCTS_END'));
    $zco_notifier->attach($this, array('NOTIFY_HEADER_END_SHOPPING_CART', 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING', 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT', 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION'));
  }
  /**
   * Update Method
   *
   * Called by observed class when any of our notifiable events occur
   *
   * @param object $class
   * @param string $eventID
   */
  function update(&$class, $eventID) {
    global $messageStack;
    global $currencies;
    switch ($eventID) {
      case 'NOTIFIER_CART_GET_PRODUCTS_END':
      case 'NOTIFY_HEADER_END_SHOPPING_CART':
        if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
		
		// check for at least 1 existing order 
			global $db;
			$sql = "SELECT orders_id from " . TABLE_ORDERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "' limit 1";
			$chk_customers_orders = $db->Execute($sql);
			if (!$chk_customers_orders->fields['orders_id'] > 0) {
				$charge_minimum = true;
			} else {
  $charge_minimum = false;
			}
          if($charge_minimum && $_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
            $_SESSION['valid_to_checkout'] = false;
            $messageStack->add('shopping_cart', sprintf(TEXT_ORDER_UNDER_MIN_AMOUNT, $currencies->format(MIN_ORDER_AMOUNT)) . '<br />', 'caution');
          }
        }
        break;
      case 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING':
      case 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT':
      case 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION':
        if ($_SESSION['cart']->count_contents() > 0 && MIN_ORDER_AMOUNT > 0) {
          if($_SESSION['cart']->show_total() < MIN_ORDER_AMOUNT) {
            zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
          }
        }
        break;
      default:
        break;
    }
  }
}
?>

Also edit the language files to something more suitable for First Order.

9 Feb 2010, 4:50 AM
#18
ajeh avatar

ajeh

Oba-san

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

Re: Minimum FIRST TIME order fee

You are most welcome ...

Thanks for the update that this code is now working properly for you ... :smile:

9 Feb 2010, 5:45 AM
#19
adam2020 avatar

adam2020

New Zenner

Join Date:
Nov 2009
Posts:
33
Plugin Contributions:
0

Re: Minimum FIRST TIME order fee

Sorry but I didn't test thoroughly enough.

If I try and order a 2nd time there are no messages or errors but attempting to go to checkout_shipping page just loads the Shopping Cart page.

9 Feb 2010, 1:36 PM
#20
ajeh avatar

ajeh

Oba-san

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

Re: Minimum FIRST TIME order fee

Put the IF test above the case statement then add the results to both case statements that are checking the cart ...