1. В приложении «Магазин» создайте файл под названием alaali.css в разделе «Витрина» во вкладке «Шаблоны» с кодом
.alaali_img { padding: 0; height: 41px; margin: 0; } .alaali_img2 { padding: 0; height: 30px; margin: 0; } .alaali_without_img { vertical-align: middle; padding: 5px 15px 0; } .options .inline-select.not-color a { border: 1px solid grey; padding: 0; height: 43px; min-width: 40px; text-align: center; vertical-align: middle; } .options .inline-select.not-color a.selected, .options .color a.selected { border: 1px solid #00b4ff; box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.2); } .options .color a.selected::after { content: none; } .options .color a { border-radius: 0; border: 1px solid grey; width: 43px; height: 43px; display: inline-block; margin: 7px 5px 10px 0; }
2. Внести изменения в файл head.html:
Найдите код
<!-- shop app css --> <link href="{$wa_active_theme_url}amigo.shop.css" rel="stylesheet" type="text/css">
Добавьте после них код
<link rel="stylesheet" href="{$wa_active_theme_url}alaali.css?v{$wa_theme_version}">
Сохраните изменения.
3. Отредактируйте файл product-page.cart.html:
Найдите код
<!-- SELECTABLE FEATURES selling mode --> {$default_sku_features = $product.sku_features} {$product_available = $product.status} {if !empty($theme_settings.selectable_features_control) && $theme_settings.selectable_features_control == 'inline'} <div class="options"> {foreach $features_selectable as $f} <div class="inline-select{if $f.type == 'color'} color{else} not-color{/if}"> <div class="row no-padding"> <div class="col-xs-12 col-sm-4 col-md-3"> {$f.name} </div> <div class="col-xs-12 col-sm-8 col-md-9"> {foreach $f.values as $v_id => $v} {if !isset($default_sku_features[$f.id])}{$default_sku_features[$f.id]=$v_id}{/if} <a data-value="{$v_id}" href="#"{if $v_id == ifset($default_sku_features[$f.id])} class="selected"{/if}{if $f.type == 'color'} style="{$v->style}; margin-bottom: 20px;"{/if}> {if $f.type == 'color'} <i class="icon16 checkmark color_checkmark"></i>{/if} {if $f.type == 'color'}{else}{$v}{/if} </a> {/foreach} <input type="hidden" data-feature-id="{$f.id}" class="sku-feature" name="features[{$f.id}]" value="{ifset($default_sku_features[$f.id])}"> </div> </div> </div> {/foreach} </div>
Исправьте на
<!-- SELECTABLE FEATURES selling mode --> {$default_sku_features = $product.sku_features} {$product_available = $product.status} {$feature_images = shopAlaaliHelper::getFeaturesImg($product.id)} {if !empty($theme_settings.selectable_features_control) && $theme_settings.selectable_features_control == 'inline'} <div class="options"> {foreach $features_selectable as $f} <div class="inline-select{if $f.type == 'color'} color{else} not-color{/if}"> <div class="row no-padding"> <div class="col-xs-12 col-sm-4 col-md-3"> {$f.name} </div> <div class="col-xs-12 col-sm-8 col-md-9"> {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'>"} {/if} {if !isset($default_sku_features[$f.id])}{$default_sku_features[$f.id]=$v_id}{/if} <a data-value="{$v_id}" href="#"{if $v_id == ifset($default_sku_features[$f.id])} class="selected alaali_img"{/if}{if $f.type == 'color'} style="{$v->style}; "{/if}> {if in_array($v_id,$feature_images[$f.id]['id'])} {$v_img} {else} {if $f.type == 'color'}{else}<span class="alaali_without_img">{$v}</span>{/if} {/if} </a> {/foreach} <input type="hidden" data-feature-id="{$f.id}" class="sku-feature" name="features[{$f.id}]" value="{ifset($default_sku_features[$f.id])}"> </div> </div> </div> {/foreach} </div>
4. Отредактируйте файл product.html:
Найдите блок кода
<!-- product features --> <div id="prod-tab-char"> {if $product.features} <table class="features" id="product-features"> {foreach $product.features as $f_code => $f_value} <tr{if $features[$f_code].type == 'divider'} class="divider"{/if}> <td class="name"> {$features[$f_code].name|escape} </td> <td class="value" itemprop="{$f_code|escape}"> {if is_array($f_value)} {if $features[$f_code].type == 'color'} {implode(' ', $f_value)} {else} {implode(', ', $f_value)} {/if} {else} {$f_value} {/if} </td> </tr> {/foreach} </table> {/if} </div>
Замените его на код
<!-- product features --> <div id="prod-tab-char"> {if $product.features} {$feature_images = shopAlaaliHelper::getFeaturesImg_code($product.id, false)} <table class="features" id="product-features"> {foreach $product.features as $f_code => $f_value} <tr{if $features[$f_code].type == 'divider'} class="divider"{/if}> <td class="name"> {$features[$f_code].name|escape} </td> <td class="value" itemprop="{$f_code|escape}"> {if is_array($f_value)} {foreach $f_value as $v_id => $value} {if in_array($v_id,$feature_images[$f_code]['id'])} {$v_img = "<img src='"|cat:$feature_images[$f_code]['img'][$v_id]|cat:"' title='"|cat:$feature_images[$f_code]['value'][$v_id]|cat:"' class='alaali_img2' >"} {if $features[$f_code].type == 'color'} {$v_img} {else} {$v_img} {/if} {else} {if $features[$f_code].type == 'color'} {$value}{else}{$value|escape}{/if} {/if} {/foreach} {else} {if is_object($f_value)} {assign var=v_id value=$f_value.id} {if in_array($v_id,$feature_images[$f_code]['id'])} {$v_img = "<img src='"|cat:$feature_images[$f_code]['img'][$v_id]|cat:"' title='"|cat:$feature_images[$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_images[$f_code]['id']) || in_array($v_id,$feature_images[$f_code]['value'])} {$v_img = "<img src='"|cat:$feature_images[$f_code]['img'][$v_id]|cat:"' title='"|cat:$feature_images[$f_code]['value'][$v_id]|cat:"' class='alaali_img2' >"} {$v_img} {else} {$f_value|escape} {/if} {/if} {/if} </td> </tr> {/foreach} </table> {/if} </div>
0 комментариев