{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'order'} {/block} {block name="page-title"}{intl l='Edit an order'}{/block} {block name="check-resource"}admin.order{/block} {block name="check-access"}update{/block} {block name="main-content"} {assign order_tab {$smarty.get.tab|default:"cart"}}
{ifloop rel='the-order'} {loop type="order" name="the-order" id=$order_id customer="*"} {loop type="currency" name="order-currency" id=$CURRENCY} {$orderCurrency=$SYMBOL} {/loop} {assign "orderStatusId" $STATUS}
{intl l='Order %ref - ID %id' id={$ID} ref={$REF}}
{loop type="order_product" name="order-products" order=$ID} {if $WAS_IN_PROMO == 1} {assign "realPrice" $PROMO_PRICE} {assign "realTax" $PROMO_PRICE_TAX} {assign "realTaxedPrice" $TAXED_PROMO_PRICE} {else} {assign "realPrice" $PRICE} {assign "realTax" $PRICE_TAX} {assign "realTaxedPrice" $TAXED_PRICE} {/if} {/loop}
{intl l='Cart - Prices in %currency' currency={$orderCurrency}}
{intl l="Product"} {intl l="Unit. price"} {intl l="Tax"} {intl l="Unit taxed price"} {intl l="Quantity"} {intl l="Taxed total"}
{$TITLE} {ifloop rel="combinations"}
{loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
{$ATTRIBUTE_TITLE}
{$ATTRIBUTE_AVAILABILITY_TITLE}
{/loop}
{/ifloop} {module_include location='order-product-list'}
{format_money number=$realPrice symbol=$orderCurrency} {format_money number=$realTax symbol=$orderCurrency} {format_money number=$realTaxedPrice symbol=$orderCurrency} {$QUANTITY} {format_money number=$realTaxedPrice * $QUANTITY symbol=$orderCurrency}
{intl l="Total without discount"} {format_money number=$TOTAL_TAXED_AMOUNT-$POSTAGE+$DISCOUNT symbol=$orderCurrency}
{intl l="Discount"} {format_money number=$DISCOUNT symbol=$orderCurrency}
{intl l="Coupon code"} {loop type="order_coupon" name="couponcode" order=$ID} {$CODE}{if $LOOP_COUNT != $LOOP_TOTAL}, {/if} {/loop} {elseloop rel="couponcode"} Ø {/elseloop}
{intl l="Total including discount"} {format_money number=$TOTAL_TAXED_AMOUNT-$POSTAGE symbol=$orderCurrency}
{intl l="Postage"} {format_money number=$POSTAGE symbol=$orderCurrency}
{intl l="Total"} {format_money number=$TOTAL_TAXED_AMOUNT symbol=$orderCurrency}
{intl l='Payment information'}
{intl l="Payment module"} {loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}
{intl l="Transaction reference"} {$TRANSACTION_REF}
{intl l='Delivery module'}
{loop name="payment-module" type="module" id=$DELIVERY_MODULE}
{intl l="Name"}
{$TITLE}
{intl l="Description"}
{$DESCRIPTION}
{/loop}
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS} {/loop}
{intl l='Invoice informations'}
{intl l="Invoice reference"} {$INVOICE_REF}
{intl l="Invoice date"} {format_date date=$INVOICE_DATE output="date"}
{intl l="Title"} {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}
{intl l="Company"} {$COMPANY}
{intl l="Firstname"} {$FIRSTNAME}
{intl l="Lastname"} {$LASTNAME}
{intl l="Street address"} {$ADDRESS1}
{intl l="Additional address"} {$ADDRESS2}
{intl l="Additional address"} {$ADDRESS3}
{intl l="Zip code"} {$ZIPCODE}
{intl l="City"} {$CITY}
{intl l="Country"} {loop type="country" name="order-invoice-address-country" id=$COUNTRY}{$TITLE}{/loop}
{intl l="Phone"} {$PHONE}
{loop type="order_address" name="order-delivery-address" id=$DELIVERY_ADDRESS} {/loop}
{intl l='Delivery address'}
{intl l="Title"} {loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}
{intl l="Company"} {$COMPANY}
{intl l="Firstname"} {$FIRSTNAME}
{intl l="Lastname"} {$LASTNAME}
{intl l="Street address"} {$ADDRESS1}
{intl l="Additional address"} {$ADDRESS2}
{intl l="Additional address"} {$ADDRESS3}
{intl l="Zip code"} {$ZIPCODE}
{intl l="City"} {$CITY}
{intl l="Country"} {loop type="country" name="order-delivery-address-country" id=$COUNTRY}{$TITLE}{/loop}
{intl l="Phone"} {$PHONE}
{include file="includes/module-tab-content.html" location="order-edit"}
{/loop} {/ifloop} {elseloop rel="the-order"} DOES NOT EXISTS {/elseloop}
{* Update an Address *} {form name="thelia.order.update.address"} {* Capture the dialog body, to pass it to the generic dialog *} {capture "edit_order_address_dialog"} {form_hidden_fields form=$form} {form_field form=$form field='id'} {/form_field} {form_field form=$form field='company'}
{/form_field} {form_field form=$form field='title'}
{/form_field} {form_field form=$form field='firstname'}
{/form_field} {form_field form=$form field='lastname'}
{/form_field} {form_field form=$form field='address1'}
{form_field form=$form field='address2'} {/form_field}
{form_field form=$form field='address3'} {/form_field}
{/form_field} {form_field form=$form field='zipcode'}
{/form_field} {form_field form=$form field='city'}
{/form_field} {form_field form=$form field='country'}
{/form_field} {form_field form=$form field='phone'}
{/form_field} {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "edit_order_address_dialog" dialog_title = {intl l="Edit order address"} dialog_body = {$smarty.capture.edit_order_address_dialog nofilter} dialog_ok_label = {intl l="Confirm changes"} dialog_cancel_label = {intl l="Cancel"} form_action = {url path="/admin/order/update/$order_id/address"} form_enctype = {form_enctype form=$form} form_error_message = $form_error_message form_id = 'updateOrderAddressForm' } {/form} {/block} {block name="javascript-initialization"} {javascripts file='assets/js/bootstrap-select/bootstrap-select.js'} {/javascripts} {javascripts file='assets/js/main.js'} {/javascripts} {/block} {block name="javascript-last-call"} {module_include location='order-edit-js'} {/block}