Is it possible to get the price without currency symbol, or a way to put a div around the currency symbol to hide it with css?
$block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer())
If I remove the $block->formatCurrency I get the price without currency symbol, but a 1 will be added at the end of the price.
So I would like to put a div around the currency symbol and hide it with CSS.
Someone who can help me with that?
EDIT: I also want to add ,- behind the price.
Best Answer
Yes it is possible to get price without currency symbol by using below approach
Instantiate
\Magento\Directory\Model\Currency $priceCurrencyFormat
class in constructor and use below codeIn second param of format() func you can also customize the price precision based on your requirement.
You could also use below code to get your result, but it is not a good approach