{foreach from = $item->list item = shapeRow key = shapeId name = shapeRows}
{assign var = 'countColors' value = $shapeRow.colors|@count} {math assign = 'tdWidth' equation = '100 / (x + 1)' x = $countColors} {foreach from = $shapeRow.colors item = colorId name = productColor} |
{$item->category.colors.$colorId.title}
|
{/foreach}
{$item->category.sizes.$sizeId.title|htmlspecialchars} | {foreach from = $shapeRow.colors item = colorId}{assign var = 'product' value = $shapeRow.list.$colorId.$sizeId} {if $product} {else} — {/if} | {/foreach}
{assign var = 'countColors' value = $shapeRow.colors|@count} {math assign = 'tdWidth' equation = '100 / (x + 1)' x = $countColors} {foreach from = $shapeRow.colors item = colorId name = productColor} | {/foreach} |