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.
Bookmarks