I would like to add a the currency symbol to a CMS block on a category page or in the category description.
It would be something like under €50 or under $50.
Is there a simple way to do this with a CMS directive? i.e.
{{store_currency}}
Perhaps it's possible with a widget?
Otherwise I was thinking of using a custom variable but this would only work on a store view level and not if the customer changes currency within the store view.
Another option I thought of was to add a CSS class to the tag depending on what currency is selected and use that to hide and display the right currency symbols.
But is there an more straight forward way of doing this? with a cms directive or widget?
Best Answer
You can do this by creating new widget. Check here : Creating Widget
Here you can place your code at
Envato_WidgetLinks_Block_Links
block's_toHtml()
method, that returns current store's Currency symbol.Otherwise, (a bit of Hack)
You can add some text to your static block, like
[[CURRENCY_SYMBOL]]
and replace it with currency symbol using PHPstr_replace
function, like: