Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {if isset($accessories) && $accessories}
- {foreach from=$accessories key=id_accessories_list_thead item=accessory_name name=accessories_list_thead}
- {foreach from=$accessory_name.features item=accessory_name_features name=accessories_list_features_thead}
- {if !in_array($accessory_name_features.name, $array_accessory_name.name)}
- {$array_accessory_name.key[]=$accessory_name_features.id_feature}
- {$array_accessory_name.name[]=$accessory_name_features.name}
- {/if}
- {/foreach}
- {/foreach}
- <section class="page-product-box">
- <div class="rte">
- <table class="an_table an_sort table-hover table tablesorter tablesorter-default" role="grid">
- <thead>
- <tr role="row" class="tablesorter-headerRow">
- <th class="tablesorter-noSort tablesorter-header tablesorter-headerUnSorted" data-column="0" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" aria-sort="none" aria-label=": No sort applied, activate to apply an ascending sort" style="user-select: none;"><div class="tablesorter-header-inner"></div>
- </th>
- <th data-column="1" class="tablesorter-header tablesorter-headerUnSorted" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" aria-sort="none" aria-label="Реферальная ссылка: No sort applied, activate to apply an ascending sort" style="user-select: none;"><div class="tablesorter-header-inner">Артикул</div>
- </th>
- {foreach from=$array_accessory_name.name key=id_ac_name item=ac_name name=acc_name}
- <th data-column="{$id_ac_name}" class="tablesorter-header tablesorter-headerUnSorted" tabindex="0" scope="col" role="columnheader" aria-disabled="false" unselectable="on" aria-sort="none" aria-label="Реферальная ссылка: No sort applied, activate to apply an ascending sort" style="user-select: none;"><div class="tablesorter-header-inner">{$ac_name}</div></th>
- {/foreach}
- </tr>
- </thead>
- <tbody aria-live="polite" aria-relevant="all">
- {foreach from=$accessories key=id_accessory item=accessory name=accessories_list}
- <tr role="row">
- <td><a href="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'tm_home_default')|escape:'html':'UTF-8'}" rel="product_gal"><img src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'tm_home_default')|escape:'html':'UTF-8'}"></a></td>
- <td>{$accessory.reference}</td>
- {foreach from=$array_accessory_name.name key=id_ac_name item=ac_name name=acc_name}
- {if $id_ac_name == 0}
- {$step = null}
- {/if}
- {foreach from=$accessory.features key=id_features item=features}
- {if $ac_name == $features.name}
- {if isset($step)}
- {assign var="step" value=$step+1}
- {if $id_ac_name == $step}
- <td>{$features.value}</td>
- {/if}
- {if $id_ac_name != $step}
- {for $foo=$step to $id_ac_name}
- {if $foo != $id_ac_name}
- {assign var="step" value=$step+1}
- <td></td>
- {/if}
- {if $foo == $id_ac_name}
- <td>{$features.value}</td>
- {/if}
- {/for}
- {/if}
- {else}
- {if $id_ac_name == $id_features}
- <td>{$features.value}</td>
- {/if}
- {if $id_ac_name != $id_features}
- {for $foo=$id_features to $id_ac_name}
- {if $foo != $id_ac_name}
- {assign var="step" value=$id_features+1}
- <td></td>
- {/if}
- {if $foo == $id_ac_name}
- <td>{$features.value}</td>
- {/if}
- {/for}
- {/if}
- {/if}
- {/if}
- {/foreach}
- {/foreach}
- </tr>
- {/foreach}
- </tbody>
- </table>
- </div>
- </section>
- {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement