How to show tags on products page



  • for example default theme
    add the code

    			<section class="page-product-box">
    				<h3 class="page-product-heading">Tags</h3>		
    					<div>
    					{if Tag::getProductTags(Tools::getValue('id_product'))!=""} 
    					<ul class="producttags">
    					    {foreach from=Tag::getProductTags(Tools::getValue('id_product')) key=k item=v}
    					        {foreach from=$v item=value}					            
    					            <li><a href="{$link->getPageLink('search', true, NULL, "tag={$value|urlencode}")}">{$value|escape:html:'UTF-8'}</a></li>
    					        {/foreach}
    					    {/foreach}
    				</ul>
    					{else}
    						{l s='No tags specified yet' mod='blocktags'}
    					{/if}
    				</div>
    			</section>
    

    after this code

    
          {if !empty($accessories)}
            <section id="product-accessories" class="page-product-box">
              <h3 class="page-product-heading">{l s='Accessories'}</h3>
              <div class="accessories-block">
                {include file="$tpl_dir./product-list.tpl" products=$accessories}
              </div>
            </section>
          {/if}
    

    (custom)css code
    if necessary adjust the css code to the template (color, style, etc)

    .producttags {
        list-style:none;
        position:relative;
        clear:both;
        display:block;
        padding-bottom:20px;
        margin-bottom:20px;
    }
     
    .producttags li, .producttags a{
        float:left;
        height:24px;
        line-height:24px;
        position:relative;
        font-size:11px;
        }
     
    .producttags a{
        margin-left:20px;
        padding:0 10px 0 12px;
        background:#0089e0;
        color:#fff;
        text-decoration:none;
        -moz-border-radius-bottomright:4px;
        -webkit-border-bottom-right-radius:4px; 
        border-bottom-right-radius:4px;
        -moz-border-radius-topright:4px;
        -webkit-border-top-right-radius:4px;    
        border-top-right-radius:4px;    
    } 
    .producttags a:visited{
        color:#fff;
    }
     
    .producttags a:before{
        content:"";
        float:left;
        position:absolute;
        top:0;
        left:-12px;
        width:0;
        height:0;
        border-color:transparent #0089e0 transparent transparent;
        border-style:solid;
        border-width:12px 12px 12px 0;      
    }
     
    .producttags a:after{
        content:"";
        position:absolute;
        top:10px;
        left:0;
        float:left;
        width:4px;
        height:4px;
        -moz-border-radius:2px;
        -webkit-border-radius:2px;
        border-radius:2px;
        background:#fff;
        -moz-box-shadow:-1px -1px 2px #004977;
        -webkit-box-shadow:-1px -1px 2px #004977;
        box-shadow:-1px -1px 2px #004977;
    }
     
    .producttags a:hover{background:#555; text-decoration:none;}    
     
    .producttags a:hover:before{border-color:transparent #555 transparent transparent;}
    

    0_1514848848412_6cfffcea-2c93-4c02-b79a-5ac3577b0608-grafik.png
    and -

    0_1514848874197_68e682e2-64b7-4a69-88af-a880a9a02701-grafik.png

    and -

    0_1514848935098_e55f8563-e184-46ef-b67d-0690144fa174-grafik.png


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.