Jump to content
Sign in to follow this  
FastEddy

? more $$ needed

Recommended Posts

I do this in my catalog/includes/boxes/shopping_cart.php:

 

Right after:

    $info_box_contents[] = array('align' => 'right',

                                'text'  => $currencies->format($cart->show_total())

                               );

 

Insert:

    if (($cart->show_total() >= '75') && ($cart->show_total() < '100')) {

   $info_box_contents[] = array('align' => 'center',

                                'text'  => FREESHIPPING_1

                               );

}else if ($cart->show_total() >= '100'){

   $info_box_contents[] = array('align' => 'center',

                                'text'  => FREESHIPPING_2

                               );

 

And in includes/languages/english.php, include:

 

define('FREESHIPPING_1', '<font size=-1 color=FF0000><b>FREE SHIPPING<br>on all orders over $100!<sup>*</sup></b></font>');

define('FREESHIPPING_2', '<font size=-1 color=FF0000><b>FREE SHIPPING!<sup>*</sup></b></font>');

 

I offer Free Shipping at $100. Once a user's total hits $75, an alert appears in the shopping_cart infobox announcing that Free Shipping applies to orders over $100. Once they hit $100, the alert changes to "Free Shipping!"

 

Check out TibetCollection.com for a demo.

Share this post


Link to post
Share on other sites

Im getting this error message:

Parse error: parse error in /home/inksale/public_html/shop/includes/boxes/shopping_cart.php on line 84

 

Line 83 is the last line in this code.

 

 

if (!$cart_empty) {

   $info_box_contents[] = array('align' => 'left',

                                'text' => tep_draw_separator()

                          );

   $info_box_contents[] = array('align' => 'right',

                                'text'  => $currencies->format($cart->show_total())

                               );

 if (($cart->show_total() >= '75') && ($cart->show_total() < '100')) { 

   $info_box_contents[] = array('align' => 'center', 

                                'text'  => FREESHIPPING_1 

                               ); 

  }else if ($cart->show_total() >= '100'){ 

   $info_box_contents[] = array('align' => 'center', 

                                'text'  => FREESHIPPING_2 

                               );

 }



 new infoBox($info_box_contents);

?>

           </td>

         </tr>

<!-- shopping_cart_eof //-->

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×