Here you can learn how to implement Currency Converter's different functionalities in the theme for your MyCashflow online store.

Adding a currency selector to your store theme

You can add the currency selector to your store theme by using the {CurrencyNavigation} tag.

For instance, in the Barebones default theme, the currency selector has been added to the helpers/header.html file. Using the Barebones theme's MainNavigation class ensures that the selector's design is in line with other menus in the online store. The example below illustrates how the currency selector has been implemented in the Barebones theme.

{CurrencyNavigation(
	before: '
		<div class="FlexItem">
			<div class="MainNavigation MainNavigation-Right">
				<ul>
					<li class="HasSubCategories">
						<a>{Currency}</a>',
	after: '
					</li>
				</ul>
			</div>
		</div>'
)}

The currency selector is implemented as a <ul> list, with the currently enabled currency as its first item implemented by using the {Currency} tag. The example below shows what the currency selector looks like in Barebones.

Displaying converted product prices

The {ProductPrices} tag, which is often used for displaying prices, always displays the price converted to the currency selected by the visitor. If you use any other tags for displaying prices (such as {ProductPrice}), make sure that the tag has the attribute currencysymbol: true. See the example below:

{ProductPrice(
    currencysymbol: true
)}

Adding the currency notification to checkout

If the customer selects a currency other than the euro, MyCashflow's built-in single-page and multi-page checkouts will display a warning that the payment will be transferred in euros. The notification can be added to the store theme by using the {CurrencyNotification} tag in the checkout template (e.g. themes/shop/THEME/checkout/singlepage.html).