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

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

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