{assign var="attributes" value=$basket[i].attributes}> <{assign var="product" value=$basket[i].product}> <{assign var="amount" value=$basket[i].amount}> <{assign var="profile" value=$basket[i].product->getProfile()}> <{assign var="profileAttributes" value=$profile->getAttributeList()}> <{if $attributes}> <{assign var="variantAttributeValueId" value=$attributes.0.value_id}> <{section name="j" loop=$profileAttributes}> <{if $profileAttributes[j]->getIsVariant()}> <{assign var="isVariant" value=true}> <{assign var="values" value=$profileAttributes[j]->getValues()}> <{section name="k" loop=$values}> <{assign var="attribute_id" value=$values[k]->getAttributeValueId()}> <{if $variantAttributeValueId == $attribute_id}> <{assign var="attribute_stock_count" value=$product->getInStock($profileAttributes[j]->getAttributeId(), $values[k]->getAttributeValueId())}> <{/if}> <{/section}> <{/if}> <{/section}> <{/if}>