If you need to display some block based on product’s category and you want to check for that category right in the smarty template ( e.g. product.tpl ) you can do so using this code – which as an example uses category 27 as base reference. You can easily find your category ID in admin.
{assign var='cats' value=Product::getProductCategories($product.id)}
{if in_array(27, $cats)}
.. following will only be displayed if this product is in category of ID 27
{/if}
If you for some reason can’t find your category ID, you can look for it by adding following into product.tpl
{assign var='cats' value=Product::getProductCategories($product.id)}
{$cats|@print_r}
Just reload page and you will see in which categories this product is. Alternatively you could use{debug}
to access all smarty available variables and look in there.
Webmentions
kamagra prodeje v usa
kanadský kamagra vs spojené státy kamagra
purchase fildena generic buy online
cheapest buy fildena usa generic
how to buy itraconazole cheap wholesale
buy itraconazole spain over the counter
kamagra sans approbation du médecin
acheter kamagra melbourne en ligne
canadian pharmacy gabapentin generic
ordering gabapentin uk where buy
buy dutasteride in Sydney
how to get a doctor to prescribe dutasteride
order flexeril cyclobenzaprine usa mastercard
how to buy flexeril cyclobenzaprine spain over the counter
avodart generic cheapest
buying avodart generic when will be available
discount staxyn cheap generic uk
buy cheap staxyn buy germany
online order xifaxan cheap info
buying xifaxan cheap no prescription
cheap rifaximin generic no prescription
No perscription rifaximin
how to buy enclomiphene without a script
online order enclomiphene generic south africa
order androxal price uk
order androxal price usa