PageRenderTime 28ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/ace/prestashop/themes/prestashop_/order-detail.tpl

https://github.com/sealence/local
Smarty Template | 271 lines | 268 code | 3 blank | 0 comment | 7 complexity | 0e23b22030eaf23561459b9d2173d7e2 MD5 | raw file
  1. <h4>{l s='Order placed on'} {dateFormat date=$order->date_add full=0}</h4>
  2. {if count($order_history)}
  3. <p class="bold">{l s='Follow your order step by step'}</p>
  4. <div class="table_block">
  5. <table class="detail_step_by_step std">
  6. <thead>
  7. <tr>
  8. <th class="first_item">{l s='Date'}</th>
  9. <th class="last_item">{l s='Status'}</th>
  10. </tr>
  11. </thead>
  12. <tbody>
  13. {foreach from=$order_history item=state name="orderStates"}
  14. <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}">
  15. <td>{dateFormat date=$state.date_add full=1}</td>
  16. <td>{$state.ostate_name|escape:'htmlall':'UTF-8'}</td>
  17. </tr>
  18. {/foreach}
  19. </tbody>
  20. </table>
  21. </div>
  22. {/if}
  23. {if $followup}
  24. <p class="bold">{l s='Click the following link to track delivery of your order'}</p>
  25. <a href="{$followup|escape:'htmlall':'UTF-8'}">{$followup|escape:'htmlall':'UTF-8'}</a>
  26. {/if}
  27. <p class="bold">{l s='Order:'} <span class="color-myaccount">{l s='#'}{$order->id|string_format:"%06d"}</span></p>
  28. {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}
  29. <p class="bold">{l s='Payment method:'} <span class="color-myaccount">{$order->payment|escape:'htmlall':'UTF-8'}</span></p>
  30. {if $invoice AND $invoiceAllowed}
  31. <p>
  32. <img src="{$img_dir}icon/pdf.gif" alt="" class="icon" />
  33. <a href="{$base_dir}pdf-invoice.php?id_order={$order->id|intval}">{l s='Download your invoice as a .PDF file'}</a>
  34. </p>
  35. {/if}
  36. {if $order->recyclable}
  37. <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>
  38. {/if}
  39. {if $order->gift}
  40. <p><img src="{$img_dir}icon/gift.gif" alt="" class="icon" />&nbsp;{l s='You requested gift-wrapping for your order.'}</p>
  41. <p>{l s='Message:'} {$order->gift_message|nl2br}</p>
  42. {/if}
  43. <br />
  44. <ul class="address item">
  45. <li class="address_title">{l s='Invoice'}</li>
  46. {if $address_invoice->company}<li class="address_company">{$address_invoice->company|escape:'htmlall':'UTF-8'}</li>{/if}
  47. <li class="address_name">{$address_invoice->firstname|escape:'htmlall':'UTF-8'} {$address_invoice->lastname|escape:'htmlall':'UTF-8'}</li>
  48. <li class="address_address1">{$address_invoice->address1|escape:'htmlall':'UTF-8'}</li>
  49. {if $address_invoice->address2}<li class="address_address2">{$address_invoice->address2|escape:'htmlall':'UTF-8'}</li>{/if}
  50. <li class="address_city">{$address_invoice->postcode|escape:'htmlall':'UTF-8'} {$address_invoice->city|escape:'htmlall':'UTF-8'}</li>
  51. <li class="address_country">{$address_invoice->country|escape:'htmlall':'UTF-8'}{if $invoiceState} - {$invoiceState->name|escape:'htmlall':'UTF-8'}{/if}</li>
  52. {if $address_invoice->phone}<li class="address_phone">{$address_invoice->phone|escape:'htmlall':'UTF-8'}</li>{/if}
  53. {if $address_invoice->phone_mobile}<li class="address_phone_mobile">{$address_invoice->phone_mobile|escape:'htmlall':'UTF-8'}</li>{/if}
  54. </ul>
  55. <ul class="address alternate_item">
  56. <li class="address_title">{l s='Delivery'}</li>
  57. {if $address_delivery->company}<li class="address_company">{$address_delivery->company|escape:'htmlall':'UTF-8'}</li>{/if}
  58. <li class="address_name">{$address_delivery->firstname|escape:'htmlall':'UTF-8'} {$address_delivery->lastname|escape:'htmlall':'UTF-8'}</li>
  59. <li class="address_address1">{$address_delivery->address1|escape:'htmlall':'UTF-8'}</li>
  60. {if $address_delivery->address2}<li class="address_address2">{$address_delivery->address2|escape:'htmlall':'UTF-8'}</li>{/if}
  61. <li class="address_city">{$address_delivery->postcode|escape:'htmlall':'UTF-8'} {$address_delivery->city|escape:'htmlall':'UTF-8'}</li>
  62. <li class="address_country">{$address_delivery->country|escape:'htmlall':'UTF-8'}{if $deliveryState} - {$deliveryState->name|escape:'htmlall':'UTF-8'}{/if}</li>
  63. {if $address_delivery->phone}<li class="address_phone">{$address_delivery->phone|escape:'htmlall':'UTF-8'}</li>{/if}
  64. {if $address_delivery->phone_mobile}<li class="address_phone_mobile">{$address_delivery->phone_mobile|escape:'htmlall':'UTF-8'}</li>{/if}
  65. </ul>
  66. <form action="{$base_dir_ssl}order-follow.php" method="post">
  67. <div id="order-detail-content" class="table_block">
  68. <table class="std">
  69. <thead>
  70. <tr>
  71. {if $return_allowed}<th class="first_item"><input type="checkbox" /></th>{/if}
  72. <th class="{if $return_allowed}item{else}first_item{/if}">{l s='Reference'}</th>
  73. <th class="item">{l s='Product'}</th>
  74. <th class="item">{l s='Quantity'}</th>
  75. <th class="item">{l s='Unit price'}</th>
  76. <th class="last_item">{l s='Total price'}</th>
  77. </tr>
  78. </thead>
  79. <tfoot>
  80. {if $priceDisplay}
  81. <tr class="item">
  82. <td colspan="{if $return_allowed}6{else}5{/if}">
  83. {l s='Total products (tax excl.):'} <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithoutTaxes() currency=$currency convert=0}</span>
  84. </td>
  85. </tr>
  86. {/if}
  87. <tr class="item">
  88. <td colspan="{if $return_allowed}6{else}5{/if}">
  89. {l s='Total products (tax incl.):'} <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithTaxes() currency=$currency convert=0}</span>
  90. </td>
  91. </tr>
  92. {if $order->total_discounts > 0}
  93. <tr class="item">
  94. <td colspan="{if $return_allowed}6{else}5{/if}">
  95. {l s='Total vouchers:'} <span class="price-discount">{displayWtPriceWithCurrency price=$order->total_discounts currency=$currency convert=1}</span>
  96. </td>
  97. </tr>
  98. {/if}
  99. {if $order->total_wrapping > 0}
  100. <tr class="item">
  101. <td colspan="{if $return_allowed}6{else}5{/if}">
  102. {l s='Total gift-wrapping:'} <span class="price-wrapping">{displayWtPriceWithCurrency price=$order->total_wrapping currency=$currency convert=0}</span>
  103. </td>
  104. </tr>
  105. {/if}
  106. <tr class="item">
  107. <td colspan="{if $return_allowed}6{else}5{/if}">
  108. {l s='Total shipping (tax incl.):'} <span class="price-shipping">{displayWtPriceWithCurrency price=$order->total_shipping currency=$currency convert=0}</span>
  109. </td>
  110. </tr>
  111. <tr class="item">
  112. <td colspan="{if $return_allowed}6{else}5{/if}">
  113. {l s='Total:'} <span class="price">{displayWtPriceWithCurrency price=$order->total_paid currency=$currency convert=0}</span>
  114. </td>
  115. </tr>
  116. </tfoot>
  117. <tbody>
  118. {foreach from=$products item=product name=products}
  119. {if !$product.deleted}
  120. {assign var='productId' value=$product.product_id}
  121. {assign var='productAttributeId' value=$product.product_attribute_id}
  122. {if isset($customizedDatas.$productId.$productAttributeId)}{assign var='productQuantity' value=$product.product_quantity-$product.customizationQuantityTotal}{else}{assign var='productQuantity' value=$product.product_quantity}{/if}
  123. <!-- Customized products -->
  124. {if isset($customizedDatas.$productId.$productAttributeId)}
  125. <tr class="item">
  126. {if $return_allowed}<td class="order_cb"></td>{/if}
  127. <td><label for="cb_{$product.id_order_detail|intval}">{if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}</label></td>
  128. <td class="bold">
  129. <label for="cb_{$product.id_order_detail|intval}">{$product.product_name|escape:'htmlall':'UTF-8'}</label>
  130. </td>
  131. <td><input class="order_qte_input" name="order_qte_input[{$smarty.foreach.products.index}]" type="text" size="2" value="{$customizationQuantityTotal|intval}" /><label for="cb_{$product.id_order_detail|intval}"><span class="order_qte_span editable">{$product.customizationQuantityTotal|intval}</span></label></td>
  132. <td><label for="cb_{$product.id_order_detail|intval}">{convertPriceWithCurrency price=$product.product_price_wt currency=$currency convert=0}</label></td>
  133. <td><label for="cb_{$product.id_order_detail|intval}">{if isset($customizedDatas.$productId.$productAttributeId)}{convertPriceWithCurrency price=$product.total_customization_wt currency=$currency convert=0}{else}{convertPriceWithCurrency price=$product.total_wt currency=$currency convert=0}{/if}</label></td>
  134. </tr>
  135. {foreach from=$customizedDatas.$productId.$productAttributeId item='customization' key='customizationId'}
  136. <tr class="alternate_item">
  137. {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}
  138. <td colspan="2">
  139. {foreach from=$customization.datas key='type' item='datas'}
  140. {if $type == $CUSTOMIZE_FILE}
  141. <ul class="customizationUploaded">
  142. {foreach from=$datas item='data'}
  143. <li><img src="{$pic_dir}{$data.value}_small" alt="" class="customizationUploaded" /></li>
  144. {/foreach}
  145. </ul>
  146. {elseif $type == $CUSTOMIZE_TEXTFIELD}
  147. <ul class="typedText">{counter start=0 print=false}
  148. {foreach from=$datas item='data'}
  149. <li>{l s='Text #'}{counter}{l s=':'} {$data.value}</li>
  150. {/foreach}
  151. </ul>
  152. {/if}
  153. {/foreach}
  154. </td>
  155. <td>
  156. <input class="order_qte_input" name="customization_qty_input[{$customizationId|intval}]" type="text" size="2" value="{$customization.quantity|intval}" /><label for="cb_{$product.id_order_detail|intval}"><span class="order_qte_span editable">{$customization.quantity|intval}</span></label>
  157. </td>
  158. <td colspan="2"></td>
  159. </tr>
  160. {/foreach}
  161. {/if}
  162. <!-- Classic products -->
  163. {if $product.product_quantity > $product.customizationQuantityTotal}
  164. <tr class="item">
  165. {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}
  166. <td><label for="cb_{$product.id_order_detail|intval}">{if $product.product_reference}{$product.product_reference|escape:'htmlall':'UTF-8'}{else}--{/if}</label></td>
  167. <td class="bold">
  168. <label for="cb_{$product.id_order_detail|intval}">
  169. {if $product.download_hash && $invoice}
  170. <a href="{$base_dir}get-file.php?key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}" title="{l s='download this product'}">
  171. <img src="{$img_dir}icon/download_product.gif" class="icon" alt="{l s='Download product'}" />
  172. </a>
  173. <a href="{$base_dir}get-file.php?key={$product.filename|escape:'htmlall':'UTF-8'}-{$product.download_hash|escape:'htmlall':'UTF-8'}" title="{l s='download this product'}">
  174. {$product.product_name|escape:'htmlall':'UTF-8'}
  175. </a>
  176. {else}
  177. {$product.product_name|escape:'htmlall':'UTF-8'}
  178. {/if}
  179. </label>
  180. </td>
  181. <td><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>
  182. <td><label for="cb_{$product.id_order_detail|intval}">{convertPriceWithCurrency price=$product.product_price_wt currency=$currency convert=0}</label></td>
  183. <td><label for="cb_{$product.id_order_detail|intval}">{convertPriceWithCurrency price=$product.total_wt currency=$currency convert=0}</label></td>
  184. </tr>
  185. {/if}
  186. {/if}
  187. {/foreach}
  188. {foreach from=$discounts item=discount}
  189. <tr class="item">
  190. <td>{$discount.name|escape:'htmlall':'UTF-8'}</td>
  191. <td>{l s='Voucher:'} {$discount.name|escape:'htmlall':'UTF-8'}</td>
  192. <td><span class="order_qte_span editable">1</span></td>
  193. <td>&nbsp;</td>
  194. <td>{l s='-'}{convertPriceWithCurrency price=$discount.value currency=$currency convert=0}</td>
  195. {if $return_allowed}
  196. <td>&nbsp;</td>
  197. {/if}
  198. </tr>
  199. {/foreach}
  200. </tbody>
  201. </table>
  202. </div>
  203. {if $return_allowed}
  204. <br />
  205. <p class="bold">{l s='Merchandise return'}</p>
  206. <p>{l s='If you want to return one or several products, please mark the corresponding checkbox(es) and provide an explanation for the return. Then click the button below.'}</p>
  207. <p class="textarea">
  208. <textarea cols="67" rows="3" name="returnText"></textarea>
  209. </p>
  210. <p class="submit">
  211. <input type="submit" value="{l s='Make a RMA slip'}" name="submitReturnMerchandise" class="button_large" />
  212. <input type="hidden" class="hidden" value="{$order->id|intval}" name="id_order" />
  213. </p>
  214. <br />
  215. {/if}
  216. </form>
  217. {if count($messages)}
  218. <p class="bold">{l s='Messages'}</p>
  219. <div class="table_block">
  220. <table class="detail_step_by_step std">
  221. <thead>
  222. <tr>
  223. <th class="first_item" style="width:150px;">{l s='From'}</th>
  224. <th class="last_item">{l s='Message'}</th>
  225. </tr>
  226. </thead>
  227. <tbody>
  228. {foreach from=$messages item=message name="messageList"}
  229. <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}">
  230. <td>
  231. {if $message.ename}
  232. {$message.efirstname|escape:'htmlall':'UTF-8'} {$message.elastname|escape:'htmlall':'UTF-8'}
  233. {elseif $message.clastname}
  234. {$message.cfirstname|escape:'htmlall':'UTF-8'} {$message.clastname|escape:'htmlall':'UTF-8'}
  235. {else}
  236. <b>{$shop_name|escape:'htmlall':'UTF-8'}</b>
  237. {/if}
  238. <br />
  239. {dateFormat date=$message.date_add full=1}
  240. </td>
  241. <td>{$message.message|nl2br}</td>
  242. </tr>
  243. {/foreach}
  244. </tbody>
  245. </table>
  246. </div>
  247. {/if}
  248. {if isset($errors) && $errors}
  249. <div class="error">
  250. <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>
  251. <ol>
  252. {foreach from=$errors key=k item=error}
  253. <li>{$error}</li>
  254. {/foreach}
  255. </ol>
  256. </div>
  257. {/if}
  258. <form action="{$base_dir}order-detail.php" method="post" class="std" id="sendOrderMessage">
  259. <p class="bold">{l s='Add a message:'}</p>
  260. <p>{l s='If you want to leave us comment about your order, please write it below.'}</p>
  261. <p class="textarea">
  262. <textarea cols="67" rows="3" name="msgText"></textarea>
  263. </p>
  264. <p class="submit">
  265. <input type="hidden" name="id_order" value="{$order->id|intval}" />
  266. <input type="submit" class="button" name="submitMessage" value="{l s='Send'}"/>
  267. </p>
  268. </form>