PageRenderTime 51ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/themes/default/mobile/order-detail.tpl

https://bitbucket.org/marcenuc/prestashop
Smarty Template | 298 lines | 246 code | 16 blank | 36 comment | 21 complexity | 0166ae4f3b5d6b7918b8ae776d357ff2 MD5 | raw file
Possible License(s): LGPL-2.1, LGPL-3.0
  1. {*
  2. * 2007-2012 PrestaShop
  3. *
  4. * NOTICE OF LICENSE
  5. *
  6. * This source file is subject to the Academic Free License (AFL 3.0)
  7. * that is bundled with this package in the file LICENSE.txt.
  8. * It is also available through the world-wide-web at this URL:
  9. * http://opensource.org/licenses/afl-3.0.php
  10. * If you did not receive a copy of the license and are unable to
  11. * obtain it through the world-wide-web, please send an email
  12. * to license@prestashop.com so we can send you a copy immediately.
  13. *
  14. * DISCLAIMER
  15. *
  16. * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
  17. * versions in the future. If you wish to customize PrestaShop for your
  18. * needs please refer to http://www.prestashop.com for more information.
  19. *
  20. * @author PrestaShop SA <contact@prestashop.com>
  21. * @copyright 2007-2012 PrestaShop SA
  22. * @version Release: $Revision: 6594 $
  23. * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
  24. * International Registered Trademark & Property of PrestaShop SA
  25. *}
  26. {capture assign='page_title'}{l s='Order'} {l s='#'}{$order->id|string_format:"%06d"}{/capture}
  27. {include file='./page-title.tpl'}
  28. <div class="ui-grid-a">
  29. <div class="ui-block-a">
  30. <a data-role="button" data-icon="arrow-l" data-theme="a" data-rel="back" href="#" title="" data-ajax="false">{l s='Back'}</a>
  31. </div>
  32. <div class="ui-block-b">
  33. {assign var='type_order' value="order"}
  34. {if isset($opc) && $opc}
  35. {assign var='type_order' value="order-opc"}
  36. {/if}
  37. <a data-icon="refresh" data-role="button" data-theme="e" href="{$link->getPageLink({$type_order}, true, NULL, "submitReorder&id_order={$order->id|intval}")}" title="{l s='Reorder'}" data-ajax="false">
  38. {l s='Reorder'}
  39. </a>
  40. </div>
  41. </div><!-- .ui-grid-a -->
  42. <div data-role="content" id="content">
  43. <h3 class="bg">{l s='Order #%s - placed on' sprintf=$order->id|string_format:"%06d"} {dateFormat date=$order->date_add full=0}</h3>
  44. <ul class="info-order" data-role="listview">
  45. {if $carrier->id}<li><strong>{l s='Carrier:'}</strong> {if $carrier->name == "0"}{$shop_name|escape:'htmlall':'UTF-8'}{else}{$carrier->name|escape:'htmlall':'UTF-8'}{/if}</li>{/if}
  46. <li><strong>{l s='Payment method:'}</strong> <span class="color-myaccount">{$order->payment|escape:'htmlall':'UTF-8'}</span></li>
  47. {if $invoice AND $invoiceAllowed}
  48. <li>
  49. <img src="{$img_dir}icon/pdf.gif" alt="" class="icon" />
  50. <a href="{$link->getPageLink('pdf-invoice', true)}?id_order={$order->id|intval}{if $is_guest}&secure_key={$order->secure_key}{/if}" data-ajax="false">{l s='Download your invoice as a PDF file'}</li>
  51. </li>
  52. {/if}
  53. {if $order->recyclable}
  54. <li><img src="{$img_dir}icon/recyclable.gif" alt="" class="icon" />&nbsp;{l s='You have given permission to receive your order in recycled packaging.'}</li>
  55. {/if}
  56. {if $order->gift}
  57. <li><img src="{$img_dir}icon/gift.gif" alt="" class="icon" />&nbsp;{l s='You requested gift-wrapping for your order.'}</li>
  58. <li>{l s='Message:'} {$order->gift_message|nl2br}</li>
  59. {/if}
  60. </ul><!-- .info-order -->
  61. {if count($order_history)}
  62. <h3 class="bg">{l s='Follow your order step-by-step'}</h3>
  63. <ul data-role="listview" >
  64. {foreach from=$order_history item=state name="orderStates"}
  65. <li>
  66. {$state.ostate_name|escape:'htmlall':'UTF-8'}
  67. <span class="ui-li-aside">{dateFormat date=$state.date_add full=1}</span>
  68. </li>
  69. {/foreach}
  70. </ul>
  71. {/if}
  72. {* > TO CHECK ==========================*}
  73. {if isset($followup)}
  74. <p class="bold">{l s='Click the following link to track the delivery of your order'}</p>
  75. <a href="{$followup|escape:'htmlall':'UTF-8'}" data-ajax="false">{$followup|escape:'htmlall':'UTF-8'}</a>
  76. {/if}
  77. {* / TO CHECK ==========================*}
  78. <h3 class="bg">{l s='Addresses'}</h3>
  79. <div class="adresses_bloc clearfix">
  80. {* > TO CHECK ==========================*}
  81. {if $invoice AND $invoiceAllowed}
  82. <p>
  83. <img src="{$img_dir}icon/pdf.gif" alt="" class="icon" />
  84. {if $is_guest}
  85. <a href="{$link->getPageLink('pdf-invoice', true, NULL, "id_order={$order->id}&amp;secure_key=$order->secure_key")}" >{l s='Download your invoice as a PDF file'}</a>
  86. {else}
  87. <a href="{$link->getPageLink('pdf-invoice', true, NULL, "id_order={$order->id}")}" >{l s='Download your invoice as a PDF file'}</a>
  88. {/if}
  89. </p>
  90. {/if}
  91. {if $order->recyclable && isset($isRecyclable) && $isRecyclable}
  92. <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>
  93. {/if}
  94. {if $order->gift}
  95. <p><img src="{$img_dir}icon/gift.gif" alt="" class="icon" />&nbsp;{l s='You requested gift-wrapping for your order.'}</p>
  96. <p>{l s='Message:'} {$order->gift_message|nl2br}</p>
  97. {/if}
  98. {* / TO CHECK ==========================*}
  99. <ul data-role="listview" data-inset="true" data-dividertheme="c">
  100. {if !$order->isVirtual()}
  101. <li data-role="list-divider">{l s='Invoice'}</li>
  102. <li>
  103. {foreach from=$inv_adr_fields name=inv_loop item=field_item}
  104. {if $field_item eq "company" && isset($address_invoice->company)}<p class="address_company">{$address_invoice->company|escape:'htmlall':'UTF-8'}</p>
  105. {elseif $field_item eq "address2" && $address_invoice->address2}<p class="address_address2">{$address_invoice->address2|escape:'htmlall':'UTF-8'}</p>
  106. {elseif $field_item eq "phone_mobile" && $address_invoice->phone_mobile}<p class="address_phone_mobile">{$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}</p>
  107. {else}
  108. {assign var=address_words value=" "|explode:$field_item}
  109. <p>{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}</p>
  110. {/if}
  111. {/foreach}
  112. </li>
  113. {/if}
  114. <li data-role="list-divider" >{l s='Delivery'}</li>
  115. <li>
  116. {foreach from=$dlv_adr_fields name=dlv_loop item=field_item}
  117. {if $field_item eq "company" && isset($address_delivery->company)}<p class="address_company">{$address_delivery->company|escape:'htmlall':'UTF-8'}</p>
  118. {elseif $field_item eq "address2" && $address_delivery->address2}<p class="address_address2">{$address_delivery->address2|escape:'htmlall':'UTF-8'}</p>
  119. {elseif $field_item eq "phone_mobile" && $address_delivery->phone_mobile}<p class="address_phone_mobile">{$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}</p>
  120. {else}
  121. {assign var=address_words value=" "|explode:$field_item}
  122. <p>{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}</p>
  123. {/if}
  124. {/foreach}
  125. </li>
  126. </ul>
  127. </div><!-- .adresses_bloc -->
  128. <!-- order details -->
  129. <h3 class="bg">{l s='Order details'}</h3>
  130. {* > TO CHECK ==========================*}
  131. {*$HOOK_ORDERDETAILDISPLAYED*}
  132. {* / TO CHECK ==========================*}
  133. {if $return_allowed}<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>{/if}
  134. {if !$is_guest}<form action="{$link->getPageLink('order-follow', true)}" method="post">{/if}
  135. <ul data-role="listview" data-inset="true">
  136. {foreach from=$products item=product name=products}
  137. {if !isset($product.deleted)}
  138. {assign var='productId' value=$product.product_id}
  139. {assign var='productAttributeId' value=$product.product_attribute_id}
  140. {if isset($product.customizedDatas)}
  141. {assign var='productQuantity' value=$product.product_quantity-$product.customizationQuantityTotal}
  142. {else}
  143. {assign var='productQuantity' value=$product.product_quantity}
  144. {/if}
  145. {include file="./order-detail-product-li.tpl"}
  146. {/if}
  147. {/foreach}
  148. {* > TO CHECK ==========================*}
  149. {foreach from=$discounts item=discount}
  150. <li class="item">
  151. <h3>{$discount.name|escape:'htmlall':'UTF-8'}</h3>
  152. <p>{l s='Voucher:'} {$discount.name|escape:'htmlall':'UTF-8'}</p>
  153. <p><span class="order_qte_span editable">1</span></p>
  154. <p>&nbsp;</p>
  155. <p>{if $discount.value != 0.00}{l s='-'}{/if}{convertPriceWithCurrency price=$discount.value currency=$currency}</p>
  156. {if $return_allowed}
  157. <p>&nbsp;</p>
  158. {/if}
  159. </li>
  160. {/foreach}
  161. {* / TO CHECK ==========================*}
  162. {if $priceDisplay && $use_tax}
  163. <li data-theme="b" class="item">
  164. {l s='Total products (tax excl.):'} <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithoutTaxes() currency=$currency}</span>
  165. </tr>
  166. {/if}
  167. <li data-theme="b" class="item">
  168. {l s='Total products'} {if $use_tax}{l s='(tax incl.)'}{/if}: <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithTaxes() currency=$currency}</span>
  169. </li>
  170. {if $order->total_discounts > 0}
  171. <li data-theme="b" class="item">
  172. {l s='Total vouchers:'} <span class="price-discount">{displayWtPriceWithCurrency price=$order->total_discounts currency=$currency convert=1}</span>
  173. </li>
  174. {/if}
  175. {if $order->total_wrapping > 0}
  176. <li data-theme="b" class="item">
  177. {l s='Total gift-wrapping:'} <span class="price-wrapping">{displayWtPriceWithCurrency price=$order->total_wrapping currency=$currency}</span>
  178. </li>
  179. {/if}
  180. <li data-theme="b" class="item">
  181. {l s='Total shipping'} {if $use_tax}{l s='(tax incl.)'}{/if}: <span class="price-shipping">{displayWtPriceWithCurrency price=$order->total_shipping currency=$currency}</span>
  182. </li>
  183. <li data-theme="a" class="totalprice item">
  184. {l s='Total:'} <span class="price">{displayWtPriceWithCurrency price=$order->total_paid currency=$currency}</span>
  185. </li>
  186. </ul>
  187. <!-- /order details -->
  188. {if $order->getShipping()|count > 0}
  189. <h3 class="bg">{l s='Carrier'}</h3>
  190. <ul data-role="listview" >
  191. {foreach from=$order->getShipping() item=line}
  192. <li>
  193. <h3>{$line.state_name}</h3>
  194. <p><strong>{l s='Weight'}</strong> {$line.weight|string_format:"%.3f"} {Configuration::get('PS_WEIGHT_UNIT')}</p>
  195. <p><strong>{l s='Shipping cost'}</strong> {if $order->getTaxCalculationMethod() == $smarty.const.PS_TAX_INC}{displayPrice price=$line.shipping_cost_tax_incl currency=$currency->id}{else}{displayPrice price=$line.shipping_cost_tax_excl currency=$currency->id}{/if}</p>
  196. <p><strong>{l s='Tracking number'}</strong> {if $line.url && $line.tracking_number}<a href="{$line.url|replace:'@':$line.tracking_number}" data-ajax="false">{$line.tracking_number}</a>{elseif $line.tracking_number != ''}{$line.tracking_number}{else}----{/if}</p>
  197. <span class="ui-li-aside">{$line.date_add}</span>
  198. </li>
  199. {/foreach}
  200. </ul>
  201. {/if}
  202. {* > TO CHECK ==========================*}
  203. {if !$is_guest}
  204. {if $return_allowed}
  205. <div id="returnOrderMessage">
  206. <h3>{l s='Merchandise return'}</h3>
  207. <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>
  208. <fieldset>
  209. <textarea cols="67" rows="3" name="returnText"></textarea>
  210. </fieldset>
  211. <fieldset>
  212. <input type="submit" data-theme="a" value="{l s='Make an RMA slip'}" name="submitReturnMerchandise" class="button_large" />
  213. <input type="hidden" class="hidden" value="{$order->id|intval}" name="id_order" />
  214. </fieldset>
  215. </div>
  216. <br />
  217. {/if}
  218. </form>
  219. {if count($messages)}
  220. <h3>{l s='Messages'}</h3>
  221. <div class="table_block">
  222. <table class="detail_step_by_step std">
  223. <thead>
  224. <tr>
  225. <th class="first_item" style="width:150px;">{l s='From'}</th>
  226. <th class="last_item">{l s='Message'}</th>
  227. </tr>
  228. </thead>
  229. <tbody>
  230. {foreach from=$messages item=message name="messageList"}
  231. <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}">
  232. <td>
  233. {if isset($message.ename) && $message.ename}
  234. {$message.efirstname|escape:'htmlall':'UTF-8'} {$message.elastname|escape:'htmlall':'UTF-8'}
  235. {elseif $message.clastname}
  236. {$message.cfirstname|escape:'htmlall':'UTF-8'} {$message.clastname|escape:'htmlall':'UTF-8'}
  237. {else}
  238. <b>{$shop_name|escape:'htmlall':'UTF-8'}</b>
  239. {/if}
  240. <br />
  241. {dateFormat date=$message.date_add full=1}
  242. </td>
  243. <td>{$message.message|nl2br}</td>
  244. </tr>
  245. {/foreach}
  246. </tbody>
  247. </table>
  248. </div>
  249. {/if}
  250. {if isset($errors) && $errors}
  251. <div class="error">
  252. <p>{if $errors|@count > 1}{l s='There are %d errors' sprintf=$errors|@count}{else}{l s='There is %d error' sprintf=$errors|@count}{/if} :</p>
  253. <ol>
  254. {foreach from=$errors key=k item=error}
  255. <li>{$error}</li>
  256. {/foreach}
  257. </ol>
  258. </div>
  259. {/if}
  260. {* / TO CHECK ==========================*}
  261. <form action="{$link->getPageLink('order-detail', true)}" method="post" class="std" id="sendOrderMessage">
  262. <h3 class="bg">{l s='Add a message:'}</h3>
  263. <p>{l s='If you would like to add a comment about your order, please write it below.'}</p>
  264. <fieldset>
  265. <label for="id_product">{l s='Product'}</label>
  266. <select name="id_product" style="width:300px;">
  267. <option value="0">{l s='-- Choose --'}</option>
  268. {foreach from=$products item=product name=products}
  269. <option value="{$product.product_id}">{$product.product_name}</option>
  270. {/foreach}
  271. </select>
  272. </fieldset>
  273. <fieldset>
  274. <textarea name="msgText"></textarea>
  275. </fieldset>
  276. <input type="hidden" name="id_order" value="{$order->id|intval}" />
  277. <input type="submit" data-role="button" data-theme="a" name="submitMessage" value="{l s='Send'}"/>
  278. </form>
  279. {else}
  280. <p><img src="{$img_dir}icon/infos.gif" alt="" class="icon" />&nbsp;{l s='You cannot make a merchandise return with a guest account'}</p>
  281. {/if}
  282. </div><!-- #content -->