| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Feature help: This much until free shipping. | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Feature help: This much until free shipping.
Hi,
My apologies if this mentioned somewhere else in the forum - couldn't find it. I've got my cart set to give free shipping to orders over $300. What I want is a blurb that says "$xx until you qualify for free shipping". I think I know how to test if the total is less than a certain amount ({if $minicart_total_cost < 300}), but I don't know how to calculate the amount remaining. I assume I need to add it to a function somewhere. Can someone help? Thanks.
__________________
-- Version 4.0.17 Gold Version 4.1 Gold Version 4.4 Gold |
|||||||||
#2
|
|||||||
|
|||||||
Re: Feature help: This much until free shipping.
Try something like this:
Code:
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Feature help: This much until free shipping.
Thanks for the quick reply. I got the following error:
Spend an additional Warning: Smarty error: math ``x - y'' in ``.../new_offers_short_list.tpl'': parameter ``y'' is empty in .../Smarty-2.6.12/Smarty.class.php on line 1095 to qualify for Free Shipping
__________________
-- Version 4.0.17 Gold Version 4.1 Gold Version 4.4 Gold |
|||||||||
#4
|
|||||||||
|
|||||||||
Re: Feature help: This much until free shipping.
I managed to make it work by using $minicart_total_cost. Maybe not ideal, but works.
{if $minicart_total_cost gt 300.00} <div style="font-weight: bold; color:red;">Congratulations, you qualify for free shipping!</div> {else} <div style="font-weight: bold; color:red;">Spend an additional ${math equation="x - y" x=300.00 y=$minicart_total_cost} to qualify for Free Shipping</div> {/if}
__________________
-- Version 4.0.17 Gold Version 4.1 Gold Version 4.4 Gold |
|||||||||
#5
|
|||||||
|
|||||||
Re: Feature help: This much until free shipping.
The solution I posted was for 4.0 - 4.1 uses a different smarty variable I believe. Be careful about the minicart total - you want subtotal, not total as if shipping is already added in it will throw off the calculation.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|