<{$text|default:'Alert Message'}>
<{if $action}>
<{$action|default:'Action Text'}>
<{/if}> <{if $icon}> <{capture name="campaign_message" }> <{* use single quotes for classes *}>

<{t}>There is a possibility for following campaign discounts:<{/t}>

<{foreach from=$campaignArr item=$campaign}>

<{$campaign->getName()}>: <{if $campaign->getPercent()}> <{t x=$campaign->getPercent()}>Save up to {x}%<{/t}> <{elseif $campaign->getPrice()}> <{t x=$campaign->getPrice()}>Save up to {x} <{$webshop->getCurrency()}><{/t}> <{elseif $campaign->getPriceModel()}> <{t x=$campaign->getPriceModel()}>Get the cheapest product free when purchasing {x} or more<{/t}> <{/if}>

<{$campaign->getDescription()}> <{if $campaign->getExpires()}>

Campaign lasts until <{$campaign->getExpires()|date_format:'%Y-%m-%d %H:%M:%S'}>

<{/if}>
<{/foreach}>
<{/capture}> <{capture name="open_campaign_modal"}> $dispatch('modal', {open: true, type: 'campaign', title: '<{t}>Campaign discounts<{/t}>', message: '<{$smarty.capture.campaign_message|escape:javascript}>'}); <{/capture}> <{include file="components/button.html" variant="icon" text_hidden=true xclick=$smarty.capture.open_campaign_modal}> <{/if}>