![]() |
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. |
Re: Feature help: This much until free shipping.
Try something like this:
Code:
{if $cart.discounted_subtotal gt 300.00} |
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 |
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} |
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.
|
All times are GMT -8. The time now is 03:25 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.