How to change product price to custom text Magento 2

Magento Asked on January 2, 2022

I am planning to change product price from
Category view and product page to “coming soon” I have a new product attribute which I have created and I can see that when I edit product page from admin area.
If I enable that attribute the price is meant to change from the amount to “coming soon”

This is my Di.xml file

    <?xml version="1.0"?>
<config xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <!-- Product page -->
    <type name="MagentoCatalogModelProduct">
        <plugin name="change_product" type="[vendor][module]PluginModelProduct"/>

    <!-- Price changed in category level -->
    <type name="MagentoCatalogBlockProductListProduct">
        <plugin name="cataloghideprice_finalpricebox" type="[vendor][module]BlockProductListProduct" />


The category level works perfectly
I can see coming soon, but the issue I am having is product page isn’t changing

Please can someone direct me to the right path.

One Answer

  1. You need to create catalog_product_prices.xml into your extension on following path : vendorExtensionviewbaselayoutcatalog_product_prices.xml

  2. Now copy the orginal file content catalog_product_prices.xml from following location : vendormagentomodule-catalogviewbaselayoutcatalog_product_prices.xml

  3. Now replace following line

    <item name="default_amount_render_template" xsi:type="string">Magento_Catalog::product/price/amount/default.phtml</item>

    with this :

    <item name="default_amount_render_template" xsi:type="string">Vendor_Extension::product/price/amount/default.phtml</item>
  4. Now copy the template file from



  5. Now apply your logic into this file :


Answered by Dhiren Vasoya on January 2, 2022

Add your own answers!

Related Questions

How to show downloadable links in a block?

0  Asked on January 16, 2021 by kamzata


Magento tax_class_id not importing

1  Asked on January 15, 2021 by sushivam


How to add firebase cdn’s in magento2?

0  Asked on January 15, 2021 by usama-sohail


Paypal log error

1  Asked on January 14, 2021 by fja3omega


Enable Dynamic price in bundle product

1  Asked on January 9, 2021 by miguel-angel-espinosa-garca


Magento 2 hidden products

1  Asked on January 6, 2021 by ramesh-kr


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP