<{if $product = $webshop->getProductById($product_id)}> <{if $profile = $product->getProfile()}> <{assign var="attr" value=$profile->getAttributeList()}> <{assign var="category" value=$product->getMainCategory()}> <{assign var="category" value=$category|default:$product->getCategory()}> <{if $category}> <{assign var="category_id" value=$category->getCategoryId()}> <{/if}> <{assign var="product_images" value=$product->getImages()}> <{section name="j" loop=$product_images start=0 max=1}> <{assign var="product_thumb" value=$product_images[j]->getSrc(200, 200)}> <{/section}> <{assign var="package_size" value=$product->getPackage()}> <{if $package_size}> <{assign var="quantity" value=$product->getPackage()}> <{/if}> <{assign var="allow_backorder" value=$allow_backorder|default:1}>
', <{$product->getRealPrice()|default:'null'}>, '<{$product->getBrandName()|replace:'"':"'"|escape:javascript|default:'null'}>' )" @quantity-selected.window="handleQuantitySelection" @variant-selected.window="handleVariantSelection" @comment-changed.window="handleCommentChange" > <{if $show_variant}> <{section name="j" loop=$attr}> <{if $attr[j]->getIsVariant()}> <{if $attr[j]->getDataType() == "valuelist"}> <{include file="components/attribute-dropdown.html" product=$product attr=$attr[j] }> <{elseif $attr[j]->getDataType() == "string"}> <{elseif $attr[j]->getDataType() == "integer"}> <{elseif $attr[j]->getDataType() == "boolean"}> <{/if}> <{/if}> <{/section}> <{/if}>
<{if $show_quantity}>
<{/if}> <{if $show_badge && $settings.integrations.enable_emaerket }> <{include file="components/svg.html" class="brandbar__actions-svg--emaerket" icon="brand-emaerket"}> <{/if}>
<{if $show_quantity}> <{* Show invalid amount error *}>

<{t}>This item is only sold in badges of<{/t}> .

<{t}>or<{/t}>

<{* Shows max_reached/min_reached -- should be transformed to relevant output *}>
<{t}>You need to select a variant.<{/t}>
<{t}>Minimum quantity reached.<{/t}>
<{t}>Maximum quantity reached<{/t}>
<{if $settings.product.enable_backorder_message}>
<{t}>You are ordering more than we have in stock at the moment. Current stock is<{/t}> .
<{/if}> <{/if}> <{* Addons *}> <{if $show_addons}> <{if $product->getExtensionValue('addon_product_ids') || $product->getMetaValue('addon_ids')}> <{if $product->getExtensionValue('addon_product_ids')}> <{assign var="addonIds" value=","|explode:$product->getExtensionValue('addon_product_ids')}> <{else}> <{assign var="addonIds" value=","|explode:$product->getMetaValue('addon_ids')}> <{/if}> <{/if}> <{if $addonIds|@count === 0}> <{assign var="category" value=$product->getCategory()}> <{if $category && $category->getMetaValue('addon_ids')}> <{assign var="addonIds" value=","|explode:$category->getMetaValue('addon_ids')}> <{else}> <{if $category && $addonIds|@count === 0}> <{assign var="parentCategories" value=$category->getParents()}> <{section name="c" loop=$parentCategories}> <{if $parentCategories[c]->getMetaValue('addon_ids') && $addonIds|@count === 0}> <{assign var="addonIds" value=","|explode:$parentCategories[c]->getMetaValue('addon_ids')}> <{/if}> <{/section}> <{/if}> <{/if}> <{/if}> <{if $addonIds}>

<{t}>Add to cart with<{/t}>

<{/if}> <{/if}>
<{/if}> <{/if}>