1
Создаем отдельный шаблон вывода , например list-table.html
Вставляем код таблицы
Меняем шапку под себя
Меняем id характеристик под себя
Устанавливаем плагин Игоря Гапонова "Купить в 1 клик"
Радуемся таблице товаров
Обращаю внимание что в данной таблице нет ссылок на карточку товара
Так же используется условие дополнительных параметров категорий
{if $category.params.price_tonn} <th class="price">Цена за тонну</th> {else} <th class="price">Цена за метр</th> {/if}
Собственно сам код таблицы
<div class="productsWrapper"> <table class="preice_table"> <thead> <tr> <th>Наименование</th> <th class="marka_s">Марка стали</th> <th class="dlina">Длина,мм</th> <th class="tolth">Толщина, мм</th> <th class="gost">ГОСТ</th> <th class="sfera">Сфера применения</th> <th class="nar_p">Наружная поверхность</th> {if $category.params.price_tonn} <th class="price">Цена за тонну</th> {else} <th class="price">Цена за метр</th> {/if} <th>Заказать</th> </tr> </thead> <tbody> {foreach $products as $p} <tr> <td> {$p.name} </td> {if $wa->shop->product($p.id)->features['marka_stali']} <td class="marka"> {$wa->shop->product($p.id)->features['marka_stali']} </td> {else} <style>.marka_s,.marka{ display: none; }</style> {/if} {if $wa->shop->product($p.id)->features['dlina_mm']} <td class="dlina_s"> {$wa->shop->product($p.id)->features['dlina_mm']} </td> {else} <style>.dlina_s,.dlina{ display: none; }</style> {/if} {if $wa->shop->product($p.id)->features['tolshchina_mm']} <td class="tolth_s"> {$wa->shop->product($p.id)->features['tolshchina_mm']} </td> {else} <style>.tolth_s,.tolth { display: none; }</style> {/if} {if $wa->shop->product($p.id)->features['gost']} <td class="gost_s"> {$wa->shop->product($p.id)->features['gost']} </td> {else} <style>.gost_s,.gost { display: none; }</style> {/if} {if $wa->shop->product($p.id)->features['sfera_primeneniya']} <td class="sfera_s"> {$wa->shop->product($p.id)->features['sfera_primeneniya']} </td> {else} <style>.sfera_s,.sfera { display: none; }</style> {/if} {if $wa->shop->product($p.id)->features['naruzhnaya_poverkhnost']} <td class="nar_s"> {$wa->shop->product($p.id)->features['naruzhnaya_poverkhnost']} </td> {else} <style>.nar_s,.nar_p { display: none; }</style> {/if} <td> {shop_currency_html($p.price)} </td> <td> {shopQuickorderPlugin::quickorderForm($p)} </td> </tr> {/foreach} </tbody> </table> </div> {/strip}
Стили
.preice_table {width: 100%;border: 1px solid #999;font-size: 11px;margin-top: 0 !important;} .preice_table td {border: 1px solid #999;border-collapse: collapse;text-align: center;vertical-align: middle;} .preice_table th {background: #ccc;border: 1px solid #999;color: #333;font-weight: 700;padding: 2px;text-align: center;font-size: 11px;} table tbody tr:nth-child(odd){background: #fff;} table tbody tr:nth-child(even){background: #f2f6f8;}
В таблице используется хелпер плагина купить в 1 клик от Игоря Гапонова
{shopQuickorderPlugin::quickorderForm($p)}