Jump to content

How to prevent from a module not to appear in some categories?


Recommended Posts

hello,

 

i have a free block module that hook to the right column, i would like this module not to appear in 5 categories.

 

how do i do it?

in the positions exceptions its written to exclude only base files with .php ending...

 

so how can i exclude this module?

 

thanks!

Matan

Link to comment
Share on other sites

hello,

 

i have a free block module that hook to the right column, i would like this module not to appear in 5 categories.

 

how do i do it?

in the positions exceptions its written to exclude only base files with .php ending...

 

so how can i exclude this module?

 

thanks!

Matan

 

You can try to edit the tpl module in question and do the following:

 

{if $smarty.get.id_category == 'X'}
code_module
{/if}

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Does anyone know if something has changed in PrestaShop Version 1.5? I cannot get the code to work. I add {if $smarty.get.id_category == 'X'} to the top of the TPL file and {/if} at the bottom but it does not cause the module to hide - the module continues to display on every category and every page.

 

I did turn on Force Compile and turned off the Cache.

 

Thanks very much for any help!

Link to comment
Share on other sites

Hi JM,

Which file did you try to change exactly to get the result? Is there maybe an overriding file of it elsewhere which is used instead?

 

(Just double check: Did you change the 'X' into the category ID number of the category you want to make it show?)

 

My 2 cents,

pascal

Link to comment
Share on other sites

×
×
  • Create New...