Jump to content

Adding text to XY products


homer.tmx

Recommended Posts

Hi.
thank you for telling the direction of the solution @Krystian Podemski I have found several solutions, but none works for me - P.S. 1.7.4.3.

{if $product.id_category_default === 392}
my code here
{/if} 
{if $product->id_category_default == 392}
my code here
{/if}
{if Tools::getValue('id_category')== 392}
my code here
{/if}
{if in_array(392,Product::getProductCategories($product->id|intval))}
my code here
{/if}

I tested it on product which is in category with id 392 (which is default as well).

The only code that appeared in product.tpl was

{if Tools::getValue('id_category')==$product->id_category_default}
my code here
{/if}

but I did not come out how to enter the category id.

Posts I've been looking for:

 

Link to comment
Share on other sites

  • 2 weeks later...

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