Some prices set as integer value, some - as float.
i want to display integer values without decimals, decimals is redundant for them.
but, float price values must be displayed with decimals.
https://prnt.sc/wllthf
it is possible?
In your example both are float values, the one You call integer just happens to have the (rounded) decimal part == 0.
You have to make some kind of php snippet that checks if the price does not have a decimal part == 0 and display with zero decimals. This would probably be done in prices.php of your template, if I remember correctly.
Jörgen @ Kreativ Fotografi
thanks, i used
<?= str_replace(",00","",$currency->createPriceDiv('salesPrice', ' itemprop="price" ', $product->prices, false, false, 1.0, true)) ?>
Thanks for returning, this is a useful solution. There may be more efficient ones. But I appreciate the simplicity.
I will mark this as solved
Jörgen @ Kreativ Fotografi
Quote from: d0ublezer0 on January 12, 2021, 10:48:24 AM
thanks, i used
<?= str_replace(",00","",$currency->createPriceDiv('salesPrice', ' itemprop="price" ', $product->prices, false, false, 1.0, true)) ?>
where did you set this? and in which file?
what ever file your template uses to display prices .. normally sublayout/prices.php