0

I have made a wholesale tier price table for the B2B group customers according to this (tier price table), but I cannot make the new script in tier_prices.phtml render on the product page. Instead, it still renders the phtml file from vendor / magento module directory.

Here is the path: <theme_dir>/<Magento_Catalog>/<templates>/<product>/<price>/tier_prices.phtml

I am not sure how to move the templates file under base to child theme. Do I need anything else than just moving the phtml to templates?

  • Hi @sharon, you are doing it right. make sure you are doing this in current/child theme. – Ramkishan Suthar Nov 11 '18 at 7:11
  • Hi @Ramkishan, I tested to override other template files in web on the same theme, and it works, but not this particular tier_prices.phtml file. I used the developer tool to check the file path and block on product page, and it is still rendering the default file. I also did the setup:upgrade and clean cache multiple. Nothing happen. Very frustrated now. – Sharon Hu Bach Nov 11 '18 at 7:16
  • Your file path is correct. Let me try this with my theme at local. – Ramkishan Suthar Nov 11 '18 at 7:21
0

Okay, I finally found out in Magento 2.2.6 there is another default module for configurable product specifically:

module-configurable-product

in vendor/magento directory. So basically copy

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

to

theme_dir/Magento_ConfigurableProduct/templates/product/price/tier_price.phtml

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.