Hi,
I want to change the price layout all over the site.
I want to change the font-size of the value before comma/point and after comma/point.
even if the currency sign is before or after the value.
(€ 4,00 , £ 4.00, 4,00 €)
So how to make the '4' larger and the '00' smaller
I now use the template:
app/design/frontend/<mytemplate>/Magento_Catalog/templates/product/price/amount/default.phtml
added:
<?php
$priceproduct = $block->formatCurrency($block->getDisplayValue(), (bool) $block->getIncludeContainer());
if (strpos($priceproduct, ',') !== false) {
$pricearr = explode(",", $priceproduct);
$pricesplit = $pricearr[0] . "</span><span class='price-upper'>," . $pricearr[1] ."</span>";
}else if (strpos($priceproduct, '.') !== false) {
$pricearr = explode(".", $priceproduct);
$pricesplit = $pricearr[0] . "</span><span class='price-upper'>." . $pricearr[1] ."</span>";
} else {
// $pricelower = $priceproduct;
$pricesplit = $priceproduct;
}
?>
....
<!-- ADDED PRICE-->
<?= /* @escapeNotVerified */ $pricesplit; ?>
<!-- END ADDED PRICE-->
It works fine for NL and EN language, but nog for FR.
And also not all over the site, like basket etc.
Is this the right way to do this?
Eric