Wrap euro simbol in prices (Magento)


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. /**
  2.  * Envuelve el simbolo del euro en un <sup>, para mostrarlo correctamente (superindice)
  3.  * tanto en listado de productos como en ficha de producto
  4.  */
  5. function initOptimiceCurrency(){
  6. jQuery('.products-grid .price, .product-shop .price').each(function(){
  7. var h = jQuery(this).html();
  8. h = jQuery.trim(h);
  9. var c = h.charAt(h.length-1);
  10. var repl = '<sup>'+c+'</sup>';
  11. h = h.replace(' ', '');
  12. h = h.replace('‚¬',repl);
  13. jQuery(this).html(h);
  14. });
  15. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.