{$_cart_url = $wa->getUrl('shop/frontend/order')} {$_is_dialog = false} {if $wa->get('cart')}{$_is_dialog = true}{/if} {* THUMBS *} {$_images = []} {$_images["default"] = [ "id" => "default", "uri_200" => $wa->shop->productImgUrl($product, "200") ]} {if $product.images} {foreach $product.images as $_image} {$_images[$_image.id] = [ "id" => $_image.id, "uri_200" => $wa->shop->imgUrl($_image, "200") ]} {/foreach} {/if} {if class_exists('shopFrac')} {* this code sets default values for empty SKU fields *} {$product = shopFrac::inheritSkuFieldsFromProduct($product)} {/if} {$active_sku = $product.skus[$product["sku_id"]]} {$_currency = $wa->shop->currency()} {if method_exists($wa->shop, "getCurrencyData")} {$_currency_data = $wa->shop->getCurrencyData($_currency)} {else} {if ($currency_info["sign_position"])} {$_pattern_html = "%s`$currency_info["sign_delim"]``$currency_info["sign_html"]`"} {$_pattern_text = "%s`$currency_info["sign_delim"]``$currency_info["sign"]`"} {else} {$_pattern_html = "`$currency_info["sign_html"]``$currency_info["sign_delim"]`%s"} {$_pattern_text = "`$currency_info["sign"]``$currency_info["sign"]`%s"} {/if} {$_currency_data = [ 'code' => $currency_info['code'], 'fraction_divider' => ifset($currency_info, 'decimal_point', '.'), 'fraction_size' => ifset($currency_info, 'precision', 2), 'group_divider' => $currency_info["thousands_sep"], 'group_size' => 3, 'pattern_html' => $_pattern_html, 'pattern_text' => $_pattern_text, 'pattern_unit' => "%s" ]} {/if} {$_show_fractional = !empty($formatted_units[$product["stock_unit_id"]]) && !empty($formatted_units[$product["base_unit_id"]]) && ($product["stock_unit_id"] !== $product["base_unit_id"]) && !empty($active_sku["stock_base_ratio"])}
{if $wa->get('cart')}

{$product.name|escape}

{/if} {if $wa->get('cart')} {$wa->shop->productImgHtml($product, '96x96', [ 'class' => 'wa-mb-24', 'itemprop' => 'image', 'id' => 'product-image', 'alt' => $product.name|escape ])} {/if} {$_product_badge_html = $wa->shop->badgeHtml($product.badge)} {if $_product_badge_html || $product.compare_price > 0}
{$wa->shop->badgeHtml($product.badge)} {if $product.compare_price > 0} {/if}
{/if}
{if !empty($_show_fractional)} {$_stock_unit = $formatted_units[$product["stock_unit_id"]]} {$_base_unit = $formatted_units[$product["base_unit_id"]]} {$_stock_price = shop_currency($active_sku["price"], ["unit" => $_stock_unit["name_short"]|escape, "in_currency" => $_currency, "format" => "price_wrapper"])} {$_stock_compare_price = shop_currency($active_sku["compare_price"], ["unit" => $_stock_unit["name_short"]|escape, "in_currency" => $_currency, "format" => "price_wrapper"])} {$_base_price = ($active_sku["price"]/$active_sku["stock_base_ratio"])} {$_base_price = shop_currency($_base_price, ["unit" => $_base_unit["name_short"]|escape, "in_currency" => $_currency, "format" => "price_wrapper"])}
{$_stock_price}
{$_base_price}
{elseif !empty($fractional_config) && $fractional_config["stock_units_enabled"] && !empty($formatted_units) && !empty($formatted_units[$product["stock_unit_id"]])} {$_stock_unit = $formatted_units[$product["stock_unit_id"]]} {$__stock_price = shop_currency($active_sku["price"], ["unit" => $_stock_unit["name_short"]|escape, "in_currency" => $_currency, "format" => "price_wrapper"])} {$_stock_price = shop_currency($active_sku["price"], ["unit" => $_stock_unit["name_short"]|escape, "in_currency" => $_currency, "format" => "price_wrapper"])} {$_stock_compare_price = shop_currency($active_sku["compare_price"], ["unit" => $_stock_unit["name_short"]|escape, "in_currency" => $_currency, "format" => "price_wrapper"])}
{$_stock_price}
{else}
{shop_currency($active_sku["price"], ["in_currency" => $_currency, "format" => "price_wrapper"])}
{/if}
{if $product.summary}

{$product.summary|truncate:512}

{/if} {if $product.sku_type} {$default_sku_features = $product.sku_features} {$product_available = $product.status} {if $theme_settings.selectable_features_control == 'inline'}
{foreach $features_selectable as $f}
{foreach $f.values as $v_id => $v} {if !isset($default_sku_features[$f.id])}{$default_sku_features[$f.id]=$v_id}{/if} {if $f.type == 'color'} {strip_tags($v)}{else}{$v}{/if} {/foreach}
{/foreach}
{else}
{foreach $features_selectable as $f} {/foreach}
{/if} {foreach $product.skus as $sku}
{$sku_available = $product.status && $sku.available && ($wa->shop->settings('ignore_stock_count') || $sku.count === null || $sku.count > 0)} {if $sku.name}{/if} {if (!($sku.count === null) && $sku.count <= 0)} {else} {/if}
{/foreach} {else} {$product_available = false} {if count($product.skus) > 1} {* When there is more than one SKU, display selector *} {else} {* When there is only one SKU, don't display the selector *}
{$sku = $product.skus[$product.sku_id]} {if $sku.sku}{$sku.sku|escape}{/if} {if $sku.name}{/if} {if !$sku.available}

[`This product is not available for purchase`]

{elseif !$wa->shop->settings('ignore_stock_count') && !($sku.count === null || $sku.count > 0)}
{if $wa->shop->settings('ignore_stock_count')}[`Pre-order only`]{else}[`Out of stock`]{/if}
{else} {/if} {$product_available = $product.status && $sku.available && ($wa->shop->settings('ignore_stock_count') || $sku.count === null || $sku.count > 0)}
{/if} {/if}
{if $wa->shop->countPickupLocations() > 0} {$wa->shop->getPickupButton($product)} {/if}
{if $services}
{foreach $services as $s}
{if isset($s.variants)} {else} {/if}
{/foreach}
{/if}
{if $product_available || count($product.skus) > 1}
{function name=in_stock n=0 low=5 critical=2} {if $n > $low or $n === null} [`In stock`] {elseif $n > $critical} {* _w("Only %d left in stock", "Only %d left in stock", $n) *}{_w("Only a few items left")} {elseif $n > 0} {_w("Only %d left in stock", "Only %d left in stock", $n)} {else} {if $wa->shop->settings('ignore_stock_count')}[`Pre-order only`]{else}[`Out of stock`]{/if} {/if} {/function} {foreach $product.skus as $sku} {/foreach} {if $product.sku_type} {/if}
{/if}