{strip} {$_cart_url = $wa->getUrl('shop/frontend/cart')} {if method_exists($wa->shop, 'checkout')} {$_cart_url = $wa->shop->checkout()->cartUrl()} {/if} {$_is_dialog = false} {if $wa->get('cart') == '1'}{$_is_dialog = true}{/if} {$price_valid_until = 10} {if !empty($theme_settings.schema_price_valid_until)} {$price_valid_until = $theme_settings.schema_price_valid_until} {/if} {if !empty($product.params.price_valid_until)} {$price_valid_until = $product.params.price_valid_until} {/if} {$price_valid_until = time() + ($price_valid_until * 24 * 60 * 60)} {$price_valid_until = $price_valid_until|date_format:"Y-m-d"} {if !empty($theme_settings.schema_price_valid_until_date)} {$price_valid_until = $theme_settings.schema_price_valid_until_date} {/if} {if !empty($product.params.price_valid_until_date)} {$price_valid_until = $product.params.price_valid_until_date} {/if} {$sku_list_max_height = ''} {if $theme_settings.selectable_features_control == 'inline'} {$sku_list_max_height = $theme_settings.sku_list_max_height} {/if} {if $wa->get('cart')} {$sku_list_max_height = ''} {/if} {if !empty($sku_list_max_height)} {/if} {* NOTE: CAPTURE: SKUS *} {$product_show_skus = ''} {capture product_skus} {if $product.sku_type} {$product_show_skus = true} {$default_sku_features = $product.sku_features} {$product_available = $product.status} {if $theme_settings.selectable_features_control == 'inline'}
{if empty($theme_settings.hide_sku_codes)} {foreach $product.skus as $sku} {if !empty($sku.sku)} {/if} {/foreach} {/if}
{foreach $features_selectable as $f}
{$f.name}
{foreach $f.values as $v_id => $v} {if !isset($default_sku_features[$f.id])} {$default_sku_features[$f.id]=$v_id} {/if} {$v_img = ''} {if class_exists('shopAlaaliHelper') && !empty($theme_settings.alaali_enable)} {$v_img = shopAlaaliHelper::getImgHtml($product.id, $f.id, $v_id, 0, "alaali-img")} {/if} {/foreach}
{/foreach}
{else} {$product_show_skus = true}
{if empty($theme_settings.hide_sku_codes)} {foreach $product.skus as $sku} {if !empty($sku.sku)} {/if} {/foreach} {/if} {foreach $features_selectable as $f}
{$f.name}
{/foreach}
{/if} {$product_show_skus = true} {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 !empty($price_valid_until)} {/if} {if (!($sku.count === null) && $sku.count <= 0)} {else} {/if}
{/foreach} {else} {* else $product.sku_type *} {$product_available = false} {if count($product.skus) > 1} {$product_show_skus = true} {* When there is more than one SKU, display selector *} {$sku_list_width = $theme_settings.sku_list_width}{* 1-1 / 1-2 *} {$sku_list_hide_radio = $theme_settings.sku_list_hide_radio} {if $theme_settings.selectable_features_control == 'select'} {/if}
{else} {* When there is only one SKU, don't display the selector *}
{$sku = $product.skus[$product.sku_id]} {if $sku.sku} {$product_show_skus = true} {if !empty($theme_settings.lonely_sku_label)} {$theme_settings.lonely_sku_label} {/if}{$sku.sku|escape} {/if} {if !empty($price_valid_until)} {/if} {if !$sku.available} {if !empty($theme_settings.unavailability_alert) && empty($theme_settings.product_buy_block_hide_stocks)}
{$theme_settings.unavailability_alert}
{/if} {elseif !$wa->shop->settings('ignore_stock_count') && !($sku.count === null || $sku.count > 0)} {if empty($theme_settings.product_buy_block_hide_stocks)}
  {if $wa->shop->settings('ignore_stock_count')}[`Pre-order only`]{else}[`Out of stock`]{/if}  
{/if} {else} {/if} {$product_available = $product.status && $sku.available && ($wa->shop->settings('ignore_stock_count') || $sku.count === null || $sku.count > 0)}
{/if} {/if} {/capture} {* NOTE: END CAPTURE: SKUS*} {* NOTE: CAPTURE: Stocks *} {$product_show_stocks = ''} {capture product_stocks} {if empty($theme_settings.product_buy_block_hide_stocks)} {if $product_available || count($product.skus) > 1} {$product_show_stocks = true}
{function name=in_stock n=0 low=5 critical=2} {if $n > $low or $n === null} {if !empty($theme_settings.label_stock_instock)}   {$theme_settings.label_stock_instock}  {/if} {elseif $n > $critical} {if !empty($theme_settings.label_stock_few)}   {$theme_settings.label_stock_few}  {/if} {elseif $n > 0}   {_w("Only %d left in stock", "Only %d left in stock", $n)}  {else} {if $wa->shop->settings('ignore_stock_count')} {if !empty($theme_settings.label_stock_preorder)}   {$theme_settings.label_stock_preorder}  {/if} {else} {if !empty($theme_settings.label_stock_outofstock)}   {$theme_settings.label_stock_outofstock}  {/if} {/if} {/if} {/function} {foreach $product.skus as $sku}
{if $sku.stock} {foreach $stocks as $stock_id => $stock} {if isset($sku.stock[$stock_id])} {$stock_count = $sku.stock[$stock_id]} {else} {$stock_count = null} {/if} {in_stock n=$stock_count low=$stock.low_count critical=$stock.critical_count}  {$stock.name} {/foreach} {else} {in_stock n=$sku.count} {/if}
{/foreach} {if $product.sku_type} {if !empty($theme_settings.unavailability_sku_alert)} {/if} {/if}
{/if} {/if} {/capture} {* NOTE: END CAPTURE: Stocks *} {* NOTE: CAPTURE: Services *} {$product_show_services = ''} {capture product_services} {if $services} {$product_show_services = true}
{foreach $services as $s}
{if isset($s.variants)} {else} {/if}
{/foreach}
{* / services*} {/if} {/capture} {* NOTE: END CAPTURE: Services *} {* NOTE: CAPTURE: Price *} {capture product_price}
{shop_currency_html($product.price)}
{if $product.compare_price > 0}
{shop_currency_html($product.compare_price)}
{/if}
{/capture} {* NOTE: END CAPTURE: Price *} {* NOTE: CAPTURE: Add to cart *} {capture product_addtocart} {if $wa->shop->cart->total() > 0} {$add2cart_label = '[`Add to cart`]'} {if !empty($theme_settings.buy_button_add)} {$add2cart_label = $theme_settings.buy_button_add} {/if} {else} {$add2cart_label = '[`Buy`]'} {if !empty($theme_settings.buy_button_buy)} {$add2cart_label = $theme_settings.buy_button_buy} {/if} {/if} {$add2cart_icon = ''} {/capture} {* NOTE: END CAPTURE: Add to cart *} {* THUMBS *} {$_images = []} {$_images["default"] = [ "id" => "default", "uri_200" => $wa->shop->productImgUrl($product, "970") ]} {if $product.images} {foreach $product.images as $_image} {$_images[$_image.id] = [ "id" => $_image.id, "uri_200" => $wa->shop->imgUrl($_image, "970") ]} {/foreach} {/if} {* /* {$product.params.price_valid_until_date} */ *} {if $wa->get('cart') == 1} {* NOTE: ВЫВОД: Мультивыбор *} {$parent_id = $product.canonical_category['id']} {$cat_item = $wa->shop->category($parent_id)} {$preview_img_mode = ''}{* cover / center / none *} {if !empty($theme_settings.product_cart_preview_img_mode)} {$preview_img_mode = $theme_settings.product_cart_preview_img_mode} {/if} {if !empty($cat_item.params.preview_img_mode)} {$preview_img_mode = $cat_item.params.preview_img_mode} {/if} {if !empty($product.params.preview_img_mode)} {$preview_img_mode = $product.params.preview_img_mode} {/if}
{if $preview_img_mode !== 'none'}
{$product.name|escape}
{$product.name|escape}
{/if}{* / $preview_img_mode !== 'none' *} {* / uk-modal-header*}
{if $product.summary}
{$product.summary|truncate:512}
{/if} {if !empty($product_show_skus)}
{$smarty.capture.product_skus}
{else} {$smarty.capture.product_skus} {/if} {if !empty($product_show_stocks)}
{$smarty.capture.product_stocks}
{/if} {if !empty($product_show_services)}
{$smarty.capture.product_services}
{/if}
{* / uk-modal-body*}
{* / uk-modal-footer*}
{if $preview_img_mode !== 'none'}
{* / uk-width*}
{* / uk-grid *} {/if}
{* / $preview_img_mode !== 'none' *} {elseif $wa->get('cart') == quick_full} {* NOTE: ВЫВОД: Быстрый просмотр *} {$parent_id = $product.canonical_category['id']} {$cat_item = $wa->shop->category($parent_id)}
isMobile()} data-uk-overflow-auto{/if}> {*/uk-modal-header*}
{include file="product.gallery.html" thumbs_location="bottom" image_thumbs_size="48x48" video_location="in_gallery" inline}
{if count($product.categories) > 1 && empty($theme_settings.product_page_cats_hide)}
[`Categories`]
{$cat_visible_count = ''} {$cat_visible_limit = 1000} {if !empty($theme_settings.product_page_cats_hide_limit)} {$cat_visible_limit = $theme_settings.product_page_cats_hide_limit + 1} {/if} {foreach $product.categories as $c} {if $c.status} {* {if !empty($param_item.params.icon)} {/if} *} {$c.name|escape} {if !$c@last},{/if} {$param_item = $wa->shop->category($c.id)} {/if} {/foreach} {if !empty($cat_visible_count)} {/if}
{* / product-cats*} {/if} {if $product.tags && empty($theme_settings.product_page_tags_hide)}
[`Tags`]
{$tag_visible_count = ''} {$tag_visible_limit = 1000} {if !empty($theme_settings.product_page_tags_hide_limit)} {$tag_visible_limit = $theme_settings.product_page_tags_hide_limit + 1} {/if} {foreach $product.tags as $t} {$t} {if !$t@last},{/if} {/foreach} {if !empty($tag_visible_count)} {/if}
{* / product-tags*} {/if} {* *}
{* / uk-modal-body uk-padding-remove-vertical*}
{*/uk-width-1-3@s*}
{if $product.summary}
{$product.summary|truncate:512}
{/if} {if !empty($product_show_skus)}
{$smarty.capture.product_skus}
{else} {$smarty.capture.product_skus} {/if} {if !empty($product_show_stocks)}
{$smarty.capture.product_stocks}
{/if} {if !empty($product_show_services)}
{$smarty.capture.product_services}
{/if} {if !empty($product.features)}
[`Features`]
{/if}
{* /uk-modal-body*}
{* / uk-width*}
{* / uk-modal-body*}
{*/uk-modal-footer*}
{else}{* else $wa->get('cart') *} {* NOTE: ВЫВОД: Страница товара *}
{sprintf('[`Buy %s`]',$product.name|escape)}
{if $product.summary}
{$product.summary|truncate:512} {if !empty($product.description)}
{if !empty($place) && $place == "reviews"} {else} [`Full summary`]  {/if}
{/if}
{/if} {if !empty($product_show_skus)}
{$smarty.capture.product_skus}
{else} {$smarty.capture.product_skus} {/if} {if !empty($product_show_stocks)}
{$smarty.capture.product_stocks}
{/if}
{* Должны идти в .purchase *} {if !empty($product_show_services)}
{$smarty.capture.product_services}
{/if}
{$smarty.capture.product_price}
{* / uk-card-body*} {* / uk-card-footer*}
{* / add2cart*}
{* / purchase*}
{* / #cart-form*} {/if}{* !$wa->get('cart')*} {/strip}