1

I am working with Magento 1.9 and it has this code (in php, file price.phtml) to echo price in category and product view page:

<?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>

//echo 199,00€

Now I need to display the first number (before comma 199,) bigger than rest number (00€)

Maybe I need a separate class for number before comma and the rest.

Any idea?

Alexikakos
  • 23
  • 5
  • Not sure what the limitations are with Magento, but you could use jQuery to select the last three characters and put them in a span with a separate class, which has a smaller font size – CalvT Apr 20 '17 at 11:08
  • How about this: http://stackoverflow.com/a/1125740/7605325 ? –  Apr 20 '17 at 12:27

1 Answers1

0

You can use following code

<span class='large'><?php echo str_replace(",",",</span><span class='small'>",$_coreHelper->currency($_finalPriceInclTax, true, false)); ?></span>

CSS PART

.large { font-size : 16px; }
.small { font-size : 12px; } 
Bachcha Singh
  • 3,850
  • 3
  • 24
  • 38