{extends file="admin-layout.tpl"} {block name="page-title"}{intl l='Edit an order'}{/block} {block name="check-permissions"}admin.order.edit{/block} {block name="main-content"} {assign oder_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} {assign "orderCurrency" $SYMBOL} {/loop} {assign "orderStatusId" $STATUS}
{$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'}
{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}
{$orderCurrency} {$realPrice} {$orderCurrency} {$realTax} {$orderCurrency} {$realTaxedPrice} {$QUANTITY} {$orderCurrency} {$realTaxedPrice * $QUANTITY}
{intl l="Total without discount"} {$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}
{intl l="Discount"} {$orderCurrency} 0
{intl l="Coupon code"} {$orderCurrency} 0
{intl l="Total including discount"} {$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}
{intl l="Postage"} {$orderCurrency} {$POSTAGE}
{intl l="Total"} {$orderCurrency} {$TOTAL_TAXED_AMOUNT}
{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}
{/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}