{* Templates *} {function name="service_item"} {$multi_variants = count($service.variants) > 1}
  • {if !empty($service.item)} {if !empty($service.fake)} {else} {if !$multi_variants} {else} {/if} {/if} {$currency} {else} {if !$multi_variants} {$service.variants[$service.variant_id].price_str} {else} {/if} {$currency} {/if}
  • {/function} {function name="product_item"} {$product_sku = null} {if $product.url_crop_small} {else} {/if} {if empty($product.fake)}{$product.name}{else}{$product.item.name}{/if} {if empty($product.fake)}{$product.price_str}{/if} {if empty($product.fake)} {if count($product.skus) == 1} {$product.icon} {else} {$product.icon} {/if} {/if}

    {if count($product.skus) > 1}

    {else} {$product_sku = $product.skus[$product.item.sku_id]} {if $product_sku && empty($product_sku.fake) && $product_sku.sku} {$product_sku.sku} {/if} {if !empty($product.fake)}

    {else if !empty($product_sku.fake)}

    {sprintf(_w('SKU %s no longer exists for this product'), $product_sku['name'])}

    {/if} {/if}

    {if !empty($product.services)} {/if} × {if $product_sku && !empty($product_sku.stock)} @ {else} {/if} {$currency} {/function}

    {if !$order}[`Add products`]{else}{shopHelper::encodeOrderId({$order.id})}{/if}

    [`Comment to the order`]:
    {if $order} {foreach $order.items as $product} {call product_item index = $product@index} {/foreach} {/if}
    [`Subtotal`] {$currency}
    [`Shipping`] {if $order} {$order_items = $order.items} {$order_currency = $order.currency} {$order_total = $order.subtotal - $order.discount} {else} {$order_items = array()} {$order_currency = null} {$order_total = 0} {/if} {$shipping_methods = shopHelper::getShippingMethods($shipping_address, $order_items, ['currency' => $order_currency, 'total_price' => $order_total])}
    {$currency}
    [`Payment`] {$payment_methods = shopHelper::getPaymentMethods($order)}
    {foreach $payment_methods as $m} {if !empty($m.custom_html)}
    {$m.custom_html}
    {/if} {/foreach}
    [`Discount`] {$currency} {if $order}{/if}
    [`Total`] {$currency}
    {if !empty($taxes_count)} [`Tax will be calculated after the order is saved.`] {/if}
    {$wa->csrf()}
    {* @event backend_order_edit.%plugin_id% *} {if !empty($backend_order_edit)}{foreach $backend_order_edit as $plugin_id => $plugin_html}{$plugin_html}{/foreach}{/if}