Jump to content

One Product Category


Recommended Posts

I just had to do this for the project I'm working on. Here is how I did it. Go to modules/blockcategories/category-tree-branch.tpl and change line from

{$node.name|escape:htmlall:'UTF-8'}



to, for example:

{$node.name|escape:htmlall:'UTF-8'} 



This code will link any category with the name Personalised directly to the product with ID 46. You can modify this code to fit your needs, adding more elseif statements if necessary. If you have multiple categories with the same name, you should use $node.id instead of $node.name. I used name because it is easier to read code.

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

Managed to do an easy fix :P of my own :) about time i give something back to the prestashop community hehe, here is the link with the solution in the Spanish forum..... if anybody who still need it doesnt understand spanish, let me know :)

 

http://www.prestashop.com/forums/topic/185900-solucionado-categoria-con-un-solo-producto-ir-directo-al-producto/?do=findComment&comment=920111

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