<{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}>

<{$product->getName()}>

<{if $attributes}>
    <{foreach from=$attributes item=a}>
  • <{$a.name|escape}>: <{$a.value|escape}>
  • <{/foreach}>
<{/if}> <{if $campaign_matches && in_array($product->getProductId(), $campaign_matches)}> <{assign var="campaignArr" value=$product->getCampaigns()}> <{if $campaignArr}> <{include file="components/campaign-alert.html" variant="campaign" margin="b" size="sm" icon="information" text="Campaign Discount"|t campaignArr=$campaignArr}> <{/if}> <{/if}> <{if $isVariant && $amount > $attribute_stock_count && !$product->getAllowNegativeStock()}> <{capture name="alert"}> <{t x=$attribute_stock_count}>Vi har kun {x} tilbage af denne variant.<{/t}> <{/capture}> <{include file="components/alert.html" variant="error" size="sm" text=$smarty.capture.alert}> <{elseif $amount > $product->getStockCount() && !$product->getAllowNegativeStock()}> <{capture name="alert"}> <{t x=$product->getStockCount()}>Vi har kun {x} tilbage på lager.<{/t}> <{/capture}> <{include file="components/alert.html" variant="error" size="sm" text=$smarty.capture.alert}> <{/if}>
<{if $attribute_stock_count }> <{assign var="stock_count" value=$attribute_stock_count}> <{else}> <{assign var="stock_count" value=$product->getStockCount()}> <{/if}> <{include file="components/update-cart-item.html" class="product-card-list__update-cart" quantity=$amount product_id=$product->getProductId() package_size=$product->getPackage() allow_backorder=$product->getAllowNegativeStock() stock=$stock_count }>
<{include file="components/price.html" class="product-card-list__price" product=$product show_price_total="true" show_price_per_unit="true" show_currency=$settings.currency.show show_prev="false" basket_amount=$amount basket_attr=$attributes }> <{include file="components/stock-status.html" class="product-card-list__stock-status" product=$product}>