Hi I want to add "VAT excl " text after the product price in single product page . How can i do this . Which file i need to edit . Please suggest the correct path
app/design/frontend/mythemes/default/Magento_Catalog/templates/
Method - 1: If you want to display custom text only in product view page, then create catalog_product_view.xml in your custom theme
app/design/frontend/Vendor/theme/Magento_Catalog/layout/catalog_product_view.xml
<?xml version="1.0" ?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="product.info.main">
<block class="Magento\Framework\View\Element\Template" name="custom.text" template="Magento_Catalog::view/customtext.phtml" after="product.info.price"/>
</referenceContainer>
</body>
</page>
Now create customtext.phtml and add your custom text
app/design/frontend/Vendor/theme/Magento_Catalog/templates/view/customtext.phtml
Now flush the cache and check
Method - 2: If you want to display custom text after price at everywhere then override final_price.phtml
FROM
vendor/magento/module-catalog/view/base/templates/product/price/final_price.phtml
TO
app/design/frontend/Vendor/theme/Magento_Catalog/templates/product/price/final_price.phtml
Method - 3: Last and the most simple way to do it with CSS
.product-info-price .price:after {
content: 'Custom Text';
}