{$categories_rights = $wa->userRights('setscategories')}

← [`Back`] {if $product.id == 'new'}[`New product`]{else}{$product.name|escape}{/if} id: {$product.id} {if !empty($edit_rights)} [`Try out new product editor`] {elseif !($product.id === 'new' || $product.status === "-1")} [`Try out new product editor`] {/if} {* @event backend_product.%plugin_id%.title_suffix *} {if !empty($backend_product)}{foreach $backend_product as $_}{ifset($_, 'title_suffix', '')}{/foreach}{/if} {if $edit_rights} [`Edit`] {/if} {* @event backend_product.%plugin_id%.action_button *} {if !empty($backend_product)}{foreach $backend_product as $_}{ifset($_, 'action_button', '')}{/foreach}{/if}

{* PRODUCT PROFILE SECTION BEGIN *}
{* @event backend_product.%plugin_id%.info_section *} {if !empty($backend_product)}{foreach $backend_product as $_}{ifset($_, 'info_section', '')}{/foreach}{/if} {capture name='template-product-categories'} {literal} {% if (!$.isEmptyObject(o.categories) && $.isArray(o.categories)) { %} {% for (var i = 0; i < o.categories.length; i += 1) { %} {% var category = o.categories[i]; %}
  • {%=category.name%}
  • {% } %} {% } %} {/literal} {/capture} {capture name='template-product-tags'} {literal} {% if (!$.isEmptyObject(o.tags) && $.isArray(o.tags)) { %} {% for (var i = 0; i < o.tags.length; i += 1) { %} {% var tag = o.tags[i]; %}
  • {%=tag.name%}
  • {% } %} {% } %} {/literal} {/capture}
      {if $report_rights}
      {/if}
      [`Available stock balance`]: {shopHelper::getStockCountIcon($product.count)}{if $product.count !== null}{$product.count}{else}∞{/if}

      {if $report_rights && $forecast.date !== null}

      {if $forecast.days < shopProduct::MAX_FORECAST_DAYS} {* this is 10 years *} {sprintf( _w('Based on your average monthly sales volume for %s during last three months (%d units per month), you will run out of this product in %d days (on %s).'), $product.name|escape, $forecast.sold_rounded, $forecast.days, wa_date("humandate", $forecast.date) )} {else} {sprintf( _w('Based on your average monthly sales volume for %s during last three months (%d units per month), you will run out of this product in more than 10 years (on %s).'), $product.name|escape, $forecast.sold_rounded, wa_date("humandate", $forecast.date) )} {/if}

      {/if}
      {capture name='template-product-stock-stat'}

      [`Available stock balance`]: {literal}{% if (o.count !== null) { %}{%#o.count%}{% } else { %}∞{% } %}{/literal}

      {literal} {% if (o.count !== null && !$.isEmptyObject(o.runout_str)) { %} {%=o.runout_str%} {% } %} {/literal} {/capture} {foreach $product.skus as $sku_id => $sku} {if $edit_rights} {/if} {/foreach} {capture name='template-sku'}{literal} {% var sku_id = o.sku_id; %} {% var sku = o.sku; %} {% var stocks = o.stocks || {}; %} {% sku.stocks = sku.stocks || {}; %} {% var stock_ids = o.stock_ids; %} {/literal} {if $edit_rights} {/if} {/capture}
      {$sku.name|escape} {$sku.sku|escape} {if !empty($sku.file_name)} {/if} {if $product.currency !== null}{wa_currency_html($sku.price, $product.currency)}{else}{wa_currency_html($sku.price, $primary_currency)}{/if} {if !count($sku.stock)} {shopHelper::getStockCountIcon($sku.count)} {if $sku.count === null}∞{else}{$sku.count}{/if} {else} {foreach $stocks as $stock_id => $stock} {if isset($sku.stock[$stock_id])} {$count = $sku.stock[$stock_id]} {else} {$count = null} {/if} {shopHelper::getStockCountIcon($count, $stock_id)} {if $count === null}∞{else}{$count}{/if} {if count($stocks) > 1} {$stock.name|escape}
      {/if} {/foreach} {/if}
      [`Edit`]
      {%=sku.name%} {%=sku.sku%} {% if (sku.file_name) { %} {% } %} {%#sku.price_html%} {% if (!$.isEmptyObject(sku.stock)){ %} {% for (var i = 0, n = stock_ids.length; i < n; i += 1) { %} {% var stock_id = stock_ids[i]; %} {% count = typeof sku.stock[stock_id] !== 'undefined' ? sku.stock[stock_id] : null; %} {%# sku.stock_icon[stock_id] %} {% if (count === null) { %}∞{% }else{ %}{%=''+count%}{% } %} {% if (!$.isEmptyObject(stocks)){ %} @{%=stocks[stock_id]['name']%}
      {% } %} {% } %} {% } else { %} {%# sku.stock_icon[0] %} {% if (sku.count === null) { %}∞{% }else{ %}{%=''+sku.count%}{% } %} {% } %}
      {literal}[`Edit`]{/literal}
      {* PRODUCT PROFILE SECTION END *} {* PRODUCT EDIT SECTION MENU BEGIN *} {* PRODUCT EDIT SECTION MENU END *}
      {* PRODUCT EDIT MAIN TAB SECTION BEGIN *} {* PRODUCT EDIT MAIN TAB SECTION END *} {* PRODUCT EDIT DESCRIPTIONS TAB SECTION BEGIN *} {* PRODUCT EDIT DESCRIPTIONS TAB SECTION END *} {capture name="template-productprofile-tab"}{literal}
      [`Loading`]
      {/literal}{/capture}
      Ctrl + S
      {capture name='template-product-image-list'} {literal} {% if (o.type === 'crop') { %} {% include('template-product-crop-image-list', o); %} {% } else { %} {% include('template-product-thumb-image-list', o); %} {% } %} {/literal} {/capture} {capture name='template-product-crop-image-list'} {literal} {% var image, image_iterator = $.shop.iterator(o.images); %} {% while (image = image_iterator.next()) { %}
    • {% } %} {/literal} {/capture} {capture name='template-product-thumb-image-list'} {literal} {% var image, image_iterator = $.shop.iterator(o.images); %} {% while (image = image_iterator.next()) { %}
    • {% if (image.description) { %}
      {%#image.description%}
      {% } else { %}
      {%#o.placeholder%}
      {% } %}
    • {% } %} {/literal} {/capture} {* js templates block*} {foreach $smarty.capture as $template => $template_content} {if $template_content && (strpos($template, 'template-')===0)} {capture name=$template}{/capture} {/if} {/foreach} {$title_suffix = " — "|cat:{$wa->accountName(false)}|escape:'javascript'}