Massimo Tamburini
Massimo Tamburini

Reputation: 43

Override template

I am looking to create a module for a customer, but I have to override the product_variants.tpl from the prestashop classic theme.

I have two questions:

Thanks in advance!

Upvotes: 0

Views: 1824

Answers (1)

KoreLewi
KoreLewi

Reputation: 447

There is no officially way to override the core template files of the theme from module. The best way is to create a child theme, and override only the files you need. https://devdocs.prestashop.com/1.7/themes/reference/template-inheritance/parent-child-feature/

The answer to the second question is yes. And it works correctly, because each theme has its own structure, and it's possible that the modifications you've made to the old theme might cause the new theme to not work properly.

Upvotes: 1

Related Questions