This relates to Magento 2.1.3. In final_price.phtml, when there is a special price, the regular price (or "old price") is also displayed.
Currently, my shop is set to display prices Excluding and Including Tax. The special price shows as both Excluding and Including, but the regular price shows only Including.
I need to change this so that I have the regular prices shown as either Excluding tax only, or both Excluding and Including tax.
The default code to display the regular price is:
<span class="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
]); ?>
</span>
Unless I have missed a trick, it doesn't appear possible to change much in the behaviour/format of the amount rendering process. I've checked Magento's documentation for the pricing model which doesn't appear to have an answer for this situation.
The only way I've found is to remove the "skip_adjustments" line. This causes both Regular ex-vat and inc-vat prices to show, but it has a nasty unwanted side effect: on the Product page, the special price will be adjusted by JavaScript to the regular price. This renders this method pretty much unworkable.
Is there a better way to achieve this?