{extends file="layout.tpl"} {* Security *} {block name="no-return-functions" prepend} {check_auth role="CUSTOMER" login_tpl="login"} {/block} {* Breadcrumb *} {block name='no-return-functions' append} {$breadcrumbs = [ ['title' => {intl l="Account"}, 'url'=>{url path="/account"}], ['title' => {intl l="Order details"}, 'url'=>{url path="/account/order-seller/%order_id" order_id=$order_id}] ]} {/block} {block name="body-class"}page-account-order{/block} {block name="main-content"}
{ifloop rel="order"} {loop name="order" type="ampseller_order" customer="current" id="$order_id" limit="1" } {$payment_id=$PAYMENT_MODULE} {$delivery_id=$DELIVERY_MODULE} {$status=$STATUS}

# {intl l="Order details %ref" ref={$REF}}

{hook name="account-order.top" order={$order_id}} {* Infos *}

{intl l="Seller"}
  {$AMP_SELLER_NAME}
{intl l="REF"}
  {$REF}
{intl l="Created"}
  {format_date date=$CREATE_DATE output="datetime"}
{intl l="Status"}
  {loop type="order-status" name="order_status" id=$STATUS}{$TITLE}{/loop}
{if $IS_PAID}
{intl l="Invoice date"}
  {format_date date=$INVOICE_DATE output="date"}
{if $INVOICE_REF}
{intl l="Invoice REF"}
  {$INVOICE_REF}
{/if}
{intl l="PDF invoice"}
  {intl l="Download"}
{/if} {if $DELIVERY_REF}
{intl l="Delivery REF"}
  {$DELIVERY_REF}
{/if}
{intl l="Customer Number"}
  {loop type="customer" name="customer.invoice" id=$CUSTOMER current="0"}{$REF}{/loop}
{hookblock name="account-order.information" order={$order_id} fields="title,value"} {forhook rel="account-order.information"}
{$title}
  {$value}
{/forhook} {/hookblock}

{hook name="account-order.after-information" order={$order_id}} {* Addresses *}
{intl l="Delivery"}

#### {intl l="Delivery Mode"}

{ifhook rel="account-order.delivery-information"} {hook name="account-order.delivery-information" module={$delivery_id} order={$order_id}} {/ifhook} {elsehook rel="account-order.delivery-information"}

{loop name="delivery-module" type="module" id=$DELIVERY_MODULE}{$TITLE}{/loop}

{/elsehook}

#### {intl l="Address"}

{ifhook rel="account-order.delivery-address"} {* delivery module can customize the delivery address *} {hook name="account-order.delivery-address" module={$delivery_id} order={$order_id}} {/ifhook} {elsehook rel="account-order.delivery-address"} {format_address order_address=$DELIVERY_ADDRESS} {/elsehook} {hook name="account-order.delivery-address-bottom" module={$delivery_id} order={$order_id}}
{intl l="Billing"}

#### {intl l="Payment Mode"}

{ifhook rel="account-order.invoice-information"} {hook name="account-order.invoice-information" module={$payment_id} order={$order_id}} {/ifhook} {elsehook rel="account-order.invoice-information"}

{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}

{if $TRANSACTION_REF}

{intl l="Transaction REF : %ref" ref={$TRANSACTION_REF}}

{/if} {/elsehook}

#### {intl l="Address"}

{ifhook rel="account-order.invoice-address"} {* payment module can customize the delivery address *} {hook name="account-order.invoice-address" module={$payment_id} order={$order_id}} {/ifhook} {elsehook rel="account-order.invoice-address"} {format_address order_address=$INVOICE_ADDRESS} {/elsehook} {hook name="account-order.invoice-address-bottom" module={$payment_id} order={$order_id}}
{hook name="account-order.after-addresses" order={$order_id}} {* products *}

{intl l="Product Name"} {intl l="Name"} | {intl l="Unit Price"} {intl l="Price"} | {intl l="Unit Taxed Price"} {intl l="Taxed Price"} | {intl l="Quantity"} {intl l="Qty"} | {intl l="Total"} {intl l="Total"}
--- | --- | --- | --- | ---
{ifhook rel="account-order.products-top"}
{hook name="account-order.products-top" order={$order_id}}
{/ifhook} {loop type="order_product" name="order-products" order="$ORDER_ID" id="$ORDER_PRODUCT_ID"} {if $WAS_IN_PROMO == 1} {assign "realPrice" $PROMO_PRICE} {assign "realTax" $PROMO_PRICE_TAX} {assign "realTaxedPrice" $TAXED_PROMO_PRICE} {assign "realTotalPrice" $TOTAL_TAXED_PROMO_PRICE} {else} {assign "realPrice" $PRICE} {assign "realTax" $PRICE_TAX} {assign "realTaxedPrice" $TAXED_PRICE} {assign "realTotalPrice" $TOTAL_TAXED_PRICE} {/if} {$taxes[{$TAX_RULE_TITLE}][] = $realTax * $QUANTITY}
{$TITLE} {ifloop rel="combinations"} {loop type="order_product_attribute_combination" name="combinations" order_product=$ID} {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE} {/loop} {/ifloop} {hook name="account-order.product-list" order_id={$order_id} order_product_id={$ID} product={$PRODUCT_ID}} | {format_money number=$realPrice currency_id=$CURRENCY} | {format_money number=$realTaxedPrice currency_id=$CURRENCY} | {$QUANTITY} | {format_money number=$realTotalPrice currency_id=$CURRENCY}
{ifhook rel="account-order.product-extra"}
{hook name="account-order.product-extra" order={$order_id} order_product={$ID} product={$PRODUCT_ID}}
{/ifhook} {/loop} {ifhook rel="account-order.products-bottom"}
{hook name="account-order.products-bottom" order={$order_id}}
{/ifhook}

{hook name="account-order.after-products" order={$order_id}}

{if $DISCOUNT}
{intl l="Discount"} | {format_money number=$DISCOUNT currency_id=$CURRENCY}
{/if}
{intl l="Total without tax"} | {format_money number={$TOTAL_UNTAXED_AMOUNT} currency_id=$CURRENCY}
{strip} {capture name="tax"} {foreach $taxes as $name=>$prices} {assign var="_price_taxe_" value="0"} {foreach $prices as $price} {$_price_taxe_= $_price_taxe_ + $price} {/foreach} {if $_price_taxe_ != 0}
{$name} | {format_money number=$_price_taxe_ currency_id=$CURRENCY}
{/if} {/foreach} {/capture} {/strip} {if $smarty.capture.tax ne ""} {$smarty.capture.tax nofilter} {/if}
{intl l="Total with tax"} | {format_money number={$TOTAL_TAXED_AMOUNT} currency_id=$CURRENCY}
{intl l="Postage"} | {format_money number=$POSTAGE curency_id=$CURRENCY}
### {intl l="Total"} | ### {format_money number=$TOTAL_TAXED_AMOUNT_POSTAGE currency_id=$CURRENCY}

{hook name="account-order.bottom" order={$order_id}}
{/loop} {/ifloop} {elseloop rel="order"}
{intl l="ACCESS FORBIDDEN"}
{/elseloop}
{/block} {block name="stylesheet"} {hook name="account-order.stylesheet"} {/block} {block name="after-javascript-include"} {hook name="account-order.after-javascript-include" order=$order_id} {/block} {block name="javascript-initialization"} {hook name="account-order.javascript-initialization" order=$order_id} {/block}