$(function() { $('.price').each(function() { if($(this).children('span').length && $(this).find('em').length && $(this).find('.saving').length) { var old = parseFloat($(this).children('span').text().replace(/\s+/, '')); var now = parseFloat($(this).find('em').text().replace(/\s+/, '')); var saving = number_format(old - now, 0, '.', ' '); $(this).find('.saving').text(saving + ' руб.'); } }); });
после в шаблон "Товары" после строки
<div class="price fnt12b txtalgnlft">
можете добавить
<div class="saving"></div>
после внутрь блока saving будет вставлена цена экономии.