Announcement

Collapse
No announcement yet.

How do I include a second currency (e.g. Euros) in my permutation prices?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I include a second currency (e.g. Euros) in my permutation prices?

    It is possible to display a second currency for standard product prices (within 'Business Settings | Options') but these dual currencies do not show for prices within drop down lists by default.

    It's possible to do this with the following fix:

    First of all create a new variable (via 'Design | Library | Variables') called 'EuroRate'. This variable needs to have a 'Place of Setting' of 'Site' and also needs to have a 'Type' of 'Number'. For more details on creating variables, look at the main help in Actinic under 'Understanding Variables'.

    Then set a value of 'EuroRate' within 'Settings | Site Options' of whatever you want your exchange rate to be.

    Finally go to 'Design | Library | Layouts' and find the 'Permutation Prices' group in the library. Edit the 'Additional Price in Brackets' layout and replace the whole of the layout with the following code:

    <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedPricesAreUsed%22%20%2f%3e%20%3d%3d%20FALSE" >
    ( <actinic:block PHP='true' SELECTABLE='false'>
    formattedcurrency(<actinic:variable name="PermutationPriceRaw" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');
    formattedcurrency(<actinic:variable name="PermutationPriceRaw" /> * <actinic:variable name="EuroRate" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', ' %u20AC');
    </actinic:block>)
    </actinic:block>
    <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedPricesAreUsed%22%20%2f%3e" />
    ( <actinic:block PHP='true' SELECTABLE='false'>
    formattedcurrency(<actinic:variable name="AssociatedProduct::ProductPriceRaw" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');
    formattedcurrency(<actinic:variable name="AssociatedProduct::ProductPriceRaw" /> * <actinic:variable name="EuroRate" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', ' %u20AC');
    </actinic:block>)
    </actinic:block>


    You can now click 'OK' on the layout and check your preview.

    Thanks to Norman Rouxel at DrillPine (http://www.drillpine.biz/) for this solution.
Working...
X