i'd like to make old (regular) price crossed out. as i understand, here is output:
vendor/magento/module-configurable-product/view/base/templates/product/price/final_price.phtml
<span class="old-price sly-old-price">
<?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [
'display_label' => __('Regular Price'),
'price_id' => $block->getPriceId('old-price-' . $idSuffix),
'price_type' => 'oldPrice',
'include_container' => true,
'skip_adjustments' => true
]); ?>
i have found style for old-price
here:
var/view_preprocessed/pub/static/frontend/Magento/luma/en_US/Magento_Catalog/css/source/_module.less
and changed it like that:
.old-price {
.price-wrapper .price {
.lib-font-size(20);
font-weight: @font-weight__light;
text-decoration:line-through;
}
}
however, nothing changed. what i did wrong? p.s. this is done.
also, will really appreciate if you advise how to add custom style for percentage block below:
> $_finalPrice =$_product->getFinalPrice(); $_price = $simplePrice; if($_finalPrice < $_price) { $_savingPercent = 100 -
> round(($_finalPrice / $_price)*100); echo __('Your save:
> ').$_savingPercent . '%';
>
> } ?>