{*
* 2007-2024 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2024 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{extends file='module:agilemultisellerpro/views/templates/front/layouts/selleraccount.tpl'}

{block name='page_content'}
	{if isset($isSeller) && $isSeller && $order}
		<div id="agile" class="page-order-detail">
			{if count($order_history)}
				<div class="box">
					<form
						action="{$link->getModuleLink('agilemultisellerpro', 'sellerorderdetail', ['ref_order' => $order->reference], true)|escape:'htmlall':'UTF-8'}"
						method="post" class="std">
						<div class="text-xs-center">
							<h3>
								{l s='Order' d='Modules.Agilemultisellerpro.Orders'} <span
								class="color-myaccount">{l s='#' d='Modules.Agilemultisellerpro.Orders'}{$order->reference|escape:'htmlall':'UTF-8'}</span>
							- {l s='placed on' d='Modules.Agilemultisellerpro.Orders'} {dateFormat date=$order->date_add full=0}
								{* <span class="agile-pull-right">
									<a class="agile-btn agile-btn-default"
										href="{$link->getModuleLink('agilemultisellerpro', 'sellerorders', ['process' =>'orders'], true)|escape:'htmlall':'UTF-8'}">
										<i class="icon-th-list"></i>&nbsp;{l s=' Back to order list' d='Modules.Agilemultisellerpro.Orders'}
									</a>
								</span> *}
							</h3>
						</div>
						<div class="form-group row mt-2 mb-2">
							<div class="col-md-4">
								<select class="form-control" id="id_order_state" name="id_order_state">
									{foreach from=$order_states item=order_state}
										<option value="{$order_state['id_order_state']|intval}" {if $order_state['id_order_state'] == $order_cur_state}selected{/if}>
											{$order_state['name']|escape:'htmlall':'UTF-8'}
										</option>
									{/foreach}
								</select>
							</div>
							<div class="input-group col-md-4">
								<input type="hidden" name="id_order" value="{$order->id|intval}" />
								<input type="submit" name="submitState" value="{l s='Change Status' d='Modules.Agilemultisellerpro.Orders'}"
									class="btn btn-primary" />
							</div>
						</div>
					</form>
				</div>

				<div class="box table-responsive">
					<h3>{l s='Follow your order\'s status step-by-step' d='Modules.Agilemultisellerpro.Orders'}</h3>
					<table class="table table-striped table-bordered table-labeled hidden-xs-down">
						<thead class="thead-default">
							<tr>
								<th class="first_item">{l s='Date' d='Modules.Agilemultisellerpro.Orders'}</th>
								<th class="last_item">{l s='Status' d='Modules.Agilemultisellerpro.Orders'}</th>
							</tr>
						</thead>
						<tbody>
							{foreach from=$order_history item=state name="orderStates"}
								<tr class="{if $smarty.foreach.orderStates.first}first_item{elseif $smarty.foreach.orderStates.last}last_item{/if}
									{if $smarty.foreach.orderStates.index % 2}alternate_item{else}item{/if}"
								>
									<td>{dateFormat date=$state.date_add full=0}</td>
									<td>
										<span class="label label-pill bright" {if $state.color}style="background-color:{$state.color|escape:'htmlall':'UTF-8'};"{/if}>
											{$state.ostate_name|escape:'htmlall':'UTF-8'}
										</span>
									</td>
								</tr>
							{/foreach}
						</tbody>
					</table>
				</div>
			{/if}

			{if isset($followup)}
				<div class="form-group">
					<p class="bold">
						{l s='Click the following link to track the delivery of your order' d='Modules.Agilemultisellerpro.Orders'}</p>
					<a href="{$followup|escape:'htmlall':'UTF-8'}">{$followup|escape:'htmlall':'UTF-8'}</a>
				</div>
			{/if}

			<div class="order-infos">
				<div class="box">
					<ul>
						<li>
							<strong>{l s='Order:' d='Modules.Agilemultisellerpro.Orders'}</strong>
							{l s='#' d='Modules.Agilemultisellerpro.Orders'}{$order->reference|escape:'htmlall':'UTF-8'}
						</li>

						{if $carrier->id}
							<li>
								<strong>{l s='Carrier:' d='Modules.Agilemultisellerpro.Orders'}</strong>
								{if $carrier->name == "0"}
									{$shop_name|escape:'htmlall':'UTF-8'}
								{else}
									{$carrier->name|escape:'htmlall':'UTF-8'}
								{/if}
							</li>
						{/if}

						<li>
							<strong>{l s='Payment method:' d='Modules.Agilemultisellerpro.Orders'}</strong>
							{l s='#' d='Modules.Agilemultisellerpro.Orders'}{$order->payment|escape:'htmlall':'UTF-8'}
						</li>

						{if $order->recyclable}
							<li>
								<p><img src="{$base_dir_ssl|escape:'htmlall':'UTF-8'}modules/agilemultisellerpro/views/img/icon/recyclable.gif"
										alt=""
										class="icon" />&nbsp;{l s='Permission to receive order in recycled packaging is given.' d='Modules.Agilemultisellerpro.Orders'}
								</p>
							</li>
						{/if}

						{if $order->gift}
							<li>
								<p><img src="{$base_dir_ssl|escape:'htmlall':'UTF-8'}modules/agilemultisellerpro/views/img/icon/gift.gif" alt=""
										class="icon" />&nbsp;{l s='Gift-wrapping for order is requested.' d='Modules.Agilemultisellerpro.Orders'}</p>
								<p>{l s='Message:' d='Modules.Agilemultisellerpro.Orders'} {$order->gift_message|escape:'htmlall':'UTF-8'}</p>
							</li>
						{/if}
					</ul>
				</div>
			</div>

			<div class="addresses">
				<div class="col-lg-6 col-md-6 col-sm-6">
					<article id="invoice-address" class="box">
						<ul class="address alternate_item {if $order->isVirtual()}full_width{/if}">
							<li class="address_title"><h4>{l s='Delivery address' d='Modules.Agilemultisellerpro.Orders'}</h4></li>
							{foreach from=$dlv_adr_fields name=dlv_loop item=field_item}
								{if $field_item eq "company" && isset($address_delivery->company)}<li class="address_company">
										{$address_delivery->company|escape:'htmlall':'UTF-8'}</li>
								{elseif $field_item eq "address2" && $address_delivery->address2}<li class="address_address2">
										{$address_delivery->address2|escape:'htmlall':'UTF-8'}</li>
								{elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}<li class="address_phone_mobile">
										{$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}</li>
								{else}
									{assign var=address_words value=" "|explode:$field_item}
									<li>
										{foreach from=$address_words item=word_item name="word_loop"}
											{if !$smarty.foreach.word_loop.first} {/if}<span
												class="address_{$word_item|escape:'htmlall':'UTF-8'}">{$deliveryAddressFormatedValues[trim($word_item,",")]|escape:'htmlall':'UTF-8'}</span>
										{/foreach}
									</li>
								{/if}
							{/foreach}
						</ul>
					</article>
				</div>

				<div class="col-lg-6 col-md-6 col-sm-6">
					<article id="delivery-address" class="box">
						<ul class="address item form-group"
							{if $order->isVirtual()}style="display:none;" {/if}>
							<li class="address_title"><h4>{l s='Invoice address' d='Modules.Agilemultisellerpro.Orders'}</h4></li>
							{foreach from=$inv_adr_fields name=inv_loop item=field_item}
								{if $field_item eq "company" && isset($address_invoice->company)}<li class="address_company">
										{$address_invoice->company|escape:'htmlall':'UTF-8'}</li>
								{elseif $field_item eq "address2" && $address_invoice->address2}<li class="address_address2">
										{$address_invoice->address2|escape:'htmlall':'UTF-8'}</li>
								{elseif $field_item eq "phone_mobile" && $address_invoice->phone_mobile}<li class="address_phone_mobile">
										{$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}</li>
								{else}
									{assign var=address_words value=" "|explode:$field_item}
									<li>
										{foreach from=$address_words item=word_item name="word_loop"}
											{if !$smarty.foreach.word_loop.first} {/if}<span
												class="address_{trim($word_item,",")|escape:'htmlall':'UTF-8'}">{$invoiceAddressFormatedValues[trim($word_item,",")]|escape:'htmlall':'UTF-8'}</span>
										{/foreach}
									</li>
								{/if}
							{/foreach}
						</ul>
					</article>
				</div>
			</div>

			<div class="clearfix"></div>

			<div id="order-products" class="box table-responsive">
				<table class="table table-bordered">
					<thead class="thead-default">
						<tr>
							<th class="first_item">{l s='Reference' d='Modules.Agilemultisellerpro.Orders'}</th>
							<th class="item">{l s='Product' d='Modules.Agilemultisellerpro.Orders'}</th>
							<th class="item">{l s='Quantity' d='Modules.Agilemultisellerpro.Orders'}</th>
							<th class="item">{l s='Unit price' d='Modules.Agilemultisellerpro.Orders'}</th>
							<th class="last_item">{l s='Total price' d='Modules.Agilemultisellerpro.Orders'}</th>
						</tr>
					</thead>
					<tfoot>
						<tr class="item line-price">
							<td class="text-xs-right" colspan="4">
								{l s='Total products' d='Modules.Agilemultisellerpro.Orders'}
								{if $use_tax}{l s='(tax incl.)' d='Modules.Agilemultisellerpro.Orders'}{/if}:
							</td>
							<td>{Tools::displayPrice($order->total_products_wt, $currency)|escape:'htmlall':'UTF-8'}</td>
						</tr>

						{* {if $order->total_discounts > 0}
							<tr class="item line-price-discount">
								<td class="text-xs-right" colspan="4}">
									{l s='Total vouchers:' d='Modules.Agilemultisellerpro.Orders'}
								</td>
								<td>{Tools::displayPrice($order->total_discounts, $currency)}</td>
							</tr>
						{/if} *}

						{* {if $order->total_wrapping > 0}
							<tr class="item line-wrapping">
								<td class="text-xs-right" colspan="4">
									{l s='Total gift-wrapping:' d='Modules.Agilemultisellerpro.Orders'}
								</td>
								<td>{Tools::displayPrice($order->total_wrapping, $currency)}</td>
							</tr>
						{/if} *}

						<tr class="item line-shipping">
							<td class="text-xs-right" colspan="4">
								{l s='Total shipping' d='Modules.Agilemultisellerpro.Orders'}
								{if $use_tax}{l s='(tax incl.)' d='Modules.Agilemultisellerpro.Orders'}{/if}:
							</td>
							<td>{Tools::displayPrice($order->total_shipping, $currency)|escape:'htmlall':'UTF-8'}</td>
						</tr>

						<tr class="totalprice item line-price">
							<td class="text-xs-right" colspan="4">
								{l s='Total:' d='Modules.Agilemultisellerpro.Orders'}
							</td>
							<td>{Tools::displayPrice($order->total_paid, $currency)|escape:'htmlall':'UTF-8'}</td>
						</tr>
					</tfoot>
					<tbody>
						{foreach from=$products item=product name=products}
							{if !isset($product.deleted)}
								{assign var='productId' value=$product.product_id}
								{assign var='productAttributeId' value=$product.product_attribute_id}
								{if isset($product.customizedDatas)}
									{assign var='productQuantity' value=$product.product_quantity-$product.customizationQuantityTotal}
								{else}
									{assign var='productQuantity' value=$product.product_quantity}
								{/if}
								<!-- Customized products -->
								{if isset($product.customizedDatas)}
									<tr class="item">
										<td><label
												for="cb_{$product.id_order_detail|intval}">{if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}</label>
										</td>
										<td class="bold">
											<label
												for="cb_{$product.id_order_detail|intval}">{$product.product_name|escape:'htmlall':'UTF-8'}</label>
										</td>
										<td><label for="cb_{$product.id_order_detail|intval}"><span
													class="order_qte_span editable">{$product.customizationQuantityTotal|intval}</span></label></td>
										{if $order->hasProductReturned()}
											<td>
												{$product['product_quantity_return']|escape:'htmlall':'UTF-8'}
											</td>
										{/if}
										<td>
											<label for="cb_{$product.id_order_detail|intval}">
												{if $group_use_tax}
													{Tools::displayPrice($product.unit_price_tax_incl, $currency)|escape:'htmlall':'UTF-8'}
												{else}
													{Tools::displayPrice($product.unit_price_tax_excl, $currency)|escape:'htmlall':'UTF-8'}
												{/if}
											</label>
										</td>
										<td>
											<label for="cb_{$product.id_order_detail|intval}">
												{if isset($customizedDatas.$productId.$productAttributeId)}
													{if $group_use_tax}
														{Tools::displayPrice($product.total_customization_wt, $currency)|escape:'htmlall':'UTF-8'}
													{else}
														{Tools::displayPrice($product.total_customization, $currency)|escape:'htmlall':'UTF-8'}
													{/if}
												{else}
													{if $group_use_tax}
														{Tools::displayPrice($product.total_price_tax_incl, $currency)|escape:'htmlall':'UTF-8'}
													{else}
														{Tools::displayPrice($product.total_price_tax_excl, $currency)|escape:'htmlall':'UTF-8'}
													{/if}
												{/if}
											</label>
										</td>
									</tr>
									{foreach $product.customizedDatas  as $customizationPerAddress}
										{foreach $customizationPerAddress as $customizationId => $customization}
											<tr class="alternate_item">
												<td colspan="2">
													{foreach from=$customization.datas key='type' item='datas'}
														{if $type == $CUSTOMIZE_FILE}
															<ul class="customizationUploaded">
																{foreach from=$datas item='data'}
																	<li><img src="{$pic_dir|escape:'htmlall':'UTF-8'}{$data.value|escape:'htmlall':'UTF-8'}_small" alt=""
																			class="customizationUploaded" /></li>
																{/foreach}
															</ul>
														{elseif $type == $CUSTOMIZE_TEXTFIELD}
															<ul class="typedText">{counter start=0 print=false}
																{foreach from=$datas item='data'}
																	{assign var='customizationFieldName' value="Text #"|cat:$data.id_customization_field}
																	<li>{$data.name|default:$customizationFieldName|escape:'htmlall':'UTF-8'} :
																		{$data.value|escape:'htmlall':'UTF-8'}</li>
																{/foreach}
															</ul>
														{/if}
													{/foreach}
												</td>
												<td>
													<label for="cb_{$product.id_order_detail|intval}"><span
															class="order_qte_span editable">{$customization.quantity|intval}</span></label>
												</td>
												<td colspan="2"></td>
											</tr>
										{/foreach}
									{/foreach}
								{/if}
								<!-- Classic products -->
								{if $product.product_quantity > $product.customizationQuantityTotal}
									<tr class="item">
										<td><label
												for="cb_{$product.id_order_detail|intval}">{if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}</label>
										</td>
										<td class="bold">
											<label for="cb_{$product.id_order_detail|intval}">
												{if $product.download_hash && $invoice && $product.display_filename != '' && $product.product_quantity_refunded == 0 && $product.product_quantity_return == 0}
													{if isset($is_guest) && $is_guest}
														<a href="{$link->getPageLink('get-file', true, NULL, "key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}&amp;id_order={$order->id}&secure_key={$order->secure_key}"
								)|escape:'html'}" title="{l s='Download this product' d='Modules.Agilemultisellerpro.Orders'}">
														{else}
															<a href="{$link->getPageLink('get-file', true, NULL, "key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}"
									)|escape:'html'}" title="{l s='Download this product' d='Modules.Agilemultisellerpro.Orders'}">
															{/if}
															<img
																src="{$base_dir_ssl|escape:'htmlall':'UTF-8'}modules/agilemultiseller/views/img/icon/download_product.gif"
																class="icon" alt="{l s='Download product' d='Modules.Agilemultisellerpro.Orders'}" />
														</a>
														{if isset($is_guest) && $is_guest}
															<a href="{$link->getPageLink('get-file', true, NULL, "key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}&id_order={$order->id}&secure_key={$order->secure_key}"
									)|escape:'html'}" title="{l s='Download this product' d='Modules.Agilemultisellerpro.Orders'}">
																{$product.product_name|escape:'htmlall':'UTF-8'} </a>
														{else}
															<a href="{$link->getPageLink('get-file', true, NULL, "key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}"
									)|escape:'html'}" title="{l s='Download this product' d='Modules.Agilemultisellerpro.Orders'}">
																{$product.product_name|escape:'htmlall':'UTF-8'} </a>
														{/if}
													{else}
														{$product.product_name|escape:'htmlall':'UTF-8'}
													{/if}
											</label>
										</td>
										<td><label for="cb_{$product.id_order_detail|intval}"><span
													class="order_qte_span editable">{$productQuantity|intval}</span></label></td>
										{if $order->hasProductReturned()}
											<td>
												{$product['product_quantity_return']|escape:'htmlall':'UTF-8'}
											</td>
										{/if}
										<td>
											<label for="cb_{$product.id_order_detail|intval}">
												{if $group_use_tax}
													{Tools::displayPrice($product.unit_price_tax_incl, $currency)|escape:'htmlall':'UTF-8'}
												{else}
													{Tools::displayPrice($product.unit_price_tax_excl, $currency)|escape:'htmlall':'UTF-8'}
												{/if}
											</label>
										</td>
										<td>
											<label for="cb_{$product.id_order_detail|intval}">
												{if $group_use_tax}
													{Tools::displayPrice($product.total_price_tax_incl, $currency)|escape:'htmlall':'UTF-8'}
												{else}
													{Tools::displayPrice($product.total_price_tax_excl, $currency)|escape:'htmlall':'UTF-8'}
												{/if}
											</label>
										</td>
									</tr>
								{/if}
							{/if}
						{/foreach}
						{foreach from=$discounts item=discount}
							<tr class="item">
								<td>{$discount.name|escape:'htmlall':'UTF-8'}</td>
								<td>{l s='Voucher:' d='Modules.Agilemultisellerpro.Orders'} {$discount.name|escape:'htmlall':'UTF-8'}</td>
								<td><span class="order_qte_span editable">1</span></td>
								<td>&nbsp;</td>
								<td>{if $discount.value != 0}{l s='-' d='Modules.Agilemultisellerpro.Orders'}{/if}
									{Tools::displayPrice($discount.value, $currency)|escape:'htmlall':'UTF-8'}
								</td>
							</tr>
						{/foreach}
					</tbody>
				</table>
			</div>

			{if $shipping}
				<div class="box table-responsive">
					<table class="table table-striped table-bordered">
						<thead class="thead-default">
						<tr>
							<th class="item">{l s='Carrier' d='Modules.Agilemultisellerpro.Orders'}</th>
							<th class="item">{l s='Weight' d='Modules.Agilemultisellerpro.Orders'}</th>
							<th class="item">{l s='Shipping cost' d='Modules.Agilemultisellerpro.Orders'}</th>
							<th class="last_item">{l s='Tracking number' d='Modules.Agilemultisellerpro.Orders'}</th>
						</tr>
						</thead>
						<tbody>
							<tr class="item">
								<td>
									{$shipping.carrierName|escape:'htmlall':'UTF-8'}

									{if $shipping.location}
										<br>
										({$shipping.location|escape:'htmlall':'UTF-8'})
									{/if}
								</td>
								<td>{$shipping.weight|string_format:"%.3f"|escape:'htmlall':'UTF-8'}
									{Configuration::get('PS_WEIGHT_UNIT')|escape:'htmlall':'UTF-8'}</td>
								<td>
									{Tools::displayPrice($shipping.shippingCost, $currency)|escape:'htmlall':'UTF-8'}
								</td>

								<td>
									<span class="shipping_number_show">
										{if $shipping.trackingNumber}
											{$shipping.trackingNumber|escape:'htmlall':'UTF-8'}
										{/if}
									</span>

									<form method="post" class="shipping-number-edit"
										  action="{$link->getModuleLink('agilemultisellerpro', 'sellerorderdetail', ['ref_order' => $order->reference], true)|escape:'htmlall':'UTF-8'}">
											<span class="shipping_number_edit" style="display:none;">
												<input type="hidden" name="idCarrierReference" value="{$shipping.idCarrierReference|escape:'htmlall':'UTF-8'}" />
												<input type="hidden" name="idSellerInfo" value="{$shipping.idSellerInfo|escape:'htmlall':'UTF-8'}" />
												<input type="hidden" name="idCart" value="{$shipping.idCart|escape:'htmlall':'UTF-8'}" />

												<input type="text" class="form-control" name="tracking_number" value="{$shipping.trackingNumber|escape:'htmlall':'UTF-8'}" />

												<button type="submit" class="btn btn-primary" name="submitShippingNumber">
													<i class="icon-ok"></i>
												</button>

												<button type="button" class="cancel_shipping_number_link btn btn-primary" name="submitShippingNumber">
													<i class="icon-remove"></i>
												</button>
											</span>

										<a href="#" class="edit_shipping_number_link">
											<i class="icon-pencil"></i>
										</a>

									</form>

								</td>

							</tr>
						</tbody>
					</table>
				</div>
			{/if}

			{$HOOK_ORDERDETAILDISPLAYED|escape:'html':'UTF-8'}

			{if count($messages)}
				<div class="box messages">
					<h3>{l s='Messages' d='Modules.Agilemultisellerpro.Orders'}</h3>
					{foreach from=$messages item=message name="messageList"}
						<div class="message row">
							<div class="col-sm-4">
								{if isset($message.elastname) && $message.elastname}
									{$message.efirstname|escape:'htmlall':'UTF-8'} {$message.elastname|escape:'htmlall':'UTF-8'}
								{elseif $message.clastname}
									{$message.cfirstname|escape:'htmlall':'UTF-8'} {$message.clastname|escape:'htmlall':'UTF-8'}
								{else}
									<b>{$shop_name|escape:'htmlall':'UTF-8'}</b>
								{/if}
								<br />
								{dateFormat date=$message.date_add full=1}
							</div>

							<div class="col-sm-8">
								{$message.message|strip_tags|nl2br nofilter}
							</div>
						</div>
					{/foreach}
				</div>
			{/if}

			<section class="order-message-form box">
				<form
					action="{$link->getModuleLink('agilemultisellerpro', 'sellerorderdetail', ['ref_order' => $order->reference], true)|escape:'htmlall':'UTF-8'}"
					method="post" class="std" id="sendOrderMessage">
					<header>
						<h3>{l s='Add a message:' d='Modules.Agilemultisellerpro.Orders'}</h3>
						<p>
							{l s='If you would like to add a comment about your order, please write it below.' d='Modules.Agilemultisellerpro.Orders'}
						</p>
					</header>

					<section class="form-fields">
						<div class="form-group row">
							<label for="id_product" class="form-control-label col-md-3">{l s='Product' d='Modules.Agilemultisellerpro.Orders'}</label>
							<div class="input-group col-md-5">
								<select class="form-control" name="id_product">
									<option value="0">{l s='-- Choose --' d='Modules.Agilemultisellerpro.Orders'}</option>
									{foreach from=$products item=product name=products}
										<option value="{$product.product_id|intval}">{$product.product_name|escape:'htmlall':'UTF-8'}</option>
									{/foreach}
								</select>
							</div>
						</div>
					</section>

					<div class="form-group row">
						<label for="msgText" class="form-control-label col-md-3">{l s='Comment' d='Modules.Agilemultisellerpro.Orders'}</label>
						<div class="input-group col-md-9">
							<textarea cols="67" rows="6" name="msgText" class="form-control textarea"></textarea>
						</div>
					</div>

					<div class="form-footer clearfix mt-3">
						<input type="hidden" name="id_order" value="{$order->id|intval}" />
						<a class="btn btn-link" href="{$link->getModuleLink('agilemultisellerpro', 'sellerorders', [], true)|escape:'htmlall':'UTF-8'}">
							<i class="icon-th-list"></i> {l s=' Back to order list' d='Modules.Agilemultisellerpro.Orders'}
						</a>

						<button type="submit" class="btn btn-primary form-control-submit float-xs-right" name="submitMessage"
							value="{l s='Send' d='Modules.Agilemultisellerpro.Orders'}">
							{l s='Send' d='Modules.Agilemultisellerpro.Orders'}
						</button>
					</div>
				</form>
			</section>
		</div>
	{/if} {*  isSeller  *}

{/block}

{block name='javascript_bottom'}
	{$smarty.block.parent}

	<script type="text/javascript" language="javascript">
		$('.edit_shipping_number_link').unbind('click').click(function(e) {
			$(this).parent().find('.shipping_number_show').hide();
			$(this).parent().find('.shipping_number_edit').show();

			$(this).parent().find('.edit_shipping_number_link').hide();
			$(this).parent().find('.cancel_shipping_number_link').show();

			$('.shipping_number_show').hide();
			e.preventDefault();
		});

		$('.cancel_shipping_number_link').unbind('click').click(function(e) {
			$(this).parent().find('.shipping_number_show').show();
			$(this).parent('.shipping_number_edit').hide();

			$(this).closest('.shipping-number-edit').find('.edit_shipping_number_link').show();
			$('.shipping_number_show').show();
			e.preventDefault();
		});
	</script>

{/block}
