Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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

  • 3 weeks later...
Posted
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

 

 

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>

Treasurer MFC

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.

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...