I'm using the code below to display on the products pages the total number and price of items. works great.
- Code: Select all
<script language="javascript">
if ( Cart_is_empty()) {
document.write('Your cart is empty.');
} else {
document.write('In your cart:<p>');
Print_total_products(true);
document.write(', ');
Print_total(true);
document.write('<p>Applicable shipping and taxes extra.<p>');
document.write('<a href="managecart.html">View Cart</a>');
}
</script>
Also I use in the nopcart.js file the fixed shipping calculation:
- Code: Select all
//***** Begin fixed shipping calculation
if (fTotal >= 300) // If the total is 300 or more - shipping if FREE
fShipping = 0;
else
fShipping = 35; // If the total is less than 300 - shipping is 35.00
//***** End fixed shipping calculation
I would like to add on the products pages a line like that:
"You are XXX.00 $ from free shipping"
where it will evaluate (fTotal (in my case 300) - total price of items)
and if the total price of items is >= 300 the line should write "Your order is free of shipping charges"
Can anyone write this code please
Tnx
Danny
