NBBO Posted January 20, 2014 Share Posted January 20, 2014 PS version: 1.5.4.1Default PS productcomments module. I´m trying to define, when "idtab5" will be displayed(product comments on product pages) by using the categories id. I only have 2 categories, i want one without any product comments and one with, category with id 6 without comments, and id 7 with.I tried some code found on the forums, but it doesnt seem to work, so i must be missing something. I presume i´m missing a reference to category.php, to ensure this file is being read, and that there actually is a defined category id, but where to put it and how to write it? Here´s the code i tried to put in....added to productcomments.tpl line 32, ended at about 78; {if $category->id AND $category->active}{if $category->id_category == 7} {else} {/if}{/if} Also i tried adding; include_once(dirname(_FILE_).'/classes/category.php'); Added it to productcomment.php, but it didnt help. Can anyone help me out? Thanks, NB Link to comment Share on other sites More sharing options...
vekia Posted January 20, 2014 Share Posted January 20, 2014 have you got $category variable defined in this template file? (product.tpl) i don't think so if you want to use it, you have to pass it to smarty array in ProductController core file Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now