Jump to content

Edit History

Takuya

Takuya

Hi,

See link below, it's actually very simple to do ...

https://devdocs.prestashop.com/1.7/themes/reference/templates/templates-layouts/

Specific templates

If you’re working on a big store in many languages you may need to change the layout of the page depending on the language.

For example you want a different product page for american customers and japanese ones. In this case you simply have to create new template product.tpl and place it in the right folder.

When searching for a template, PrestaShop will check many location to determine which file should be used. It make it very easy to have different template for a given locale or a specific entity id.

With the product page, the core will check the following locations (in order) and return the first template found:

Example with a product with ID = 3 and locale = en-US

  1. en-US/catalog/product-3.tpl
  2. catalog/product-3.tpl
  3. en/US/catalog/listing/product.tpl
  4. catalog/listing/product.tpl

Another example with category template for the category with ID = 9 and locale = en-US.

  1. en-US/catalog/listing/category-9.tpl
  2. catalog/listing/category-9.tpl
  3. en/US/catalog/listing/category.tpl
  4. catalog/listing/category.tpl
  5. en-US/catalog/listing/product-list.tpl
  6. catalog/listing/product-list.tpl

Kind regards,

×
×
  • Create New...