FastEddy Posted March 4, 2003 Share Posted March 4, 2003 Is there a contribution that will ad how many more $$ needed to get free shipping in the shopping cart? -Ed Quote Link to comment Share on other sites More sharing options...
gdfwilliams Posted March 4, 2003 Share Posted March 4, 2003 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. Quote Link to comment Share on other sites More sharing options...
FastEddy Posted March 4, 2003 Author Share Posted March 4, 2003 Thats an interesting way to go about it. I will give it a try. Once again, Thanks. -Ed Quote Link to comment Share on other sites More sharing options...
FastEddy Posted March 4, 2003 Author Share Posted March 4, 2003 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 //--> Quote Link to comment Share on other sites More sharing options...
gdfwilliams Posted March 4, 2003 Share Posted March 4, 2003 of course, you can set the 75 and 100 to whatever are applicable to your site. Quote Link to comment Share on other sites More sharing options...
gdfwilliams Posted March 4, 2003 Share Posted March 4, 2003 try putting another } right before new infoBox($info_box_contents); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.