2

Magento2 how I am supposed to override renderer.phtml of module swatches?

I have already tried Magento_Swatches::product/listing/renderer.phtml, but doesn't seem to be working?

Any advice will be appreciated.

5
  • Where did you put your overrid file? Oct 26, 2020 at 7:21
  • in the theme folder
    – Arjun
    Oct 26, 2020 at 7:42
  • if you have added in app/design/frontend/Vendor/Theme/Magento_Swatches/templates/product/listing/renderer.phtml then it should work. Please confirm Oct 26, 2020 at 7:44
  • Thanks @ShoaibMunir it worked. I forgot to add templates in between
    – Arjun
    Oct 26, 2020 at 8:46
  • Great, I am adding this in answer Oct 26, 2020 at 9:11

2 Answers 2

1

Please make sure you have added your file in this location

app/design/frontend/Vendor/Theme/Magento_Swatches/templates/product/listing/renderer.phtml

This should work.

0

But you can override from your custom module. Need create Module with sequence Magento_Swatches and create file in similar location app/code/Namespace/Module/view/templates/product/listing/renderer.phtml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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