2

From:

/vendor/magento/module-configurable-product/view/base/templates/product/price/tier_price.phtml

To:

/app/design/frontend/Mgs/claue_child/Magento_Catalog/templates/product/tier_price.phtml

I create child theme now want to extend few files but i am stuck.

Flushed cache and added the site in developer mode.

Tried : How to overwrite tier_price.phtml in Magento 2

Update Solution: Correct path:

app/design/frontend/Mgs/claue_child/Magento_ConfigurableProduct/templates/product/price/tier_price.phtml

Command used : sudo rm -rf var/ && sudo rm -rf pub/static && sudo php bin/magento setup:static-content:deploy -f && sudo php bin/magento cache:flush && sudo chown www-data:www-data -R *

Thank you @chirag-patel and @ylgen-guxholli for your support.

  • have you got solution or need some more clearification? – Chirag Patel Feb 26 at 13:33
0

Did you removed generated and static files ?

rm -rf generated/*
rm -rf pub/static/*

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f

Add the price directory in your override

/app/design/frontend/Mgs/claue_child/Magento_ConfigurableProduct/templates/product/price/tier_price.phtml

and see if your theme is generating the static files.

  • I am in developer mode, still i executed this , but no changes – inrsaurabh Feb 26 at 12:57
  • updated my answer , you forgot to add price directory in your override , make the commads i added and it will be ok – Ylgen Guxholli Feb 26 at 12:58
  • Added that price folder still same issues even after running above all commands again – inrsaurabh Feb 26 at 13:08
  • is your theme even generated ? – Ylgen Guxholli Feb 26 at 13:09
  • 1
    My child theme is working. I even extended the one file at this location : app/design/frontend/Mgs/claue_child/Magento_Catalog/templates/product/list.phtml – inrsaurabh Feb 27 at 3:55
2

You define wrong at Magento_Catalog because core file path is belongs to from module-configurable-product module and you write Magento_Catalog so no file found tier_price.phtml in Magento_Catalog core module.

You have to write Magento_Configurable_Product insted of Magento_Catalog

Try with below way.

/app/design/frontend/Mgs/claue_child/Magento_Configurable_Product/templates/product/price/tier_price.phtml

Remove /var & /generated folder then run below command.

php bin/magento c:f

php bin/magento c:c

  • I corrected my path in child theme , removed var folder , cleaned cache still no success. – inrsaurabh Feb 27 at 3:52
  • Finally its done correct path will be app/design/frontend/Mgs/claue_child/Magento_ConfigurableProduct/templates/product/price/ – inrsaurabh Feb 27 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.