Jump to content

[Solved] How to change the order of tpl files in product listing page?


Recommended Posts

Hello all,

I am developing my first theme in prestashop. I noticed on the product page product listing page prestashop adds several tpl files namely, productsort.tpl, breadcrumb.tpl, etc. My breadcrumb.tpl has different structure, but that's no problem -- I can change it inside the breadcrumb.tpl to make it work. But the problem is that my breadcrumb.tpl comes much later inside the page. I can add include file=breadcrumb.tpl but by default prestashop adds breadcrumb.tpl again and much earlier. What I mean is this:

Prestashop tpl order:

1. Productsort.tpl
2. Breadcrumb.tpl
3. product.tpl

And my theme:

1. Breadcrumb
2. Sidebar
3. productsort
4. productinfo

How can I achieve this? I don't want to edit any core file, if that's not extremely necessary. TIA

Edited by abhisek (see edit history)
Link to comment
Share on other sites

I am using PS1.5. There's a file named product-sort.tpl inside the default theme. These files are added to the product page by prestashop system. I just want to change the order of these files. That's all.

by default product-sort.tpl file is not attached to product page.

Link to comment
Share on other sites

ok thank you so much for clarification! now it's clear.

 

open category.tpl file

you've got there:
 

{include file="$tpl_dir./breadcrumb.tpl"}
{include file="$tpl_dir./errors.tpl"}
...
{include file="$tpl_dir./category-count.tpl"}
...
{include file="$tpl_dir./pagination.tpl"}
...
{include file="./product-list.tpl" products=$products}
...
{include file="./product-sort.tpl"}
{include file="./product-compare.tpl"}
{include file="./nbr-product-page.tpl"}
...
 
 
change order of these files :)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...