bebeboutik/themes/site_mobile/order-detail.tpl

581 lines
27 KiB
Smarty
Raw Normal View History

2016-01-04 12:48:08 +01:00
{*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 9025 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{if !isset($smarty.get.ajax)}
{capture name=path}{l s='Order detail'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}
<h1 class="title"><span>{l s='Order placed on'} {dateFormat date=$order->date_add full=0}</span></h1>
<div class="block-center" id="block-history">
<div id="block-order-detail">
{/if}
<form action="{if isset($opc) && $opc}{$link->getPageLink('order-opc.php', true)}{else}{$link->getPageLink('order.php', true)}{/if}" method="post" class="submit">
<div>
<input type="hidden" value="{$order->id}" name="id_order"/>
{*<h4>
{l s='Order placed on'} {dateFormat date=$order->date_add full=0}
<input type="submit" value="{l s='Reorder'}" name="submitReorder" class="button exclusive" style="float:right"/>
</h4>*}
</div>
</form>
{if count($order_history)}
{*<p class="bold">{l s='Follow your order step by step'}</p>*}
<div class="table_block">
<table class="detail_step_by_step std">
{*<thead>
<tr>
<th class="first_item">{l s='Date'}</th>
<th class="last_item">{l s='Status'}</th>
</tr>
</thead>*}
<tbody>
{foreach from=$order_history item=state name=orderStates}
{if $smarty.foreach.orderStates.first}
<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>
<table>
<tr>
<td class="history_link bold">
{l s='#'}{$order->id|string_format:"%06d"}</a>
</td>
<td class="history_price">
<span class="price">{displayWtPriceWithCurrency price=$order->total_paid currency=$currency}</span>
</td>
<td class="order_pdf" rowspan="2">
{if $invoice AND $invoiceAllowed}
<a href="{$link->getPageLink('pdf-invoice.php', true)}?id_order={$order->id|intval}{if $is_guest}&secure_key={$order->secure_key}{/if}">
{l s='PDF'} <img src="{$img_dir}icon/pdf.gif" alt="{l s='Invoice'}" class="icon" />
</a>
{else}-{/if}
</td>
</tr>
<tr>
<td class="history_date bold">{dateFormat date=$state.date_add full=0}</td>
<td class="history_state">{$state.ostate_name|escape:'htmlall':'UTF-8'}</td>
</tr>
</table>
</td>
{/if}
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
<div class="history_carrier">
{if $carrier->id}
<p class="logo">
<img src="img/s/{$carrier->id}.jpg" alt="{$carrier->name|escape:'htmlall':'UTF-8'}"/>
</p>
<p>
{$carrier->delay}
<span class="price">
{displayWtPriceWithCurrency price=$order->total_shipping currency=$currency}
</span>
</p>
{/if}
</div>
<br/>
<div class="clearfix"></div>
{if count($numbers) > 0}
<h4 class="order_shipping">{l s='Numero de suivi'}</h4>
<ul class="shipping_numbers">
{foreach from=$numbers item=number}
<li>
{l s='Numero de suivi'} <b>{$number.shipping_number}</b> <a target="_blank" href="http://www.colissimo.fr/portail_colissimo/suivreResultat.do?parcelnumber={$number.shipping_number}">({l s='Suivre le colis'})</a>
</li>
{/foreach}
</ul>
{/if}
{*<p class="bold">{l s='Order:'} <span class="color-myaccount">{l s='#'}{$order->id|string_format:"%06d"}</span></p>
{if $carrier->id}<p class="bold">{l s='Carrier:'} {if $carrier->name == "0"}{$shop_name|escape:'htmlall':'UTF-8'}{else}{$carrier->name|escape:'htmlall':'UTF-8'}{/if}</p>{/if}
<p class="bold">{l s='Payment method:'} <span class="color-myaccount">{$order->payment|escape:'htmlall':'UTF-8'}</span></p>
{if $invoice AND $invoiceAllowed}
<p>
<img src="{$img_dir}icon/pdf.gif" alt="" class="icon" />
<a href="{$link->getPageLink('pdf-invoice.php', true)}?id_order={$order->id|intval}{if $is_guest}&secure_key={$order->secure_key}{/if}">{l s='Download your invoice as a .PDF file'}</a>
</p>
{/if}
{if $order->recyclable && isset($isRecyclable) && $isRecyclable}
<p><img src="{$img_dir}icon/recyclable.gif" alt="" class="icon" />&nbsp;{l s='You have given permission to receive your order in recycled packaging.'}</p>
{/if}
{if $order->gift}
<p><img src="{$img_dir}icon/gift.gif" alt="" class="icon" />&nbsp;{l s='You requested gift-wrapping for your order.'}</p>
<p>{l s='Message:'} {$order->gift_message|nl2br}</p>
{/if}
<br />*}
{if $order->valid && isset($delivery_date)}
<div class="order_delay">
<h4 class="order_shipping">{l s='Delivery Delay'}</h4>
{foreach from=$delivery_date item=date}
<p>
<b style="color: #e26ea2;">{$date.name}</b> : {l s='Date de réception prévue entre le'} <b>{$date.date_start|date_format:'%d/%m/%Y'}</b> {l s='et le'} <b>{$date.date_end|date_format:'%d/%m/%Y'}</b>
</p>
{/foreach}
</div>
{/if}
{$HOOK_ORDERDETAILDISPLAYED}
{if !$is_guest}<form action="{$link->getPageLink('order-follow.php', true)}" method="post">{/if}
<div id="order-detail-content" class="table_block">
<table class="std" id="order-product">
{*<thead>
<tr>
{if $return_allowed}<th class="first_item"><input type="checkbox" /></th>{/if}
<th class="{if $return_allowed}item{else}first_item{/if}">{l s='Reference'}</th>
<th class="item">{l s='Product'}</th>
<th class="item">{l s='Quantity'}</th>
<th class="item">{l s='Unit price'}</th>
<th class="last_item">{l s='Total price'}</th>
</tr>
</thead>*}
<tfoot>
{if $priceDisplay && $use_tax}
<tr class="item">
<td colspan="{if $return_allowed}6{else}5{/if}">
{l s='Total products (tax excl.):'} <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithoutTaxes() currency=$currency}</span>
</td>
</tr>
{/if}
<tr class="item">
<td colspan="{if $return_allowed}6{else}5{/if}">
{l s='Total products'} {if $use_tax}{l s='(tax incl.)'}{/if}: <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithTaxes() currency=$currency}</span>
</td>
</tr>
{if $order->total_discounts > 0}
<tr class="item">
<td colspan="{if $return_allowed}6{else}5{/if}">
{l s='Total vouchers:'} <span class="price-discount">{displayWtPriceWithCurrency price=$order->total_discounts currency=$currency}</span>
</td>
</tr>
{/if}
{if $order->total_wrapping > 0}
<tr class="item">
<td colspan="{if $return_allowed}6{else}5{/if}">
{l s='Total gift-wrapping:'} <span class="price-wrapping">{displayWtPriceWithCurrency price=$order->total_wrapping currency=$currency}</span>
</td>
</tr>
{/if}
<tr class="item preend">
<td colspan="{if $return_allowed}6{else}5{/if}">
{l s='Total shipping'} {if $use_tax}{l s='(tax incl.)'}{/if}: <span class="price-shipping">{displayWtPriceWithCurrency price=$order->total_shipping currency=$currency}</span>
</td>
</tr>
<tr class="item endline">
<td colspan="{if $return_allowed}6{else}5{/if}">
{l s='Total:'} <span class="price">{displayWtPriceWithCurrency price=$order->total_paid currency=$currency}</span>
</td>
</tr>
</tfoot>
<tbody>
{foreach from=$products item=details}
<tr style="height:10px;">
<td colspan="5" style="border:none"></td>
</tr>
<tr style="background:#e1e1e1; ">
<td colspan="5">
<h4>{$details.title}</h4>
</td>
</tr>
<tr style="height:10px;">
<td colspan="5" style="border:none"></td>
</tr>
{foreach from=$details.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($customizedDatas.$productId.$productAttributeId)}{assign var='productQuantity' value=$product.product_quantity-$product.customizationQuantityTotal}{else}{assign var='productQuantity' value=$product.product_quantity}{/if}
<!-- Customized products -->
{if isset($customizedDatas.$productId.$productAttributeId)}
<tr class="item">
{if $return_allowed}<td class="order_cb"></td>{/if}
<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 class="aright"><input class="order_qte_input" name="order_qte_input[{$smarty.foreach.products.index}]" type="text" size="2" value="{$product.customizationQuantityTotal|intval}" /><label for="cb_{$product.id_order_detail|intval}"><span class="order_qte_span editable">{$product.customizationQuantityTotal|intval}</span></label></td>
<td class="aright">
<label for="cb_{$product.id_order_detail|intval}">
{if $group_use_tax}
{convertPriceWithCurrency price=$product.product_price_wt currency=$currency convert=0}
{else}
{convertPriceWithCurrency price=$product.product_price currency=$currency convert=0}
{/if}
</label>
</td>
<td class="aright">
<label for="cb_{$product.id_order_detail|intval}">
{if isset($customizedDatas.$productId.$productAttributeId)}
{if $group_use_tax}
{convertPriceWithCurrency price=$product.total_customization_wt currency=$currency convert=0}
{else}
{convertPriceWithCurrency price=$product.total_customization currency=$currency convert=0}
{/if}
{else}
{if $group_use_tax}
{convertPriceWithCurrency price=$product.total_wt currency=$currency convert=0}
{else}
{convertPriceWithCurrency price=$product.total_price currency=$currency convert=0}
{/if}
{/if}
</label>
</td>
</tr>
{foreach from=$customizedDatas.$productId.$productAttributeId item='customization' key='customizationId'}
<tr class="alternate_item">
{if $return_allowed}<td class="order_cb"><input type="checkbox" id="cb_{$product.id_order_detail|intval}" name="customization_ids[{$product.id_order_detail|intval}][]" value="{$customizationId|intval}" /></td>{/if}
<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}{$data.value}_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}{l s=':'} {$data.value}</li>
{/foreach}
</ul>
{/if}
{/foreach}
</td>
<td class="aright">
{if $return_allowed}<input class="order_qte_input" name="customization_qty_input[{$customizationId|intval}]" type="text" size="2" value="{$customization.quantity|intval}" />{/if}<label{if $return_allowed} for="cb_{$product.id_order_detail|intval}"{/if}><span class="order_qte_span editable">{$customization.quantity|intval}</span></label>
</td>
<td colspan="2"></td>
</tr>
{/foreach}
{/if}
<!-- Classic products -->
{if $product.product_quantity > $product.customizationQuantityTotal}
<tr class="item">
<td class="cart_product">
<a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">
<img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'large')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" {if isset($smallSize)}width="{$smallSize.width}" height="{$smallSize.height}" {/if} />
</a>
</td>
<td class="cart_description">
<table>
<tbody>
<tr class="title">
<td>
<h5>
<a href="{$link->getPageLink('get-file.php', true)}?key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}{if isset($is_guest) && $is_guest}&id_order={$order->id}&secure_key={$order->secure_key}{/if}" title="{l s='download this product'}">
{$product.product_name|escape:'htmlall':'UTF-9'}
</a>
</h5>
</td>
</tr>
<tr class="attribute">
<td>
{if isset($product.attributes) && $product.attributes}
<a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">{$product.attributes|escape:'htmlall':'UTF-8'}</a>
{/if}
</td>
</tr>
<tr class="price">
<td>
<div class="cart_unit">
<span class="price" id="product_price_{$product.id_product}_{$product.id_product_attribute}">
{if $group_use_tax}
{convertPriceWithCurrency price=$product.total_wt currency=$currency convert=0}
{else}
{convertPriceWithCurrency price=$product.total_price currency=$currency convert=0}
{/if}
</span>
</div>
</td>
</tr>
<tr class="quantity">
<td>
<div class="desc_content">
<label>{l s='Quantity'}</label>
<div class="cart_quantity"{if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0} style="text-align: center;"{/if}>
{if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}
<span id="cart_quantity_custom_{$product.id_product}_{$product.id_product_attribute}" >{$product.customizationQuantityTotal}</span>
{/if}
{if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0}
<input type="hidden" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_hidden" />
<input size="2" maxlength="3" type="text" class="cart_quantity_input" value="{$productQuantity|intval}" name="quantity_{$product.id_product}_{$product.id_product_attribute}" />
{/if}
</div>
</div>
</td>
</tr>
{*<tr class="delete">
<td>
<div class="gradient">
<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}" href="{$link->getPageLink('cart.php', true)}?delete&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;token={$token_cart}" title="{l s='Delete'}">X</a>
</div>
</td>
</tr>*}
</tbody>
</table>
{*<div class="desc_content">
<h5><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'}</a></h5>
{if isset($product.attributes) && $product.attributes}<a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">{$product.attributes|escape:'htmlall':'UTF-8'}</a>{/if}
<div class="cart_unit">
<span class="price" id="product_price_{$product.id_product}_{$product.id_product_attribute}">
{if !$priceDisplay}{convertPrice price=$product.price_wt}{else}{convertPrice price=$product.price}{/if}
</span>
</div>
<div class="cart_quantity"{if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0} style="text-align: center;"{/if}>
{if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}
<span id="cart_quantity_custom_{$product.id_product}_{$product.id_product_attribute}" >{$product.customizationQuantityTotal}</span>
{/if}
{if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0}
<input type="hidden" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_hidden" />
<input size="2" maxlength="3" type="text" class="cart_quantity_input" value="{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}" name="quantity_{$product.id_product}_{$product.id_product_attribute}" />
{/if}
</div>
<div class="gradient">
<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}" href="{$link->getPageLink('cart.php', true)}?delete&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;token={$token_cart}" title="{l s='Delete'}">X</a>
</div>
</div>*}
</td>
{*{if $return_allowed}<td class="order_cb"><input type="checkbox" id="cb_{$product.id_order_detail|intval}" name="ids_order_detail[{$product.id_order_detail|intval}]" value="{$product.id_order_detail|intval}" /></td>{/if}
<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}
<a href="{$link->getPageLink('get-file.php', true)}?key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}{if isset($is_guest) && $is_guest}&id_order={$order->id}&secure_key={$order->secure_key}{/if}" title="{l s='download this product'}">
<img src="{$img_dir}icon/download_product.gif" class="icon" alt="{l s='Download product'}" />
</a>
<a href="{$link->getPageLink('get-file.php', true)}?key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}{if isset($is_guest) && $is_guest}&id_order={$order->id}&secure_key={$order->secure_key}{/if}" title="{l s='download this product'}">
{$product.product_name|escape:'htmlall':'UTF-8'}
</a>
{else}
{$product.product_name|escape:'htmlall':'UTF-8'}
{/if}
</label>
</td>
<td class="aright"><input class="order_qte_input" name="order_qte_input[{$product.id_order_detail|intval}]" type="text" size="2" value="{$productQuantity|intval}" /><label for="cb_{$product.id_order_detail|intval}"><span class="order_qte_span editable">{$productQuantity|intval}</span></label></td>
<td class="aright">
<label for="cb_{$product.id_order_detail|intval}">
{if $group_use_tax}
{convertPriceWithCurrency price=$product.product_price_wt currency=$currency convert=0}
{else}
{convertPriceWithCurrency price=$product.product_price currency=$currency convert=0}
{/if}
</label>
</td>
<td class="aright">
<label for="cb_{$product.id_order_detail|intval}">
{if $group_use_tax}
{convertPriceWithCurrency price=$product.total_wt currency=$currency convert=0}
{else}
{convertPriceWithCurrency price=$product.total_price currency=$currency convert=0}
{/if}
</label>
</td>*}
</tr>
{/if}
{/if}
{/foreach}
{/foreach}
{foreach from=$discounts item=discount}
<tr class="item cart_discount">
{*<td>{$discount.name|escape:'htmlall':'UTF-8'}</td>*}
<td class="cart_discount_description">{l s='Voucher'} <span class="name">{l s='Code'}: {$discount.name|escape:'htmlall':'UTF-8'}</span></td>
{*<td><span class="order_qte_span editable">1</span></td>*}
{*<td>&nbsp;</td>*}
<td class="cart_discount_price">
{if $discount.value != 0.00}{l s='-'}{/if}{convertPriceWithCurrency price=$discount.value currency=$currency convert=0}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<div class="addresses">
<ul class="address item" id="address_invoice" {if $order->isVirtual()}style="display:none;"{/if}>
<li class="address_title">{l s='Invoice'}</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 class="address_{$field_item}">{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item}">{$invoiceAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}</span>{/foreach}</li>
{/if}
{/foreach}
</ul>
<ul id="address_delivery" class="address alternate_item {if $order->isVirtual()}full_width{/if}">
<li class="address_title">{l s='Delivery'}</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 class="address_{$field_item}">{foreach from=$address_words item=word_item name="word_loop"}{if !$smarty.foreach.word_loop.first} {/if}<span class="address_{$word_item}">{$deliveryAddressFormatedValues[$word_item]|escape:'htmlall':'UTF-8'}</span>{/foreach}</li>
{/if}
{/foreach}
</ul>
</div>
{if !$is_guest}
{*{if $return_allowed}
<p class="bold">{l s='Merchandise return'}</p>
<p>{l s='If you wish to return one or more products, please mark the corresponding boxes and provide an explanation for the return. Then click the button below.'}</p>
<p class="textarea">
<textarea cols="67" rows="3" name="returnText"></textarea>
</p>
<p class="submit">
<input type="submit" value="{l s='Make a RMA slip'}" name="submitReturnMerchandise" class="button_large" />
<input type="hidden" class="hidden" value="{$order->id|intval}" name="id_order" />
</p>
<br />
{/if}*}
</form>
{if count($messages)}
<p class="bold">{l s='Messages'}</p>
<div class="table_block">
<table class="detail_step_by_step std">
<thead>
<tr>
<th class="first_item" style="width:150px;">{l s='From'}</th>
<th class="last_item">{l s='Message'}</th>
</tr>
</thead>
<tbody>
{foreach from=$messages item=message name="messageList"}
<tr class="{if $smarty.foreach.messageList.first}first_item{elseif $smarty.foreach.messageList.last}last_item{/if} {if $smarty.foreach.messageList.index % 2}alternate_item{else}item{/if}">
<td>
{if isset($message.ename) && $message.ename}
{$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}
</td>
<td>{$message.message|nl2br}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
{if isset($errors) && $errors}
<div class="error">
<p>{if $errors|@count > 1}{l s='There are'}{else}{l s='There is'}{/if} {$errors|@count} {if $errors|@count > 1}{l s='errors'}{else}{l s='error'}{/if} :</p>
<ol>
{foreach from=$errors key=k item=error}
<li>{$error}</li>
{/foreach}
</ol>
</div>
{/if}
{*<form action="{$link->getPageLink('order-detail.php', true)}" method="post" class="std" id="sendOrderMessage">
<p class="bold">{l s='Add a message:'}</p>
<p>{l s='If you would like to add a comment about your order, please write it below.'}</p>
<p class="textarea">
<textarea cols="67" rows="3" name="msgText"></textarea>
</p>
<p class="submit">
<input type="hidden" name="id_order" value="{$order->id|intval}" />
<input type="submit" class="button" name="submitMessage" value="{l s='Send'}"/>
</p>
</form>*}
{else}
<p><img src="{$img_dir}icon/infos.gif" alt="" class="icon" />&nbsp;{l s='You can\'t make a merchandise return with a guest account'}</p>
{/if}
{if !isset($smarty.get.ajax)}
</div>
</div>
<script type="text/javascript">{literal}
$(document).ready(function() {
if ($('div#order-detail-content table td.order_cb').length > 0) {
//return slip : check or uncheck every checkboxes
$('form div#order-detail-content th input[type=checkbox]').click(function()
{
$('form div#order-detail-content td input[type=checkbox]').each(function()
{
this.checked = $('form div#order-detail-content th input[type=checkbox]').is(':checked');
updateOrderLineDisplay(this);
});
});
//return slip : enable or disable 'global' quantity editing
$('form div#order-detail-content td input[type=checkbox]').click(function()
{
updateOrderLineDisplay(this);
});
//return slip : limit quantities
$('form div#order-detail-content td input.order_qte_input').keyup(function()
{
var maxQuantity = parseInt($(this).parent().find('span.order_qte_span').text());
var quantity = parseInt($(this).val());
if (isNaN($(this).val()) && $(this).val() != '')
{
$(this).val(maxQuantity);
}
else
{
if (quantity > maxQuantity)
$(this).val(maxQuantity);
else if (quantity < 1)
$(this).val(1);
}
});
}
//catch the submit event of sendOrderMessage form
$('form#sendOrderMessage').submit(function(){
return sendOrderMessage();
});
if(typeof(resizeAddressesBox) == 'function')
resizeAddressesBox();
});
{/literal}</script>
{/if}
<p class="footer_links">
<a class="back_account" href="{$link->getPageLink('my-account.php', true)}" class="button">
<i class="icon-user"></i><span>{l s='Back to my account'}</span>
</a>
</p>