Jump to content

Changes at category products display


Recommended Posts

Hello everyone, I am trying to modify the product display when you are inside a category, I want only to display one product per category so I want to show products as shown in product.tpl and not as product-list.tpl.


I have change this part of the code at category.tpl:

{include file="./product-list.tpl" products=$products}

with this:

{include file="./product.tpl" products=$products}

Then I have modified the CategoryController.php and change its content with the code from ProductController.php, I think this modification is quite simple and it is not working at the moment, the category page shows Error 1. Product not found.


I don't know if it is very difficult trying to do this, hope someone could help. Thank you.

Link to comment
Share on other sites

it will not work.

$products variable in product-list.tpl is treated as an array

$products variable as an array is NOT USED in product.tpl, this section use $product as an object


also, comapre controllers (categoryController and productController) you will see HUGE difference


in simple words: it's not possible.

or it is with HUGE modification of prestashop

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...