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

/themes/euvaporXX/order-carrier.tpl

https://gitlab.com/ptisky/API_prestashop
Smarty Template | 315 lines | 276 code | 14 blank | 25 comment | 34 complexity | d29585fe7bc7e47cfc1b75087261f6d6 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. {if !$opc}
  26. <script type="text/javascript">
  27. //<![CDATA[
  28. var orderProcess = 'order';
  29. var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
  30. var currencyRate = '{$currencyRate|floatval}';
  31. var currencyFormat = '{$currencyFormat|intval}';
  32. var currencyBlank = '{$currencyBlank|intval}';
  33. var txtProduct = "{l s='Product' js=1}";
  34. var txtProducts = "{l s='Products' js=1}";
  35. var orderUrl = '{$link->getPageLink("order", true)|addslashes}';
  36. var msg = "{l s='You must agree to the terms of service before continuing.' js=1}";
  37. {literal}
  38. function acceptCGV()
  39. {
  40. if ($('#cgv').length && !$('input#cgv:checked').length)
  41. {
  42. alert(msg);
  43. return false;
  44. }
  45. else
  46. return true;
  47. }
  48. {/literal}
  49. //]]>
  50. </script>
  51. {else}
  52. <script type="text/javascript">
  53. var txtFree = "{l s='Free'}";
  54. </script>
  55. {/if}
  56. {if isset($virtual_cart) && !$virtual_cart && $giftAllowed && $cart->gift == 1}
  57. <script type="text/javascript">
  58. {literal}
  59. // <![CDATA[
  60. $('document').ready( function(){
  61. if ($('input#gift').is(':checked'))
  62. $('p#gift_div').show();
  63. });
  64. //]]>
  65. {/literal}
  66. </script>
  67. {/if}
  68. <div id="bady">
  69. {if !$opc}
  70. {capture name=path}{l s='Shipping:'}{/capture}
  71. {include file="$tpl_dir./breadcrumb.tpl"}
  72. {/if}
  73. {if !$opc}
  74. <div id="carrier_area">
  75. {else}
  76. <div id="carrier_area" class="opc-main-block">
  77. {/if}
  78. {if !$opc}
  79. <h1>{l s='Shipping:'}</h1>
  80. {else}
  81. <h2><span>2</span> {l s='Delivery methods'}</h2>
  82. {/if}
  83. {if !$opc}
  84. {assign var='current_step' value='shipping'}
  85. {include file="$tpl_dir./order-steps.tpl"}
  86. {include file="$tpl_dir./errors.tpl"}
  87. <form id="form" action="{$link->getPageLink('order', true, NULL, "multi-shipping={$multi_shipping}")|escape:'html'}" method="post" onsubmit="return acceptCGV();">
  88. {else}
  89. <div id="opc_delivery_methods" class="opc-main-block">
  90. <div id="opc_delivery_methods-overlay" class="opc-overlay" style="display: none;"></div>
  91. {/if}
  92. <div class="order_carrier_content">
  93. {if isset($virtual_cart) && $virtual_cart}
  94. <input id="input_virtual_carrier" class="hidden" type="hidden" name="id_carrier" value="0" />
  95. {else}
  96. <h3 class="carrier_title">{l s='Choose your delivery method'}</h3>
  97. <div id="HOOK_BEFORECARRIER">
  98. {if isset($carriers) && isset($HOOK_BEFORECARRIER)}
  99. {$HOOK_BEFORECARRIER}
  100. {/if}
  101. </div>
  102. {if isset($isVirtualCart) && $isVirtualCart}
  103. <p class="warning">{l s='No carrier is needed for this order.'}</p>
  104. {else}
  105. {if $recyclablePackAllowed}
  106. <p class="checkbox">
  107. <input type="checkbox" name="recyclable" id="recyclable" value="1" {if $recyclable == 1}checked="checked"{/if} autocomplete="off"/>
  108. <label for="recyclable">{l s='I would like to receive my order in recycled packaging.'}.</label>
  109. </p>
  110. {/if}
  111. <div class="delivery_options_address">
  112. {if isset($delivery_option_list)}
  113. {foreach $delivery_option_list as $id_address => $option_list}
  114. <h3>
  115. {if isset($address_collection[$id_address])}
  116. {l s='Choose a shipping option for this address:'} {$address_collection[$id_address]->alias}
  117. {else}
  118. {l s='Choose a shipping option'}
  119. {/if}
  120. </h3>
  121. <div class="delivery_options">
  122. {foreach $option_list as $key => $option}
  123. <div class="delivery_option {if ($option@index % 2)}alternate_{/if}item">
  124. <input class="delivery_option_radio" type="radio" name="delivery_option[{$id_address}]" onchange="{if $opc}updateCarrierSelectionAndGift();{else}updateExtraCarrier('{$key}', {$id_address});{/if}" id="delivery_option_{$id_address}_{$option@index}" value="{$key}" {if isset($delivery_option[$id_address]) && $delivery_option[$id_address] == $key}checked="checked"{/if} />
  125. <label for="delivery_option_{$id_address}_{$option@index}">
  126. <table class="resume">
  127. <tr>
  128. <td class="delivery_option_logo">
  129. {foreach $option.carrier_list as $carrier}
  130. {if $carrier.logo}
  131. <img src="{$carrier.logo}" alt="{$carrier.instance->name}"/>
  132. {else if !$option.unique_carrier}
  133. {$carrier.instance->name}
  134. {if !$carrier@last} - {/if}
  135. {/if}
  136. {/foreach}
  137. </td>
  138. <td>
  139. {if $option.unique_carrier}
  140. {foreach $option.carrier_list as $carrier}
  141. <div class="delivery_option_title">{$carrier.instance->name}</div>
  142. {/foreach}
  143. {if isset($carrier.instance->delay[$cookie->id_lang])}
  144. <div class="delivery_option_delay">{$carrier.instance->delay[$cookie->id_lang]}</div>
  145. {/if}
  146. {/if}
  147. {if count($option_list) > 1}
  148. {if $option.is_best_grade}
  149. {if $option.is_best_price}
  150. <div class="delivery_option_best delivery_option_icon">{l s='The best price and speed'}</div>
  151. {else}
  152. <div class="delivery_option_fast delivery_option_icon">{l s='The fastest'}</div>
  153. {/if}
  154. {else}
  155. {if $option.is_best_price}
  156. <div class="delivery_option_best_price delivery_option_icon">{l s='The best price'}</div>
  157. {/if}
  158. {/if}
  159. {/if}
  160. </td>
  161. <td>
  162. <div class="delivery_option_price">
  163. {if $option.total_price_with_tax && (!isset($free_shipping) || (isset($free_shipping) && !$free_shipping))}
  164. {if $use_taxes == 1}
  165. {if $priceDisplay == 1}
  166. {convertPrice price=$option.total_price_without_tax} {l s='(tax excl.)'}
  167. {else}
  168. {convertPrice price=$option.total_price_with_tax} {l s='(tax incl.)'}
  169. {/if}
  170. {else}
  171. {convertPrice price=$option.total_price_without_tax}
  172. {/if}
  173. {else}
  174. {l s='Free'}
  175. {/if}
  176. </div>
  177. </td>
  178. </tr>
  179. </table>
  180. <table class="delivery_option_carrier {if isset($delivery_option[$id_address]) && $delivery_option[$id_address] == $key}selected{/if} {if $option.unique_carrier}not-displayable{/if}">
  181. {foreach $option.carrier_list as $carrier}
  182. <tr>
  183. {if !$option.unique_carrier}
  184. <td class="first_item">
  185. <input type="hidden" value="{$carrier.instance->id}" name="id_carrier" />
  186. {if $carrier.logo}
  187. <img src="{$carrier.logo}" alt="{$carrier.instance->name}"/>
  188. {/if}
  189. </td>
  190. <td>
  191. {$carrier.instance->name}
  192. </td>
  193. {/if}
  194. <td {if $option.unique_carrier}class="first_item" colspan="2"{/if}>
  195. <input type="hidden" value="{$carrier.instance->id}" name="id_carrier" />
  196. {if isset($carrier.instance->delay[$cookie->id_lang])}
  197. {$carrier.instance->delay[$cookie->id_lang]}<br />
  198. {if count($carrier.product_list) <= 1}
  199. ({l s='Product concerned:'}
  200. {else}
  201. ({l s='Products concerned:'}
  202. {/if}
  203. {* This foreach is on one line, to avoid tabulation in the title attribute of the acronym *}
  204. {foreach $carrier.product_list as $product}
  205. {if $product@index == 4}<acronym title="{/if}{if $product@index >= 4}{$product.name}{if isset($product.attributes) && $product.attributes} {$product.attributes|escape:'htmlall':'UTF-8'}{/if}{if !$product@last}, {else}">...</acronym>){/if}{else}{$product.name}{if isset($product.attributes) && $product.attributes} {$product.attributes|escape:'htmlall':'UTF-8'}{/if}{if !$product@last}, {else}){/if}{/if}{/foreach}
  206. {/if}
  207. </td>
  208. </tr>
  209. {/foreach}
  210. </table>
  211. </label>
  212. </div>
  213. {/foreach}
  214. </div>
  215. <div class="hook_extracarrier" id="HOOK_EXTRACARRIER_{$id_address}">{if isset($HOOK_EXTRACARRIER_ADDR) && isset($HOOK_EXTRACARRIER_ADDR.$id_address)}{$HOOK_EXTRACARRIER_ADDR.$id_address}{/if}</div>
  216. {foreachelse}
  217. <p class="warning" id="noCarrierWarning">
  218. {foreach $cart->getDeliveryAddressesWithoutCarriers(true) as $address}
  219. {if empty($address->alias)}
  220. {l s='No carriers available.'}
  221. {else}
  222. {l s='No carriers available for the address "%s".' sprintf=$address->alias}
  223. {/if}
  224. {if !$address@last}
  225. <br />
  226. {/if}
  227. {foreachelse}
  228. {l s='No carriers available.'}
  229. {/foreach}
  230. </p>
  231. {/foreach}
  232. {/if}
  233. </div>
  234. <div style="display: none;" id="extra_carrier"></div>
  235. {if $giftAllowed}
  236. <h3 class="gift_title">{l s='Gift'}</h3>
  237. <p class="checkbox">
  238. <input type="checkbox" name="gift" id="gift" value="1" {if $cart->gift == 1}checked="checked"{/if} autocomplete="off"/>
  239. <label for="gift">{l s='I would like my order to be gift wrapped.'}</label>
  240. <br />
  241. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  242. {if $gift_wrapping_price > 0}
  243. ({l s='Additional cost of'}
  244. <span class="price" id="gift-price">
  245. {if $priceDisplay == 1}{convertPrice price=$total_wrapping_tax_exc_cost}{else}{convertPrice price=$total_wrapping_cost}{/if}
  246. </span>
  247. {if $use_taxes}{if $priceDisplay == 1} {l s='(tax excl.)'}{else} {l s='(tax incl.)'}{/if}{/if})
  248. {/if}
  249. </p>
  250. <p id="gift_div" class="textarea">
  251. <label for="gift_message">{l s='If you\'d like, you can add a note to the gift:'}</label>
  252. <textarea rows="5" cols="35" id="gift_message" name="gift_message">{$cart->gift_message|escape:'htmlall':'UTF-8'}</textarea>
  253. </p>
  254. {/if}
  255. {/if}
  256. {/if}
  257. {if $conditions AND $cms_id}
  258. <h3 class="condition_title">{l s='Terms of service'}</h3>
  259. <p class="checkbox">
  260. <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} autocomplete="off"/>
  261. <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions}" class="iframe">{l s='(Read the Terms of Service)'}</a>
  262. </p>
  263. <script type="text/javascript">
  264. $(document).ready(function() {
  265. $("a.iframe").fancybox({
  266. 'type' : 'iframe',
  267. 'width':600,
  268. 'height':600
  269. });
  270. });
  271. </script>
  272. {/if}
  273. </div>
  274. {if !$opc}
  275. <p class="cart_navigation submit">
  276. <input type="hidden" name="step" value="3" />
  277. <input type="hidden" name="back" value="{$back}" />
  278. {if !$is_guest}
  279. {if $back}
  280. <a href="{$link->getPageLink('order', true, NULL, "step=1&back={$back}&multi-shipping={$multi_shipping}")|escape:'html'}" title="{l s='Previous'}" class="buttone_large">&laquo; {l s='Previous'}</a>
  281. {else}
  282. <a href="{$link->getPageLink('order', true, NULL, "step=1&multi-shipping={$multi_shipping}")|escape:'html'}" title="{l s='Previous'}" class="buttone_large">&laquo; {l s='Previous'}</a>
  283. {/if}
  284. {else}
  285. <a href="{$link->getPageLink('order', true, NULL, "multi-shipping={$multi_shipping}")|escape:'html'}" title="{l s='Previous'}" class="buttone_large">&laquo; {l s='Previous'}</a>
  286. {/if}
  287. {if isset($virtual_cart) && $virtual_cart || (isset($delivery_option_list) && !empty($delivery_option_list))}
  288. <input type="submit" name="processCarrier" value="{l s='Next'} &raquo;" class="exclusive" />
  289. {/if}
  290. </p>
  291. </form>
  292. {else}
  293. <h3>{l s='Leave a message'}</h3>
  294. <div>
  295. <p>{l s='If you would like to add a comment about your order, please write it in the field below.'}</p>
  296. <p><textarea cols="120" rows="3" name="message" id="message">{if isset($oldMessage)}{$oldMessage|escape:'htmlall':'UTF-8'}{/if}</textarea></p>
  297. </div>
  298. </div>
  299. {/if}
  300. </div>
  301. </div>