slimsteve Posted November 14, 2004 Posted November 14, 2004 Hi, I am new to oscommerce and I am learning the ropes. Can anyone tell me how I can get just the current cart total displayed on the page. I have been looking through the files and cannot seem to find it anywhere. Bascially what I was hoping to do is get the order total and then compare it to a set value (using my PHP script) and then display a banner with a message about it i.e. add another 10.00 to your order to get free carriage. Any Help appreciated Slim Quote
boxtel Posted December 5, 2004 Posted December 5, 2004 Hi, I am new to oscommerce and I am learning the ropes. Can anyone tell me how I can get just the current cart total displayed on the page. I have been looking through the files and cannot seem to find it anywhere. Bascially what I was hoping to do is get the order total and then compare it to a set value (using my PHP script) and then display a banner with a message about it i.e. add another 10.00 to your order to get free carriage. Any Help appreciated Slim <{POST_SNAPBACK}> I use something like that: if you go to www.crystallight.com.tw add something to your cart, you will see a message about how far you are from free shipping. This is done by the following code in the shopping cart: <?php if ($cart->show_total() < MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) { $difference = MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER - $cart->show_total(); ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <table width=100% bgcolor=#9999FF cellspacing=0.5 border=0> <tr> <td> <table width=100% bgcolor=#FFFFFF border=0> <tr> <td align="right" valign="middle" width="10%"><img src=images/info_blue_small.jpg alt="FREE Shipping" title="FREE Shipping"></td> <td width="5%"></td> <td align="left" class="boxtext"><?php echo YOO_ARE_ONLY;?><?php echo $currencies->format($difference); ?><?php echo AWAY_FROM;?></td> </tr> </table> </td> </tr> </table </td> </tr> Quote Treasurer MFC
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.
Note: Your post will require moderator approval before it will be visible.