Forums / Basic Configuration / $XX.XX remaining until free shipping

$XX.XX remaining until free shipping

Locked

Started by glock on 11 Jul 2006, 8:27 AM · Views: 2,828

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
11 Jul 2006, 8:27 AM
#1
glock avatar

glock

New Zenner

Join Date:
Jun 2006
Location:
Washington State
Posts:
13
Plugin Contributions:
0

$XX.XX remaining until free shipping

I have created my CSS style sheets and am now trying to understand how the sideboxes function. I think I have a slight grasp on the override options but am not sure what actual file(s) control the sidebox. I am trying to get the following code into a sidebox but am not sure how to get it to register in my admin console so I can turn it on. The code was poached from another forum and will tell the user how much remains for them to qualify for free shipping.

Can someone give me some guidance with this isssue?

<?php
$free_ship_on = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING;

if ($free_ship_on == 'true') {
  $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);
     echo 'Add '. $currencies->format($diff_to_free) .' to your order to qualify for Free Shipping!';
   } else {
     echo 'Your order qualifies for Free Shipping!';
   }
  } else {
  echo 'Free Shipping for all orders of ' . $currencies->format($free_limit) . ' or more.';
  }
}
?>
30 Nov 2006, 9:31 AM
#2
vaicekal avatar

vaicekal

New Zenner

Join Date:
Sep 2006
Posts:
9
Plugin Contributions:
1

Re: $XX.XX remaining until free shipping

Hi, 

You will need to add the following 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: <a href="http://www.unique-gifts-jewelry.com">Uniquely Yours, Unique Gifts and Jewelry</a>.
30 Nov 2006, 9:47 AM
#3
vaicekal avatar

vaicekal

New Zenner

Join Date:
Sep 2006
Posts:
9
Plugin Contributions:
1

Re: $XX.XX remaining until free shipping

Hi,

You will need to add the following 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 :yes:

Sorry for messing up previous message.

30 Nov 2006, 10:00 AM
#4
vaicekal avatar

vaicekal

New Zenner

Join Date:
Sep 2006
Posts:
9
Plugin Contributions:
1

Re: $XX.XX remaining until free shipping

Hi,

You will need to add the following 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 :yes:

Sorry for messing up previous 2 messages. I hope administrator will forgive me. Still learning to post correctly. This 7 minute limit is some_thing!

30 Nov 2006, 5:19 PM
#5
phid avatar

phid

Totally Zenned

Join Date:
Nov 2005
Location:
Narnia
Posts:
696
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping

That's pretty cool! You should package it up and put it in the downloads section....people would like it!

3 Dec 2006, 8:02 AM
#6
meemster avatar

meemster

New Zenner

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

Re: $XX.XX remaining until free shipping

VaicekaL:

Hi,

You will need to add the following 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](http://www.unique-gifts-jewelry.com/) :yes:
> 
> Sorry for messing up previous 2 messages. I hope administrator will forgive me. Still learning to post correctly. This 7 minute limit is some_thing!

I'm wondering if this code could be adapted to a ' add $XX.XX to your order to qualify for a free gift'? 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.
17 Dec 2006, 6:44 PM
#7
crazycucumber avatar

crazycucumber

Zen Follower

Join Date:
Jan 2006
Posts:
403
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping

Does the sidebox download in the downloads section relate to this thread ?

If so what extras do you have to do to get ti to work / configure it ?

There were not any instructions in the download.

Thanks

Various Zen cart sites !

5 Jan 2007, 11:41 PM
#8
arcanesanctuary avatar

arcanesanctuary

New Zenner

Join Date:
Nov 2006
Posts:
89
Plugin Contributions:
0

Re: $XX.XX remaining until free shipping

I love the script but I can't seem to get it to work right. When I put it in, it shows the free shipping at $50 but once items are in the cart, it doesn't show any alerts. Do I need to make the sidebox larger or something?