{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{def $multiprice = $attribute.content
     $price_list = $multiprice.inc_vat_price_list
     $currency_list = $multiprice.currency_list
     $currency = false()}

    {if $multiprice.has_discount}
        {def $discount_price_list = $multiprice.discount_inc_vat_price_list
             $price = false()}
        <table cellspacing="10">
            <tr>
                <th>Currency</th>
                <th>Price</th>
                <th>Your price</th>
                <th>Your save</th>
            </tr>

            {foreach $discount_price_list as $pos => $discount_price}
                {set price = $price_list[$pos]
                     currency = $currency_list[$price.currency_code]}
                <tr>
                    <td>{$price.currency_code}</td>
                    <td><strike>{$price.value|l10n( 'currency', $currency.locale, '' )}</strike></td>
                    <td>{$discount_price.value|l10n( 'currency', $currency.locale, '' )}</td>
                    <td>{sub($price.value, $discount_price.value)|l10n( 'currency', $currency.locale, '' )} ( {$multiprice.discount_percent} % )</td>
                </tr>
            {/foreach}
        </table>
    {else}
        {'Price'|i18n( 'design/standard/content/datatype' )}: <br />
        {def $price_value = ''}
        {foreach $price_list as $price}
            {set currency = $currency_list[$price.currency_code]}
            {if gt($price.value, 0)}
                {set price_value = $price.value|l10n( 'currency', $currency.locale, $currency.symbol )}
            {else}
                {set price_value = 'N/A'|i18n( 'design/standard/content/datatype' )}
            {/if}
            {if eq( $price.type, 2 )}
                {* Auto price *}
                <i>{$price_value}</i><p>
            {else}
                {* Custom price *}
                {$price_value}<p>
            {/if}
        {/foreach}
        {undef $price_value}
    {/if}
{undef}
