<{assign var="enable" value=$settings.shipping.enable_free_shipping_notice}> <{if $enable}> <{assign var="countries" value=$webshop->getCountries()}> <{assign var="free_shipping_possible" value=false}> <{assign var="free_shipping_above" value=false}> <{assign var="notice_threshold" value=$settings.shipping.free_shipping_notice_threshold|default:0}> <{section name="c" loop=$countries}> <{if ! $free_shipping_above}> <{assign var="country_id" value=$countries[c]->getCountryId()}> <{if $country_id == $session_del.country_id}> <{assign var="free_shipping_possible" value=$countries[c]->getFreeAbove()}> <{assign var="shipping_country" value=$countries[c]->getName()}> <{if $free_shipping_possible}> <{assign var="free_shipping_above" value=$free_shipping_possible}> <{/if}> <{/if}> <{/if}> <{/section}> <{assign var="basket_value" value=$price}> <{math assign="basket_value_needed_for_free_shipping" equation="x - y" x=$free_shipping_above y=$basket_value}>
<{if $basket_value >= $notice_threshold || $notice_threshold == 0}> <{if $never_free_shipping}> <{capture name="alert_text"}> <{t section="Alert"}>One or more products in your basket is not eligible for free shipping.<{/t}> <{/capture}> <{include file="components/alert.html" margin="b" variant="info" text=$smarty.capture.alert_text}> <{elseif $basket_value < $free_shipping_above && $basket_value > 0 }> <{capture name="alert_text"}> <{t section="Alert" x=$basket_value_needed_for_free_shipping|number_format:2:$smarty.capture.decimal:$smarty.capture.thousand y=$currency}>You are {x} {y} from free shipping.<{/t}> <{/capture}> <{include file="components/alert.html" margin="b" variant="info" text=$smarty.capture.alert_text}> <{elseif $basket_value >= $basket_value_needed_for_free_shipping}> <{capture name="alert_text"}> <{t section="Alert"}>You are eligible for free shipping.<{/t}> <{/capture}> <{capture name="alert_action"}> <{t section="Alert"}>Go to checkout<{/t}> <{/capture}> <{include file="components/alert.html" variant="success" text=$smarty.capture.alert_text action=$smarty.capture.alert_action}> <{/if}> <{/if}>
<{/if}>