{if !$product}
    {$product = $body.product}
{/if}
{foreach $product.labels as $label}
   {if !$label.is_visible}
       {continue}
   {/if}

   <span class="flag{if !empty($label.data.color)} flag-{$label.data.color}{/if}{if !empty($label.code)} flag-{$label.code}{/if}">
       {if !empty($label.data.icon)}
          <i class="fc icons_{$label.data.icon}"></i>
       {/if}
       {$label.name}
   </span>
{/foreach}
