forked from thirtybees/community-theme-default
-
Notifications
You must be signed in to change notification settings - Fork 0
/
product-list-colors.tpl
16 lines (16 loc) · 1.01 KB
/
product-list-colors.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{if isset($colors_list)}
<ul class="color_to_pick_list clearfix">
{foreach from=$colors_list item='color'}
{if isset($col_img_dir)}
{assign var='img_color_exists' value=file_exists($col_img_dir|cat:$color.id_attribute|cat:'.jpg')}
<li>
<a href="{$link->getProductLink($color.id_product, null, null, null, null, null, $color.id_product_attribute, Configuration::get('PS_REWRITING_SETTINGS'), false, true)|escape:'html':'UTF-8'}" id="color_{$color.id_product_attribute|intval}" class="color_pick"{if !$img_color_exists && isset($color.color) && $color.color} style="background:{$color.color};"{/if} title="{$color.name|escape:'html':'UTF-8'}" aria-label="{$color.name|escape:'html':'UTF-8'}">
{if $img_color_exists}
<img src="{$img_col_dir}{$color.id_attribute|intval}.jpg" alt="{$color.name|escape:'html':'UTF-8'}" title="{$color.name|escape:'html':'UTF-8'}" width="20" height="20">
{/if}
</a>
</li>
{/if}
{/foreach}
</ul>
{/if}