<{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 $countries[c] && ! $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}> <{* Grænsen som kassen bruger den: kundens land, ellers standardlandet, og fragtmetodens egen grænse *}> <{if isset($free_shipping_limit)}> <{assign var="free_shipping_above" value=$free_shipping_limit}> <{/if}> <{* Tilkøb kan være undtaget fra fri fragt-grænsen *}> <{assign var="basket_value" value=$free_shipping_price|default:$price}> <{if $free_shipping_above}> <{math assign="basket_value_needed_for_free_shipping" equation="x - y" x=$free_shipping_above y=$basket_value}> <{if $basket_value_needed_for_free_shipping < 0.01}><{assign var="basket_value_needed_for_free_shipping" value=0.01}><{/if}> <{/if}>
<{* Ingen grænse i kundens land: ingen besked *}> <{if $free_shipping_above && ($basket_value >= $notice_threshold || $notice_threshold == 0)}> <{if $never_free_shipping}> <{capture name="alert_text"}> <{t section="Alert"}>Et eller flere produkter i din kurv er ikke berettiget til gratis fragt.<{/t}> <{/capture}> <{include file="components/alert.html" margin="b" variant="info" text=$smarty.capture.alert_text}> <{* Kassen giver først fri fragt, når kurven er OVER grænsen *}> <{elseif $basket_value > 0 && $basket_value <= $free_shipping_above}> <{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}>Du mangler {x} {y} for gratis fragt.<{/t}> <{/capture}> <{include file="components/alert.html" margin="b" variant="info" text=$smarty.capture.alert_text}> <{elseif $basket_value > $free_shipping_above}> <{capture name="alert_text"}> <{t section="Alert"}>Du har opnået gratis fragt.<{/t}> <{/capture}> <{capture name="alert_action"}> <{t section="Alert"}>Gå til kassen<{/t}> <{/capture}> <{include file="components/alert.html" variant="success" text=$smarty.capture.alert_text action=$smarty.capture.alert_action}> <{/if}> <{/if}>
<{/if}>