Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.99 KB | None | 0 0
  1.  
  2. {if isset($accessories) && $accessories}
  3.  
  4. {foreach from=$accessories key=id_accessories_list_thead item=accessory_name name=accessories_list_thead}
  5. {foreach from=$accessory_name.features item=accessory_name_features name=accessories_list_features_thead}
  6. {if !in_array($accessory_name_features.name, $array_accessory_name.name)}
  7.  
  8. {$array_accessory_name.key[]=$accessory_name_features.id_feature}
  9. {$array_accessory_name.name[]=$accessory_name_features.name}
  10.  
  11. {/if}
  12. {/foreach}
  13. {/foreach}
  14.  
  15. <section class="page-product-box">
  16. <div class="rte">
  17. <table class="an_table an_sort table-hover table tablesorter tablesorter-default" role="grid">
  18. <thead>
  19. <tr role="row" class="tablesorter-headerRow">
  20. <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>
  21. </th>
  22.  
  23. <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>
  24. </th>
  25.  
  26. {foreach from=$array_accessory_name.name key=id_ac_name item=ac_name name=acc_name}
  27. <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>
  28. {/foreach}
  29. </tr>
  30. </thead>
  31. <tbody aria-live="polite" aria-relevant="all">
  32. {foreach from=$accessories key=id_accessory item=accessory name=accessories_list}
  33. <tr role="row">
  34. <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>
  35. <td>{$accessory.reference}</td>
  36. {foreach from=$array_accessory_name.name key=id_ac_name item=ac_name name=acc_name}
  37. {if $id_ac_name == 0}
  38. {$step = null}
  39. {/if}
  40. {foreach from=$accessory.features key=id_features item=features}
  41.  
  42. {if $ac_name == $features.name}
  43.  
  44. {if isset($step)}
  45.  
  46. {assign var="step" value=$step+1}
  47. {if $id_ac_name == $step}
  48. <td>{$features.value}</td>
  49. {/if}
  50.  
  51. {if $id_ac_name != $step}
  52.  
  53. {for $foo=$step to $id_ac_name}
  54. {if $foo != $id_ac_name}
  55. {assign var="step" value=$step+1}
  56. <td></td>
  57. {/if}
  58. {if $foo == $id_ac_name}
  59. <td>{$features.value}</td>
  60. {/if}
  61. {/for}
  62.  
  63. {/if}
  64.  
  65. {else}
  66.  
  67. {if $id_ac_name == $id_features}
  68. <td>{$features.value}</td>
  69. {/if}
  70.  
  71. {if $id_ac_name != $id_features}
  72.  
  73. {for $foo=$id_features to $id_ac_name}
  74. {if $foo != $id_ac_name}
  75. {assign var="step" value=$id_features+1}
  76. <td></td>
  77. {/if}
  78. {if $foo == $id_ac_name}
  79. <td>{$features.value}</td>
  80. {/if}
  81. {/for}
  82.  
  83. {/if}
  84.  
  85. {/if}
  86.  
  87. {/if}
  88.  
  89.  
  90. {/foreach}
  91.  
  92.  
  93. {/foreach}
  94.  
  95. </tr>
  96. {/foreach}
  97. </tbody>
  98. </table>
  99. </div>
  100. </section>
  101.  
  102. {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement