Advertisement
Guest User

Untitled

a guest
Nov 28th, 2013
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.96 KB | None | 0 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.  
  27. {*************************************************************************************************************************************}
  28. {* IMPORTANT : If you change some data here, you have to report these changes in the ./blockcart-json.js (to let ajaxCart available) *}
  29. {*************************************************************************************************************************************}
  30. {if $ajax_allowed}
  31. <script type="text/javascript">
  32. var CUSTOMIZE_TEXTFIELD = {$CUSTOMIZE_TEXTFIELD};
  33. var img_dir = '{$img_dir}';
  34. </script>
  35. {/if}
  36. <script type="text/javascript">
  37. var customizationIdMessage = '{l s='Customization #' mod='blockcart' js=1}';
  38. var removingLinkText = '{l s='remove this product from my cart' mod='blockcart' js=1}';
  39. var freeShippingTranslation = '{l s='Free shipping!' mod='blockcart' js=1}';
  40. var freeProductTranslation = '{l s='Free!' mod='blockcart' js=1}';
  41. var delete_txt = '{l s='Delete' mod='blockcart' js=1}';
  42. </script>
  43.  
  44.  
  45. <!-- MODULE Block cart -->
  46. <div id="cart_block" class="block exclusive">
  47. <h4 class="title_block">
  48. <a href="{$link->getPageLink("$order_process", true)}" title="{l s='View my shopping cart' mod='blockcart'}" rel="nofollow">{l s='Cart' mod='blockcart'}</a>
  49. {if $ajax_allowed}
  50. <span id="block_cart_expand" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !isset($colapseExpandStatus)}class="hidden"{/if}>&nbsp;</span>
  51. <span id="block_cart_collapse" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'collapsed'}class="hidden"{/if}>&nbsp;</span>
  52. {/if}
  53. </h4>
  54. <div class="block_content">
  55. <!-- block summary -->
  56. <div id="cart_block_summary" class="{if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !$ajax_allowed || !isset($colapseExpandStatus)}collapsed{else}expanded{/if}">
  57. <span class="ajax_cart_quantity" {if $cart_qties <= 0}style="display:none;"{/if}>{$cart_qties}</span>
  58. <span class="ajax_cart_product_txt_s" {if $cart_qties <= 1}style="display:none"{/if}>{l s='products' mod='blockcart'}</span>
  59. <span class="ajax_cart_product_txt" {if $cart_qties > 1}style="display:none"{/if}>{l s='product' mod='blockcart'}</span>
  60. <span class="ajax_cart_total price" {if $cart_qties == 0}style="display:none"{/if}>
  61. {if $cart_qties > 0}
  62. {if $priceDisplay == 1}
  63. {convertPrice price=$cart->getOrderTotal(false)}
  64. {else}
  65. {convertPrice price=$cart->getOrderTotal(true)}
  66. {/if}
  67. {/if}
  68. </span>
  69. <span class="ajax_cart_no_product" {if $cart_qties != 0}style="display:none"{/if}>{l s='(empty)' mod='blockcart'}</span>
  70. </div>
  71. <!-- block list of products -->
  72. <div id="cart_block_list" class="{if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !$ajax_allowed || !isset($colapseExpandStatus)}expanded{else}collapsed{/if}">
  73. {if $products}
  74. <dl class="products">
  75. {foreach from=$products item='product' name='myLoop'}
  76. {assign var='productId' value=$product.id_product}
  77. {assign var='productAttributeId' value=$product.id_product_attribute}
  78. <dt id="cart_block_product_{$product.id_product}_{if $product.id_product_attribute}{$product.id_product_attribute}{else}0{/if}_{if $product.id_address_delivery}{$product.id_address_delivery}{else}0{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">
  79. <span class="quantity-formated"><span class="quantity">{$product.cart_quantity}</span>x</span>
  80. <a class="cart_block_product_name" href="{$link->getProductLink($product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)}" title="{$product.name|escape:html:'UTF-8'}">
  81. {$product.name|truncate:13:'...'|escape:html:'UTF-8'}</a>
  82. <span class="remove_link">{if !isset($customizedDatas.$productId.$productAttributeId) && ($product.total > 0)}<a rel="nofollow" class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart', true, NULL, "delete&amp;id_product={$product.id_product}&amp;ipa={$product.id_product_attribute}&amp;id_address_delivery={$product.id_address_delivery}&amp;token={$static_token}", true)}" title="{l s='remove this product from my cart' mod='blockcart'}">&nbsp;</a>{/if}</span>
  83. <span class="price">
  84. {if $product.total > 0}
  85. {if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if}
  86. {else}
  87. <b>{l s='Free!' mod='blockcart'}</b>
  88. {/if}
  89. </span>
  90. </dt>
  91. {if isset($product.attributes_small)}
  92. <dd id="cart_block_combination_of_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}_{$product.id_address_delivery|intval}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">
  93. <a href="{$link->getProductLink($product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)}" title="{l s='Product detail' mod='blockcart'}">{$product.attributes_small}</a>
  94. {/if}
  95.  
  96. <!-- Customizable datas -->
  97. {if isset($customizedDatas.$productId.$productAttributeId[$product.id_address_delivery])}
  98. {if !isset($product.attributes_small)}<dd id="cart_block_combination_of_{$product.id_product}_{if $product.id_product_attribute}{$product.id_product_attribute}{else}0{/if}_{if $product.id_address_delivery}{$product.id_address_delivery}{else}0{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">{/if}
  99. <ul class="cart_block_customizations" id="customization_{$productId}_{$productAttributeId}">
  100. {foreach from=$customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizations'}
  101. <li name="customization">
  102. <div class="deleteCustomizableProduct" id="deleteCustomizableProduct_{$id_customization|intval}_{$product.id_product|intval}_{$product.id_product_attribute|intval}_{$product.id_address_delivery|intval}"><a rel="nofollow" class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart', true, NULL, "delete&id_product={$product.id_product}&ipa={$product.id_product_attribute}&id_address_delivery={$product.id_address_delivery}&token={$static_token}", true)}" title="{l s='remove this product from my cart' mod='blockcart'}">&nbsp;</a></div>
  103. <span class="quantity-formated"><span class="quantity">{$customization.quantity}</span>x</span>{if isset($customization.datas.$CUSTOMIZE_TEXTFIELD.0)}
  104. {$customization.datas.$CUSTOMIZE_TEXTFIELD.0.value|escape:html:'UTF-8'|replace:"<br />":" "|truncate:28}
  105. {else}
  106. {l s='Customization #%d:' sprintf=$id_customization|intval mod='blockcart'}
  107. {/if}
  108. </li>
  109. {/foreach}
  110. </ul>
  111. {if !isset($product.attributes_small)}</dd>{/if}
  112. {/if}
  113.  
  114. {if isset($product.attributes_small)}</dd>{/if}
  115.  
  116. {/foreach}
  117. </dl>
  118. {/if}
  119. <p {if $products}class="hidden"{/if} id="cart_block_no_products">{l s='No products' mod='blockcart'}</p>
  120. {if $discounts|@count > 0}
  121. <table id="vouchers">
  122. <tbody>
  123. {foreach from=$discounts item=discount}
  124. {if $discount.value_real > 0}
  125. <tr class="bloc_cart_voucher" id="bloc_cart_voucher_{$discount.id_discount}">
  126. <td class="quantity">1x</td>
  127. <td class="name" title="{$discount.description}">{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|escape:'htmlall':'UTF-8'}</td>
  128. <td class="price">-{if $priceDisplay == 1}{convertPrice price=$discount.value_tax_exc}{else}{convertPrice price=$discount.value_real}{/if}</td>
  129. <td class="delete">
  130. {if strlen($discount.code)}
  131. <a class="delete_voucher" href="{$link->getPageLink('$order_process', true)}?deleteDiscount={$discount.id_discount}" title="{l s='Delete' mod='blockcart'}" rel="nofollow"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete' mod='blockcart'}" class="icon" /></a>
  132. {/if}
  133. </td>
  134. </tr>
  135. {/if}
  136. {/foreach}
  137. </tbody>
  138. </table>
  139. {/if}
  140.  
  141. <div id="cart-prices">
  142. <div class="cart-prices-block">
  143. <span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
  144. <span>{l s='Shipping' mod='blockcart'}</span>
  145. </div>
  146.  
  147. {if $show_wrapping}
  148. <div class="cart-prices-block">
  149. {assign var='cart_flag' value='Cart::ONLY_WRAPPING'|constant}
  150. <span id="cart_block_wrapping_cost" class="price cart_block_wrapping_cost">{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, $cart_flag)}{else}{convertPrice price=$cart->getOrderTotal(true, $cart_flag)}{/if}</span>
  151. <span>{l s='Wrapping' mod='blockcart'}</span>
  152. </div>
  153. {/if}
  154. <div class="cart-prices-block">
  155. {if $show_tax && isset($tax_cost)}
  156. <span id="cart_block_tax_cost" class="price ajax_cart_tax_cost">{$tax_cost}</span>
  157. <span>{l s='Tax' mod='blockcart'}</span>
  158. <br/>
  159. {/if}
  160. <span id="cart_block_total" class="price ajax_block_cart_total">{$total}</span>
  161. <span>{l s='Total' mod='blockcart'}</span>
  162. </div>
  163. </div>
  164. {if $use_taxes && $display_tax_label == 1 && $show_tax}
  165. {if $priceDisplay == 0}
  166. <p id="cart-price-precisions">
  167. {l s='Prices are tax included' mod='blockcart'}
  168. </p>
  169. {/if}
  170. {if $priceDisplay == 1}
  171. <p id="cart-price-precisions">
  172. {l s='Prices are tax excluded' mod='blockcart'}
  173. </p>
  174. {/if}
  175. {/if}
  176. <p id="cart-buttons">
  177. {if $order_process == 'order'}<a href="{$link->getPageLink("$order_process", true)}" class="button_small" title="{l s='View my shopping cart' mod='blockcart'}" rel="nofollow">{l s='Cart' mod='blockcart'}</a>{/if}
  178. <a href="{$link->getPageLink("$order_process", true)}" id="button_order_cart" class="exclusive{if $order_process == 'order-opc'}_large{/if}" title="{l s='Check out' mod='blockcart'}" rel="nofollow"><span></span>{l s='Check out' mod='blockcart'}</a>
  179. </p>
  180. </div>
  181. </div>
  182. </div>
  183. <!-- /MODULE Block cart -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement