Guest User

Untitled

a guest
Dec 12th, 2011
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.32 KB | None | 0 0
  1. {*
  2. * 2007-2011 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 [email protected] 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 <[email protected]>
  21. * @copyright 2007-2011 PrestaShop SA
  22. * @version Release: $Revision: 1.4 $
  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.  
  27. {capture name=path}{l s='Your shopping cart'}{/capture}
  28. {include file="$tpl_dir./breadcrumb.tpl"}
  29.  
  30. <h1 id="cart_title">{l s='Shopping cart summary'}</h1>
  31.  
  32. {assign var='current_step' value='summary'}
  33.  
  34. {include file="$tpl_dir./order-steps.tpl"}
  35. {include file="$tpl_dir./errors.tpl"}
  36.  
  37. {if isset($empty)}
  38. <p class="warning">{l s='Your shopping cart is empty.'}</p>
  39. {elseif $PS_CATALOG_MODE}
  40. <p class="warning">{l s='This store has not accepted your new order.'}</p>
  41. {else}
  42. <script type="text/javascript">
  43. // <![CDATA[
  44. var baseDir = '{$base_dir_ssl}';
  45. var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
  46. var currencyRate = '{$currencyRate|floatval}';
  47. var currencyFormat = '{$currencyFormat|intval}';
  48. var currencyBlank = '{$currencyBlank|intval}';
  49. var txtProduct = "{l s='product'}";
  50. var txtProducts = "{l s='products'}";
  51. // ]]>
  52. </script>
  53.  
  54. <p style="display:none" id="emptyCartWarning" class="warning">{l s='Your shopping cart is empty.'}</p>
  55. {if isset($lastProductAdded) AND $lastProductAdded}
  56. {foreach from=$products item=product}
  57. {if $product.id_product == $lastProductAdded.id_product AND (!$product.id_product_attribute OR ($product.id_product_attribute == $lastProductAdded.id_product_attribute))}
  58. <div class="cart_last_product">
  59. <div class="cart_last_product_header">
  60. <div class="left">{l s='Last added product'}</div>
  61. </div>
  62. <a class="cart_last_product_img" 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, 'small')}" alt="{$product.name|escape:'htmlall':'UTF-8'}"/></a>
  63. <div class="cart_last_product_content">
  64. <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>
  65. {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}
  66. </div>
  67. <br class="clear" />
  68. </div>
  69. {/if}
  70. {/foreach}
  71. {/if}
  72. <p>{l s='Your shopping cart contains'} <span id="summary_products_quantity">{$productNumber} {if $productNumber == 1}{l s='product'}{else}{l s='products'}{/if}</span></p>
  73. <div id="order-detail-content" class="table_block">
  74. <table id="cart_summary" class="std">
  75. <thead>
  76. <tr>
  77. <th class="cart_product first_item">{l s='Product'}</th>
  78. <th class="cart_description item">{l s='Description'}</th>
  79. <th class="cart_ref item">{l s='Ref.'}</th>
  80. <th class="cart_availability item">{l s='Avail.'}</th>
  81. <th class="cart_unit item">{l s='Unit price'}</th>
  82. <th class="cart_quantity item">{l s='Qty'}</th>
  83. <th class="cart_total last_item">{l s='Total'}</th>
  84. </tr>
  85. </thead>
  86. <tfoot>
  87. {if $use_taxes}
  88. {if $priceDisplay}
  89. <tr class="cart_total_price">
  90. <td colspan="6">{l s='Total products'}{if $display_tax_label} {l s='(tax excl.)'}{/if}{l s=':'}</td>
  91. <td class="price" id="total_product">{displayPrice price=$total_products}</td>
  92. </tr>
  93. {else}
  94. <tr class="cart_total_price">
  95. <td colspan="6">{l s='Total products'}{if $display_tax_label} {l s='(tax incl.)'}{/if}{l s=':'}</td>
  96. <td class="price" id="total_product">{displayPrice price=$total_products_wt}</td>
  97. </tr>
  98. {/if}
  99. {else}
  100. <tr class="cart_total_price">
  101. <td colspan="6">{l s='Total products:'}</td>
  102. <td class="price" id="total_product">{displayPrice price=$total_products}</td>
  103. </tr>
  104. {/if}
  105. <tr class="cart_total_voucher" {if $total_discounts == 0}style="display: none;"{/if}>
  106. <td colspan="6">
  107. {if $use_taxes}
  108. {if $priceDisplay}
  109. {l s='Total vouchers'}{if $display_tax_label} {l s='(tax excl.)'}{/if}{l s=':'}
  110. {else}
  111. {l s='Total vouchers'}{if $display_tax_label} {l s='(tax incl.)'}{/if}{l s=':'}
  112. {/if}
  113. {else}
  114. {l s='Total vouchers:'}
  115. {/if}
  116. </td>
  117. <td class="price-discount" id="total_discount">
  118. {if $use_taxes}
  119. {if $priceDisplay}
  120. {displayPrice price=$total_discounts_tax_exc}
  121. {else}
  122. {displayPrice price=$total_discounts}
  123. {/if}
  124. {else}
  125. {displayPrice price=$total_discounts_tax_exc}
  126. {/if}
  127. </td>
  128. </tr>
  129. <tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}>
  130. <td colspan="6">
  131. {if $use_taxes}
  132. {if $priceDisplay}
  133. {l s='Total gift-wrapping'}{if $display_tax_label} {l s='(tax excl.)'}{/if}{l s=':'}
  134. {else}
  135. {l s='Total gift-wrapping'}{if $display_tax_label} {l s='(tax incl.)'}{/if}{l s=':'}
  136. {/if}
  137. {else}
  138. {l s='Total gift-wrapping:'}
  139. {/if}
  140. </td>
  141. <td class="price-discount" id="total_wrapping">
  142. {if $use_taxes}
  143. {if $priceDisplay}
  144. {displayPrice price=$total_wrapping_tax_exc}
  145. {else}
  146. {displayPrice price=$total_wrapping}
  147. {/if}
  148. {else}
  149. {displayPrice price=$total_wrapping_tax_exc}
  150. {/if}
  151. </td>
  152. </tr>
  153. {if $use_taxes}
  154. {if $priceDisplay}
  155. <tr class="cart_total_delivery" {if $shippingCost <= 0} style="display:none;"{/if}>
  156. <td colspan="6">{l s='Total shipping'}{if $display_tax_label} {l s='(tax excl.)'}{/if}{l s=':'}</td>
  157. <td class="price" id="total_shipping">{displayPrice price=$shippingCostTaxExc}</td>
  158. </tr>
  159. {else}
  160. <tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
  161. <td colspan="6">{l s='Total shipping'}{if $display_tax_label} {l s='(tax incl.)'}{/if}{l s=':'}</td>
  162. <td class="price" id="total_shipping" >{displayPrice price=$shippingCost}</td>
  163. </tr>
  164. {/if}
  165. {else}
  166. <tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
  167. <td colspan="6">{l s='Total shipping:'}</td>
  168. <td class="price" id="total_shipping" >{displayPrice price=$shippingCostTaxExc}</td>
  169. </tr>
  170. {/if}
  171.  
  172. {if $use_taxes}
  173. <tr class="cart_total_price">
  174. <td colspan="6">{l s='Total (tax excl.):'}</td>
  175. <td class="price" id="total_price_without_tax">{displayPrice price=$total_price_without_tax}</td>
  176. </tr>
  177. <tr class="cart_total_tax">
  178. <td colspan="6">{l s='Total tax:'}</td>
  179. <td class="price" id="total_tax">{displayPrice price=$total_tax}</td>
  180. </tr>
  181. <tr class="cart_total_price">
  182. <td colspan="6">{l s='Total (tax incl.):'}</td>
  183. <td class="price" id="total_price">{displayPrice price=$total_price}</td>
  184. </tr>
  185. {else}
  186. <tr class="cart_total_price">
  187. <td colspan="6">{l s='Total:'}</td>
  188. <td class="price" id="total_price">{displayPrice price=$total_price_without_tax}</td>
  189. </tr>
  190. {/if}
  191. <tr class="cart_free_shipping" {if $free_ship <= 0 || $isVirtualCart} style="display: none;" {/if}>
  192. <td colspan="6" style="white-space: normal;">{l s='Remaining amount to be added to your cart in order to obtain free shipping:'}</td>
  193. <td id="free_shipping" class="price">{displayPrice price=$free_ship}</td>
  194. </tr>
  195. </tfoot>
  196. <tbody>
  197. {foreach from=$products item=product name=productLoop}
  198. {assign var='productId' value=$product.id_product}
  199. {assign var='productAttributeId' value=$product.id_product_attribute}
  200. {assign var='quantityDisplayed' value=0}
  201. {* Display the product line *}
  202. {include file="$tpl_dir./shopping-cart-product-line.tpl"}
  203. {* Then the customized datas ones*}
  204. {if isset($customizedDatas.$productId.$productAttributeId)}
  205. {foreach from=$customizedDatas.$productId.$productAttributeId key='id_customization' item='customization'}
  206. <tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" class="alternate_item cart_item">
  207. <td colspan="5">
  208. {foreach from=$customization.datas key='type' item='datas'}
  209. {if $type == $CUSTOMIZE_FILE}
  210. <div class="customizationUploaded">
  211. <ul class="customizationUploaded">
  212. {foreach from=$datas item='picture'}<li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li>{/foreach}
  213. </ul>
  214. </div>
  215. {elseif $type == $CUSTOMIZE_TEXTFIELD}
  216. <ul class="typedText">
  217. {foreach from=$datas item='textField' name='typedText'}<li>{if $textField.name}{$textField.name}{else}{l s='Text #'}{$smarty.foreach.typedText.index+1}{/if}{l s=':'} {$textField.value}</li>{/foreach}
  218. </ul>
  219. {/if}
  220. {/foreach}
  221. </td>
  222. <td class="cart_quantity">
  223. <div style="float:right">
  224. <a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart.php', true)}?delete&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;id_customization={$id_customization}&amp;token={$token_cart}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" title="{l s='Delete this customization'}" width="11" height="13" class="icon" /></a>
  225. </div>
  226. <div id="cart_quantity_button" style="float:left">
  227. <a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart.php', true)}?add&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;id_customization={$id_customization}&amp;token={$token_cart}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
  228. {if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1}
  229. <a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart.php', true)}?add&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;id_customization={$id_customization}&amp;op=down&amp;token={$token_cart}" title="{l s='Subtract'}">
  230. <img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
  231. </a>
  232. {else}
  233. <a class="cart_quantity_down" style="opacity: 0.3;" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="#" title="{l s='Subtract'}">
  234. <img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
  235. </a>
  236. {/if}
  237. </div>
  238. <input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_hidden"/>
  239. <input size="2" type="text" value="{$customization.quantity}" class="cart_quantity_input" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}"/>
  240. </td>
  241. <td class="cart_total"></td>
  242. </tr>
  243. {assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity}
  244. {/foreach}
  245. {* If it exists also some uncustomized products *}
  246. {if $product.quantity-$quantityDisplayed > 0}{include file="$tpl_dir./shopping-cart-product-line.tpl"}{/if}
  247. {/if}
  248. {/foreach}
  249. </tbody>
  250. {if sizeof($discounts)}
  251. <tbody>
  252. {foreach from=$discounts item=discount name=discountLoop}
  253. <tr class="cart_discount {if $smarty.foreach.discountLoop.last}last_item{elseif $smarty.foreach.discountLoop.first}first_item{else}item{/if}" id="cart_discount_{$discount.id_discount}">
  254. <td class="cart_discount_name" colspan="2">{$discount.name}</td>
  255. <td class="cart_discount_description" colspan="3">{$discount.description}</td>
  256. <td class="cart_discount_delete"><a href="{if $opc}{$link->getPageLink('order-opc.php', true)}{else}{$link->getPageLink('order.php', true)}{/if}?deleteDiscount={$discount.id_discount}" title="{l s='Delete'}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="icon" width="11" height="13" /></a></td>
  257. <td class="cart_discount_price"><span class="price-discount">
  258. {if $discount.value_real > 0}
  259. {if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if}
  260. {/if}
  261. </span></td>
  262. </tr>
  263. {/foreach}
  264. </tbody>
  265. {/if}
  266. </table>
  267. </div>
  268.  
  269. {if $voucherAllowed}
  270. <div id="cart_voucher" class="table_block">
  271. {if isset($errors_discount) && $errors_discount}
  272. <ul class="error">
  273. {foreach from=$errors_discount key=k item=error}
  274. <li>{$error|escape:'htmlall':'UTF-8'}</li>
  275. {/foreach}
  276. </ul>
  277. {/if}
  278. <form action="{if $opc}{$link->getPageLink('order-opc.php', true)}{else}{$link->getPageLink('order.php', true)}{/if}" method="post" id="voucher">
  279. <fieldset>
  280. <h4>{l s='Vouchers'}</h4>
  281. <p>
  282. <label for="discount_name">{l s='Code:'}</label>
  283. <input type="text" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" />
  284. </p>
  285. <p class="submit"><input type="hidden" name="submitDiscount" /><input type="submit" name="submitAddDiscount" value="{l s='Add'}" class="button" /></p>
  286. {if $displayVouchers}
  287. <h4>{l s='Take advantage of our offers:'}</h4>
  288. <div id="display_cart_vouchers">
  289. {foreach from=$displayVouchers item=voucher}
  290. <span onclick="$('#discount_name').val('{$voucher.name}');return false;" class="voucher_name">{$voucher.name}</span> - {$voucher.description} <br />
  291. {/foreach}
  292. </div>
  293. {/if}
  294. </fieldset>
  295. </form>
  296. </div>
  297. <p>{/if} </p>
  298. <div id="HOOK_SHOPPING_CART">{$HOOK_SHOPPING_CART}</div>
  299. {if (($carrier->id AND !isset($virtualCart)) OR $delivery->id OR $invoice->id) AND !$opc}
  300. <div class="order_delivery">
  301. {if $delivery->id}
  302. <ul id="delivery_address" class="address item">
  303. <li class="address_title">{l s='Delivery address'}</li>
  304. {if $delivery->company}<li class="address_company">{$delivery->company|escape:'htmlall':'UTF-8'}</li>{/if}
  305. <li class="address_name">{$delivery->firstname|escape:'htmlall':'UTF-8'} {$delivery->lastname|escape:'htmlall':'UTF-8'}</li>
  306. <li class="address_address1">{$delivery->address1|escape:'htmlall':'UTF-8'}</li>
  307. {if $delivery->address2}<li class="address_address2">{$delivery->address2|escape:'htmlall':'UTF-8'}</li>{/if}
  308. <li class="address_city">{$delivery->postcode|escape:'htmlall':'UTF-8'} {$delivery->city|escape:'htmlall':'UTF-8'}</li>
  309. <li class="address_country">{$delivery->country|escape:'htmlall':'UTF-8'} {if $delivery_state}({$delivery_state|escape:'htmlall':'UTF-8'}){/if}</li>
  310. </ul>
  311. {/if}
  312. {if $invoice->id}
  313. <ul id="invoice_address" class="address alternate_item">
  314. <li class="address_title">{l s='Invoice address'}</li>
  315. {if $invoice->company}<li class="address_company">{$invoice->company|escape:'htmlall':'UTF-8'}</li>{/if}
  316. <li class="address_name">{$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'}</li>
  317. <li class="address_address1">{$invoice->address1|escape:'htmlall':'UTF-8'}</li>
  318. {if $invoice->address2}<li class="address_address2">{$invoice->address2|escape:'htmlall':'UTF-8'}</li>{/if}
  319. <li class="address_city">{$invoice->postcode|escape:'htmlall':'UTF-8'} {$invoice->city|escape:'htmlall':'UTF-8'}</li>
  320. <li class="address_country">{$invoice->country|escape:'htmlall':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'htmlall':'UTF-8'}){/if}</li>
  321. </ul>
  322. {/if}
  323. {if $carrier->id AND !isset($virtualCart)}
  324. <div id="order_carrier">
  325. <h4>{l s='Carrier:'}</h4>
  326. {if isset($carrierPicture)}<img src="{$img_ship_dir}{$carrier->id}.jpg" alt="{l s='Carrier'}" />{/if}
  327. <span>{$carrier->name|escape:'htmlall':'UTF-8'}</span>
  328. </div>
  329. {/if}
  330. </div>
  331. {/if}
  332. <p class="cart_navigation">
  333. {if !$opc}<a href="{$link->getPageLink('order.php', true)}?step=1{if $back}&amp;back={$back}{/if}" class="exclusive" title="{l s='Next'}">{l s='Next'} &raquo;</a>{/if}
  334. <a href="{if (isset($smarty.server.HTTP_REFERER) && strstr($smarty.server.HTTP_REFERER, 'order.php')) || !isset($smarty.server.HTTP_REFERER)}{$link->getPageLink('index.php')}{else}{$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'|secureReferrer}{/if}" class="button_large" title="{l s='Continue shopping'}">&laquo; {l s='Continue shopping'}</a>
  335. </p>
  336. <p class="clear"><br /><br /></p>
  337. <p class="cart_navigation_extra">
  338. <span id="HOOK_SHOPPING_CART_EXTRA">{$HOOK_SHOPPING_CART_EXTRA}</span>
  339. </p>
  340. {/if}
  341.  
  342.  
  343.  
Advertisement
Add Comment
Please, Sign In to add comment