Prints the symbol of the currency selected in the theme.

Kuvaus

By default, product prices are indicated in euros in all MyCashflow online stores. You can display prices converted to the desired currency in the theme by using the Currency Converter extension.

Syntaksi

{CurrencySymbol(
    exchanged: boolean
)}

Näkyvyys

Toimii näkyvyydessä: globaali

Tags with global scope can be used on any template and in any tag.

Printing the product price information – example

<div class="product-price-details">
    <p>
    {ProductPrice(
        html: false,
        after: ' {CurrencySymbol}'
    )} (incl. VAT 24%)<br>
    <span class="no-tax-price">
        Ilman alv. {ProductPrice(
            html: false,
            includetax: false,
            after: ' {CurrencySymbol}'
        )}
    </span>
    </p>
</div>              

The above code illustrates one way to print product prices on an online store's product page.

You can easily print product prices by using the collection tag {ProductPrices}.

In the example, the product price including tax is printed by using the {ProductPrice} tag, whose includetax attribute's value is true by default.

After the price including tax, the currency symbol is printed by using the {CurrencySymbol} tag in the after attribute. The currency symbol could also be printed by using the {ProductPrice} tag's currencysymbol attribute.

You may also want to print tax-free prices after prices including tax. In fact, this can be done by using the same Interface markup by setting the value of the {ProductPrice} tag's includetax attribute to false.

Attribuutit

exchanged:

Specifies which symbol to display: the default euro symbol or the symbol of the currency selected by the customer.

The exchanged attribute is used only if the Currency Converter extension is in use.

This attribute works only after the customer has placed an order. So, you can use the attribute in order templates and e.g. inside the order products' tags.

Allowed values:true/false. The default value is false.

The content is always printed in euros if the value is false.

after/before:

By using the after and before attributes you can define content that is output either after or before the tag's output.

Allowed values:HTML and Interface markup.

E.g.

  • before: '<p>Tämä merkkaus näkyy ennen tagin omaa sisältöä.</p>'
  • after: '<p>Tämä taas näkyy tagin oman sisällön jälkeen.</p>'

If the tag does not produce any content, neither the content of the after and before attributes will be output.

escape:

Adds an escape character before quotation marks in the output.

The attribute makes it easier to process the tag-produced content when using JavaScript.

Allowed values:true/false. The default value is false.

or:

Defines alternative content that is displayed if the tag itself does not produce any content.

Allowed values:HTML and Interface markup.

E.g. or:'Sisältöä ei löytynyt.'