Zen Cart Logo
Forums / Setting Up Specials and SaleMaker / Add $XX.XX to your order to qualify for a free gift

Add $XX.XX to your order to qualify for a free gift

Locked

Views: 2,474

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
13 Dec 2006, 01:15
#1
meemster avatar

meemster

New Zenner

Join Date:
Jul 2006
Location:
London, UK
Posts:
11
Plugin Contributions:
0

Add $XX.XX to your order to qualify for a free gift

Hi,

I wondered if the code below for 'Add $XX.XX to your order to qualify for Free Shipping' could be adapted to 'add $XX.XX to your order to qualify for a free gift'?

Quote:
Originally Posted by VaicekaL View Post
Hi,

You will need to add the following code:

PHP Code:
$free_ship_on = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;

if ($free_ship_on == 'false') {
$free_limit = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER;
if ($_SESSION['cart']->count_contents() > 0) {
$_SESSION['cart']->get_products();
$basket_total = $_SESSION['cart']->show_total();
if ($basket_total < $free_limit) {
$diff_to_free = ($free_limit - $basket_total);
$content .= '<span class="alert">' . 'Add '. $currencies->format($diff_to_free) .' to your order to qualify for Free Shipping!' . '</span>';
} else {
$content .= '<span class="alert">' . 'Your order qualifies for Free Shipping!' . '</span>';
}
} else {
$content .= '<span class="alert">' . 'Free Shipping for orders of ' . $currencies->format($free_limit) . ' or more.' . '</span>';
}
}
into the line 51 in the includes/templates/template_default/sideboxes/tpl_shopping_cart.php.
Use ($free_ship_on == 'false') on the 4th line of code above if you intend to use free shipping option. The($free_ship_on == 'true') - did not work for me. Maybe it will work with the freeshipper enabled.

Check out it here: http://www.unique-gifts-jewelry.com

I already have the store automatically adding a free gift once the customer spends $40 but it'd be nice to have a prompt like this to encourage them.

30 Oct 2007, 06:47
#2
raunharman avatar

raunharman

Zen Follower

Join Date:
Dec 2005
Posts:
165
Plugin Contributions:
0

Re: Add $XX.XX to your order to qualify for a free gift

I tried shopping for 59$, but no free gift was added.
I was checking this option .