Jump to content

Show tags per product


Recommended Posts

Hi there,

I'd like to show the product-tags on the product page, but I don't know how to call them the right way...

{if $product->tags}
   {foreach from=$product->tags item=tag name=myLoop}
{$tag.name|escape:htmlall:'UTF-8'}
   {/foreach}
{else}
   {l s='No tags specified yet' mod='blocktags'}
{/if}



gives me nothing for products with tags but the "no tags.." thing for those without...

Link to comment
Share on other sites

Hi Bruz!

This looks to be the right way to display them.
Please check that the product you're testing contains really some tags ad inside your current language.
If both of them are ok, please debug it using var_dump($product->tags); on your /product.php page in order to see exactly what's inside your product tag variable.
If that contains a "false" value, that means a MySQL error.

Link to comment
Share on other sites

  • 5 months later...
  • 7 months later...
×
×
  • Create New...