1. В настройках темы дизайна магазина переключите "Выбор характеристик товара" на "Показывать все значения в ряд"
2. Добавьте в конец файла/шаблона user.css
/**ALAALI**/ .options .changeselect a.alaali{ padding: 1px !important; width: 40px; height: 40px; display: inline-block; } .options .changeselect a.alaali li{ padding: 0; margin: 0; border: none !important; height: auto; } .options .changeselect a.alaali li.active{ -webkit-box-shadow: 0px 0px 5px 3px rgba(0,0,0,0.75); -moz-box-shadow: 0px 0px 5px 3px rgba(0,0,0,0.75); box-shadow: 0px 0px 5px 3px rgba(0,0,0,0.75); } .alaali_img{ width: 34px; height: 34px; } .alaali_img2{ vertical-align: middle; width: 15px; } /**\ALAALI**/
3. Отредактируйте шаблон product.cart.html
найдите код
<!-- SELECTABLE FEATURES selling mode --> {$default_sku_features = $product.sku_features} {$product_available = $product.status} <div class="options"> {foreach $features_selectable as $f} <div class="row-fluid"{if $theme_settings.select_sku == '1'} style="display:none;"{/if}> <div class="span12 changeselect"> <ul data-feature-select="features[{$f.id}]"> {foreach $f.values as $v_id => $v}<a href="#" data-feature-id="{$v_id}"><li {if $v@first}class="active"{/if}>{$v}</li></a>{/foreach} </ul> </div> </div> <div class="row-fluid"{if $theme_settings.select_sku == '2'} style="display:none;"{/if}> <div class="span3 padding5top">{$f.name}:</div> <div class="span6"> <select data-feature-id="{$f.id}" class="sku-feature" name="features[{$f.id}]"> {foreach $f.values as $v_id => $v}<option value="{$v_id}" {if $v@first}selected{/if}>{$v}</option>{/foreach} </select> </div> </div> {/foreach} </div> {else}
и исправьте на
<!-- SELECTABLE FEATURES selling mode --> {$default_sku_features = $product.sku_features} {$product_available = $product.status} {$feature_images = shopAlaaliHelper::getFeaturesImg($product.id)} <div class="options"> {foreach $features_selectable as $f} <div class="row-fluid"{if $theme_settings.select_sku == '1'} style="display:none;"{/if}> <div class="span12 changeselect"> <ul data-feature-select="features[{$f.id}]"> {foreach $f.values as $v_id => $v} {if in_array($v_id,$feature_images[$f.id]['id'])} {$v_img = "<img src='"|cat:$feature_images[$f.id]['img'][$v_id]|cat:"' title='"|cat:$feature_images[$f.id]['value'][$v_id]|cat:"' class='alaali_img'>"} <a href="#" data-feature-id="{$v_id}" data-code="{$f.id}:{$v_id}" class="sku{$f.id}{$v_id} alaali"> <li {if $v@first}class="active"{/if}>{$v_img}</li> </a> {else} <a href="#" data-feature-id="{$v_id}"><li {if $v@first}class="active"{/if}>{$v}</li></a> {/if} {/foreach} </ul> </div> </div> <div class="row-fluid"{if $theme_settings.select_sku == '2'} style="display:none;"{/if}> <div class="span3 padding5top">{$f.name}:</div> <div class="span6"> <select data-feature-id="{$f.id}" class="sku-feature" name="features[{$f.id}]"> {foreach $f.values as $v_id => $v}<option value="{$v_id}" {if $v@first}selected{/if}>{$v}</option>{/foreach} </select> </div> </div> {/foreach} </div> {else}
4. Дополнительно отредактируйте шаблон product.html(закладка характеристик)
найдите код
<!-- product features --> {if $product.features} <table class="table alert alert-table paddingtop" id="product-features"> {foreach $product.features as $f_code => $f_value} <tr{if $f_value@iteration > 5} style="display:none;"{/if} {if $features[$f_code].type == 'divider'} class="divider"{/if}> <td><b>{$features[$f_code].name|escape}</b></td> <td>{if is_array($f_value)}{implode(', ', $f_value)}{else}{$f_value}{/if}</td> </tr> {/foreach}
и исправьте на
<!-- product features --> {if $product.features} {$feature_images2 = shopAlaaliHelper::getFeaturesImg_code($product.id,false)} <table class="table alert alert-table paddingtop" id="product-features"> {foreach $product.features as $f_code => $f_value} <tr{if $f_value@iteration > 5} style="display:none;"{/if} {if $features[$f_code].type == 'divider'} class="divider"{/if}> <td><b>{$features[$f_code].name|escape}</b></td> <td> {if is_array($f_value)} {foreach $f_value as $v_id => $value} {if in_array($v_id,$feature_images2[$f_code]['id'])} {$v_img = "<img src='"|cat:$feature_images2[$f_code]['img'][$v_id]|cat:"' title='"|cat:$feature_images2[$f_code]['value'][$v_id]|cat:"' class='alaali_img2'>"} {if $features[$f_code].type == 'color'} {$v_img} {$feature_images2[$f_code]['value'][$v_id]} {else} {$v_img} {/if} {else} {if $features[$f_code].type == 'color'} {$value}{else}{$value|escape}{/if} {/if} {if !$value@last}, {/if} {/foreach} {else} {if is_object($f_value)} {assign var=v_id value=$f_value.id} {if in_array($v_id,$feature_images2[$f_code]['id'])} {$v_img = "<img src='"|cat:$feature_images2[$f_code]['img'][$v_id]|cat:"' title='"|cat:$feature_images2[$f_code]['value'][$v_id]|cat:"' class='alaali_img2'>"} {$v_img} {else} {$f_value|escape} {/if} {else} {assign var=v_id value=$f_value} {if in_array($v_id,$feature_images2[$f_code]['id']) || in_array($v_id,$feature_images2[$f_code]['value'])} {$v_img = "<img src='"|cat:$feature_images2[$f_code]['img'][$v_id]|cat:"' title='"|cat :$feature_images2[$f_code]['value'][$v_id]|cat:"' class='alaali_img2'>"} {$v_img} {else} {$f_value|escape} {/if} {/if} {/if} </td> </tr> {/foreach}
найдите код
<!-- selectable features selling mode --> {if $product.sku_type} {$product_available = $product.status} {$default_sku_features = $product.sku_features} <div class="options"> {foreach $features_selectable as $f} <div class="row-fluid"> <div class="span12 changeselect"{if $theme_settings.select_sku == '1'} style="display:none;"{/if}> <ul data-feature-select="features[{$f.id}]" data-id="{$f.id}"> {foreach $f.values as $v_id => $v} <a href="#" data-feature-id="{$v_id}" data-code="{$f.id}:{$v_id}" class="sku{$f.id}{$v_id}"> <li {if $v_id == ifset($default_sku_features[$f.id])} class="active"{/if}>{$v}</li> </a> {/foreach} </ul> </div> </div> <div class="row-fluid"{if $theme_settings.select_sku == '2'} style="display:none;"{/if}> <div class="span3 padding5top">{$f.name}:</div> <div class="span6"> <select data-feature-id="{$f.id}" class="sku-feature" name="features[{$f.id}]"> {foreach $f.values as $v_id => $v}<option value="{$v_id}" {if $v_id == ifset($default_sku_features[$f.id])}selected{/if}>{$v}</option>{/foreach} </select> </div> </div> {/foreach} </div>
исправьте на
<!-- selectable features selling mode --> {if $product.sku_type} {$product_available = $product.status} {$default_sku_features = $product.sku_features} {$feature_images = shopAlaaliHelper::getFeaturesImg($product.id)} <div class="options"> {foreach $features_selectable as $f} <div class="row-fluid"> <div class="span12 changeselect"{if $theme_settings.select_sku == '1'} style="display:none;"{/if}> <ul data-feature-select="features[{$f.id}]" data-id="{$f.id}"> {foreach $f.values as $v_id => $v} {if in_array($v_id,$feature_images[$f.id]['id'])} {$v_img = "<img src='"|cat:$feature_images[$f.id]['img'][$v_id]|cat:"' title='"|cat:$feature_images[$f.id]['value'][$v_id]|cat:"' class='alaali_img'>"} <a href="#" data-feature-id="{$v_id}" data-code="{$f.id}:{$v_id}" class="sku{$f.id}{$v_id} alaali"> {$v_img} </a> {else} <a href="#" data-feature-id="{$v_id}" data-code="{$f.id}:{$v_id}" class="sku{$f.id}{$v_id}"> <li {if $v_id == ifset($default_sku_features[$f.id])} class="active"{/if}>{$v}</li> </a> {/if} {/foreach} </ul> </div> </div> <div class="row-fluid"{if $theme_settings.select_sku == '2'} style="display:none;"{/if}> <div class="span3 padding5top">{$f.name}:</div> <div class="span6"> <select data-feature-id="{$f.id}" class="sku-feature" name="features[{$f.id}]"> {foreach $f.values as $v_id => $v}<option value="{$v_id}" {if $v_id == ifset($default_sku_features[$f.id])}selected{/if}>{$v}</option>{/foreach} </select> </div> </div> {/foreach} </div>
0 комментариев