Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

? more $$ needed


FastEddy

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.

Link to comment
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 //-->

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...