{if $product_id} {$attributes = []} {loop name="attributes" type="attribute" product=$product_id order="manual"} {$options = []} {ifloop rel="attributeValues"} {loop type="attribute_availability" name="attributeValues" attribute=$ID product=$product_id} {$options[] = [ 'id' => $ID, 'label' => $TITLE ]} {/loop} {/ifloop} {$attributes[] = [ 'title' => $TITLE, 'id' => $ID, 'values' => $options ]} {/loop} {strip} {/strip}
{/if}