Guest User

Untitled

a guest
Apr 26th, 2014
950
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.98 KB | None | 0 0
  1. {*
  2. * 2007-2014 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-2014 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. {include file="$tpl_dir./errors.tpl"}
  26. {if $errors|@count == 0}
  27. {if !isset($priceDisplayPrecision)}
  28. {assign var='priceDisplayPrecision' value=2}
  29. {/if}
  30. {if !$priceDisplay || $priceDisplay == 2}
  31. {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)}
  32. {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)}
  33. {elseif $priceDisplay == 1}
  34. {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)}
  35. {assign var='productPriceWithoutReduction' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)}
  36. {/if}
  37. <div class="primary_block row" itemscope itemtype="http://schema.org/Product">
  38. {if !$content_only}
  39. <div class="container">
  40. <div class="top-hr"></div>
  41. </div>
  42. {/if}
  43. {if isset($adminActionDisplay) && $adminActionDisplay}
  44. <div id="admin-action">
  45. <p>{l s='This product is not visible to your customers.'}
  46. <input type="hidden" id="admin-action-product-id" value="{$product->id}" />
  47. <input type="submit" value="{l s='Publish'}" name="publish_button" class="exclusive" />
  48. <input type="submit" value="{l s='Back'}" name="lnk_view" class="exclusive" />
  49. </p>
  50. <p id="admin-action-result"></p>
  51. </div>
  52. {/if}
  53. {if isset($confirmation) && $confirmation}
  54. <p class="confirmation">
  55. {$confirmation}
  56. </p>
  57. {/if}
  58. <!-- left infos-->
  59. <div class="pb-left-column col-xs-12 col-sm-4 col-md-5">
  60. <!-- product img-->
  61. <div id="image-block" class="clearfix">
  62. {if $product->on_sale}
  63. <span class="sale-box no-print">
  64. <span class="sale-label">{l s='Sale!'}</span>
  65. </span>
  66. {elseif $product->specificPrice && $product->specificPrice.reduction && $productPriceWithoutReduction > $productPrice}
  67. <span class="discount">{l s='Reduced price!'}</span>
  68. {/if}
  69. {if $have_image}
  70. <span id="view_full_size">
  71. {if $jqZoomEnabled && $have_image && !$content_only}
  72. <a class="jqzoom" title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" rel="gal1" href="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')|escape:'html':'UTF-8'}" itemprop="url">
  73. <img itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}"/>
  74. </a>
  75. {else}
  76. <img id="bigpic" itemprop="image" src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')|escape:'html':'UTF-8'}" title="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" alt="{if !empty($cover.legend)}{$cover.legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" width="{$largeSize.width}" height="{$largeSize.height}"/>
  77. {if !$content_only}
  78. <span class="span_link no-print">{l s='View larger'}</span>
  79. {/if}
  80. {/if}
  81. </span>
  82. {else}
  83. <span id="view_full_size">
  84. <img itemprop="image" src="{$img_prod_dir}{$lang_iso}-default-large_default.jpg" id="bigpic" alt="" title="{$product->name|escape:'html':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}"/>
  85. {if !$content_only}
  86. <span class="span_link">
  87. {l s='View larger'}
  88. </span>
  89. {/if}
  90. </span>
  91. {/if}
  92. </div> <!-- end image-block -->
  93. {if isset($images) && count($images) > 0}
  94. <!-- thumbnails -->
  95. <div id="views_block" class="clearfix {if isset($images) && count($images) < 2}hidden{/if}">
  96. {if isset($images) && count($images) > 4}
  97. <span class="view_scroll_spacer">
  98. <a id="view_scroll_left" class="" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">
  99. {l s='Previous'}
  100. </a>
  101. </span>
  102. {/if}
  103. <div id="thumbs_list">
  104. <ul id="thumbs_list_frame">
  105. {if isset($images)}
  106. {foreach from=$images item=image name=thumbnails}
  107. {assign var=imageIds value="`$product->id`-`$image.id_image`"}
  108. {if !empty($image.legend)}
  109. {assign var=imageTitle value=$image.legend|escape:'html':'UTF-8'}
  110. {else}
  111. {assign var=imageTitle value=$product->name|escape:'html':'UTF-8'}
  112. {/if}
  113. <li id="thumbnail_{$image.id_image}"{if $smarty.foreach.thumbnails.last} class="last"{/if}>
  114. <a
  115. {if $jqZoomEnabled && $have_image && !$content_only}
  116. href="javascript:void(0);"
  117. rel="{literal}{{/literal}gallery: 'gal1', smallimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'large_default')|escape:'html':'UTF-8'}',largeimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}'{literal}}{/literal}"
  118. {else}
  119. href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}"
  120. data-fancybox-group="other-views"
  121. class="fancybox{if $image.id_image == $cover.id_image} shown{/if}"
  122. {/if}
  123. title="{$imageTitle}">
  124. <img class="img-responsive" id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart_default')|escape:'html':'UTF-8'}" alt="{$imageTitle}" title="{$imageTitle}" height="{$cartSize.height}" width="{$cartSize.width}" itemprop="image" />
  125. </a>
  126. </li>
  127. {/foreach}
  128. {/if}
  129. </ul>
  130. </div> <!-- end thumbs_list -->
  131. {if isset($images) && count($images) > 4}
  132. <a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">
  133. {l s='Next'}
  134. </a>
  135. {/if}
  136. </div> <!-- end views-block -->
  137. <!-- end thumbnails -->
  138. {/if}
  139. {if isset($images) && count($images) > 1}
  140. <p class="resetimg clear no-print">
  141. <span id="wrapResetImages" style="display: none;">
  142. <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" name="resetImages">
  143. <i class="icon-repeat"></i>
  144. {l s='Display all pictures'}
  145. </a>
  146. </span>
  147. </p>
  148. {/if}
  149. </div> <!-- end pb-left-column -->
  150. <!-- end left infos-->
  151. <!-- center infos -->
  152. <div class="pb-center-column col-xs-12 col-sm-4">
  153. {if $product->online_only}
  154. <p class="online_only">{l s='Online only'}</p>
  155. {/if}
  156.  
  157. <h1 itemprop="name">{$product->name|escape:'html':'UTF-8'}</h1>
  158. <p id="product_reference"{if empty($product->reference) || !$product->reference} style="display: none;"{/if}>
  159. <label>{l s='Model'} </label>
  160. <span class="editable" itemprop="sku">{if !isset($groups)}{$product->reference|escape:'html':'UTF-8'}{/if}</span>
  161. </p>
  162. {capture name=condition}
  163. {if $product->condition == 'new'}{l s='New'}
  164. {elseif $product->condition == 'used'}{l s='Used'}
  165. {elseif $product->condition == 'refurbished'}{l s='Refurbished'}
  166. {/if}
  167. {/capture}
  168. <p id="product_condition"{if !$product->condition} style="display: none;"{/if}>
  169. <label>{l s='Condition'} </label>
  170. <span class="editable" itemprop="condition">{$smarty.capture.condition}</span>
  171. </p>
  172. {if $product->description_short || $packItems|@count > 0}
  173. <div id="short_description_block">
  174. {if $product->description_short}
  175. <div id="short_description_content" class="rte align_justify" itemprop="description">{$product->description_short}</div>
  176. {/if}
  177.  
  178. {if $product->description}
  179. <p class="buttons_bottom_block">
  180. <a href="javascript:{ldelim}{rdelim}" class="button">
  181. {l s='More details'}
  182. </a>
  183. </p>
  184. {/if}
  185. <!--{if $packItems|@count > 0}
  186. <div class="short_description_pack">
  187. <h3>{l s='Pack content'}</h3>
  188. {foreach from=$packItems item=packItem}
  189.  
  190. <div class="pack_content">
  191. {$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)|escape:'html':'UTF-8'}">{$packItem.name|escape:'html':'UTF-8'}</a>
  192. <p>{$packItem.description_short}</p>
  193. </div>
  194. {/foreach}
  195. </div>
  196. {/if}-->
  197. </div> <!-- end short_description_block -->
  198. {/if}
  199. {if ($display_qties == 1 && !$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && $product->available_for_order)}
  200. <!-- number of item in stock -->
  201. <p id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}>
  202. <span id="quantityAvailable">{$product->quantity|intval}</span>
  203. <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='Item'}</span>
  204. <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='Items'}</span>
  205. </p>
  206. {/if}
  207. {if $PS_STOCK_MANAGEMENT}
  208. <!-- availability -->
  209. <p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) || ($product->quantity > 0 && !$product->available_now) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}>
  210. {*<span id="availability_label">{l s='Availability:'}</span>*}
  211. <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}>{if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}</span>
  212. </p>
  213. <p class="warning_inline" id="last_quantities"{if ($product->quantity > $last_qties || $product->quantity <= 0) || $allow_oosp || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none"{/if} >{l s='Warning: Last items in stock!'}</p>
  214. {/if}
  215. <p id="availability_date"{if ($product->quantity > 0) || !$product->available_for_order || $PS_CATALOG_MODE || !isset($product->available_date) || $product->available_date < $smarty.now|date_format:'%Y-%m-%d'} style="display: none;"{/if}>
  216. <span id="availability_date_label">{l s='Availability date:'}</span>
  217. <span id="availability_date_value">{dateFormat date=$product->available_date full=false}</span>
  218. </p>
  219. <!-- Out of stock hook -->
  220. <div id="oosHook"{if $product->quantity > 0} style="display: none;"{/if}>
  221. {$HOOK_PRODUCT_OOS}
  222. </div>
  223. {if isset($HOOK_EXTRA_RIGHT) && $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if}
  224. {if !$content_only}
  225. <!-- usefull links-->
  226. <ul id="usefull_link_block" class="clearfix no-print">
  227. {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if}
  228. <li class="print">
  229. <a href="javascript:print();">
  230. {l s='Print'}
  231. </a>
  232. </li>
  233. {if $have_image && !$jqZoomEnabled}{/if}
  234. </ul>
  235. {/if}
  236. </div>
  237. <!-- end center infos-->
  238. <!-- pb-right-column-->
  239. <div class="pb-right-column col-xs-12 col-sm-4 col-md-3">
  240. {if ($product->show_price && !isset($restricted_country_mode)) || isset($groups) || $product->reference || (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)}
  241. <!-- add to cart form-->
  242. <form id="buy_block" {if $PS_CATALOG_MODE && !isset($groups) && $product->quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart')|escape:'html':'UTF-8'}" method="post">
  243. <!-- hidden datas -->
  244. <p class="hidden">
  245. <input type="hidden" name="token" value="{$static_token}" />
  246. <input type="hidden" name="id_product" value="{$product->id|intval}" id="product_page_product_id" />
  247. <input type="hidden" name="add" value="1" />
  248. <input type="hidden" name="id_product_attribute" id="idCombination" value="" />
  249. </p>
  250. <div class="box-info-product">
  251. <div class="content_prices clearfix">
  252. {if $product->show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
  253. <!-- prices -->
  254. <div class="price">
  255. <p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
  256. <link itemprop="availability" {if $product->quantity <= 0}href="http://schema.org/OutOfStock"{else}href="http://schema.org/InStock"{/if}>
  257. {if $priceDisplay >= 0 && $priceDisplay <= 2}
  258. <span id="our_price_display" itemprop="price">{convertPrice price=$productPrice}</span>
  259. <!--{if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) || !isset($display_tax_label))}
  260. {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}
  261. {/if}-->
  262. <meta itemprop="priceCurrency" content="{$currency->iso_code}" />
  263. {/if}
  264. </p>
  265. <p id="reduction_percent" {if !$product->specificPrice || $product->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if}>
  266. <span id="reduction_percent_display">
  267. {if $product->specificPrice && $product->specificPrice.reduction_type == 'percentage'}-{$product->specificPrice.reduction*100}%{/if}
  268. </span>
  269. </p>
  270. <p id="old_price"{if (!$product->specificPrice || !$product->specificPrice.reduction) && $group_reduction == 1} class="hidden"{/if}>
  271. {if $priceDisplay >= 0 && $priceDisplay <= 2}
  272. <span id="old_price_display">{if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction}{/if}</span>
  273. <!-- {if $tax_enabled && $display_tax_label == 1}{if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if}{/if} -->
  274. {/if}
  275. </p>
  276. {if $priceDisplay == 2}
  277. <br />
  278. <span id="pretaxe_price">
  279. <span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}</span>
  280. {l s='tax excl.'}
  281. </span>
  282. {/if}
  283. </div> <!-- end prices -->
  284. <p id="reduction_amount" {if !$product->specificPrice || $product->specificPrice.reduction_type != 'amount' || $product->specificPrice.reduction|floatval ==0} style="display:none"{/if}>
  285. <span id="reduction_amount_display">
  286. {if $product->specificPrice && $product->specificPrice.reduction_type == 'amount' && $product->specificPrice.reduction|intval !=0}
  287. -{convertPrice price=$productPriceWithoutReduction-$productPrice|floatval}
  288. {/if}
  289. </span>
  290. </p>
  291. {if $packItems|@count && $productPrice < $product->getNoPackPrice()}
  292. <p class="pack_price">{l s='Instead of'} <span style="text-decoration: line-through;">{convertPrice price=$product->getNoPackPrice()}</span></p>
  293. {/if}
  294. {if $product->ecotax != 0}
  295. <p class="price-ecotax">{l s='Include'} <span id="ecotax_price_display">{if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if}</span> {l s='For green tax'}
  296. {if $product->specificPrice && $product->specificPrice.reduction}
  297. <br />{l s='(not impacted by the discount)'}
  298. {/if}
  299. </p>
  300. {/if}
  301. {if !empty($product->unity) && $product->unit_price_ratio > 0.000000}
  302. {math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price}
  303. <p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'html':'UTF-8'}</p>
  304. {/if}
  305. {/if} {*close if for show price*}
  306. <div class="clear"></div>
  307. </div> <!-- end content_prices -->
  308. <div class="product_attributes clearfix">
  309. <!-- quantity wanted -->
  310. {if !$PS_CATALOG_MODE}
  311. <p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}>
  312. <label>{l s='Quantity:'}</label>
  313. <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" />
  314. <a href="#" data-field-qty="qty" class="btn btn-default button-minus product_quantity_down">
  315. <span><i class="icon-minus"></i></span>
  316. </a>
  317. <a href="#" data-field-qty="qty" class="btn btn-default button-plus product_quantity_up ">
  318. <span><i class="icon-plus"></i></span>
  319. </a>
  320. <span class="clearfix"></span>
  321. </p>
  322. {/if}
  323. <!-- minimal quantity wanted -->
  324. <p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}>
  325. {l s='This product is not sold individually. You must select at least'} <b id="minimal_quantity_label">{$product->minimal_quantity}</b> {l s='quantity for this product.'}
  326. </p>
  327. {if isset($groups)}
  328. <!-- attributes -->
  329. <div id="attributes">
  330. <div class="clearfix"></div>
  331. {foreach from=$groups key=id_attribute_group item=group}
  332. {if $group.attributes|@count}
  333. <fieldset class="attribute_fieldset">
  334. <label class="attribute_label" {if $group.group_type != 'color' && $group.group_type != 'radio'}for="group_{$id_attribute_group|intval}"{/if}>{$group.name|escape:'html':'UTF-8'} :&nbsp;</label>
  335. {assign var="groupName" value="group_$id_attribute_group"}
  336. <div class="attribute_list">
  337. {if ($group.group_type == 'select')}
  338. <select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="form-control attribute_select no-print">
  339. {foreach from=$group.attributes key=id_attribute item=group_attribute}
  340. <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'html':'UTF-8'}">{$group_attribute|escape:'html':'UTF-8'}</option>
  341. {/foreach}
  342. </select>
  343. {elseif ($group.group_type == 'color')}
  344. <ul id="color_to_pick_list" class="clearfix">
  345. {assign var="default_colorpicker" value=""}
  346. {foreach from=$group.attributes key=id_attribute item=group_attribute}
  347. <li{if $group.default == $id_attribute} class="selected"{/if}>
  348. <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" name="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}" style="background: {$colors.$id_attribute.value|escape:'html':'UTF-8'};" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}">
  349. {if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}
  350. <img src="{$img_col_dir}{$id_attribute|intval}.jpg" alt="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" width="20" height="20" />
  351. {/if}
  352. </a>
  353. </li>
  354. {if ($group.default == $id_attribute)}
  355. {$default_colorpicker = $id_attribute}
  356. {/if}
  357. {/foreach}
  358. </ul>
  359. <input type="hidden" class="color_pick_hidden" name="{$groupName|escape:'html':'UTF-8'}" value="{$default_colorpicker|intval}" />
  360. {elseif ($group.group_type == 'radio')}
  361. <ul>
  362. {foreach from=$group.attributes key=id_attribute item=group_attribute}
  363. <li>
  364. <input type="radio" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} />
  365. <span>{$group_attribute|escape:'html':'UTF-8'}</span>
  366. </li>
  367. {/foreach}
  368. </ul>
  369. {/if}
  370. </div> <!-- end attribute_list -->
  371. </fieldset>
  372. {/if}
  373. {/foreach}
  374. </div> <!-- end attributes -->
  375. {/if}
  376. </div> <!-- end product_attributes -->
  377. <div class="box-cart-bottom">
  378. <div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if}>
  379. <p id="add_to_cart" class="buttons_bottom_block no-print">
  380. <button type="submit" name="Submit" class="exclusive">
  381. <span>{l s='Add to cart'}</span>
  382. </button>
  383. </p>
  384. </div>
  385. {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}<strong></strong>
  386. </div> <!-- end box-cart-bottom -->
  387. </div> <!-- end box-info-product -->
  388. </form>
  389. {/if}
  390. </div> <!-- end pb-right-column-->
  391. </div> <!-- end primary_block -->
  392. {if !$content_only}
  393. {if (isset($quantity_discounts) && count($quantity_discounts) > 0)}
  394. <!-- quantity discount -->
  395. <section class="page-product-box">
  396. <h3 class="page-product-heading">{l s='Volume discounts'}</h3>
  397. <div id="quantityDiscount">
  398. <table class="std table-product-discounts">
  399. <thead>
  400. <tr>
  401. <th>{l s='Quantity'}</th>
  402. <th>{if $display_discount_price}{l s='Price'}{else}{l s='Discount'}{/if}</th>
  403. <th>{l s='You Save'}</th>
  404. </tr>
  405. </thead>
  406. <tbody>
  407. {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'}
  408. <tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}">
  409. <td>{$quantity_discount.quantity|intval}</td>
  410. <td>
  411. {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
  412. {if $display_discount_price}
  413. {convertPrice price=$productPrice-$quantity_discount.real_value|floatval}
  414. {else}
  415. {convertPrice price=$quantity_discount.real_value|floatval}
  416. {/if}
  417. {else}
  418. {if $display_discount_price}
  419. {convertPrice price = $productPrice-($productPrice*$quantity_discount.reduction)|floatval}
  420. {else}
  421. {$quantity_discount.real_value|floatval}%
  422. {/if}
  423. {/if}
  424. </td>
  425. <td>
  426. <span>{l s='Up to'}</span>
  427. {if $quantity_discount.price >= 0 || $quantity_discount.reduction_type == 'amount'}
  428. {$discountPrice=$productPrice-$quantity_discount.real_value|floatval}
  429. {else}
  430. {$discountPrice=$productPrice-($productPrice*$quantity_discount.reduction)|floatval}
  431. {/if}
  432. {$discountPrice=$discountPrice*$quantity_discount.quantity}
  433. {$qtyProductPrice = $productPrice*$quantity_discount.quantity}
  434. {convertPrice price=$qtyProductPrice-$discountPrice}
  435. </td>
  436. </tr>
  437. {/foreach}
  438. </tbody>
  439. </table>
  440. </div>
  441. </section>
  442. {/if}
  443. {if isset($features) && $features}
  444. <!-- Data sheet -->
  445. <section class="page-product-box">
  446. <h3 class="page-product-heading">{l s='Data sheet'}</h3>
  447. <table class="table-data-sheet">
  448. {foreach from=$features item=feature}
  449. <tr class="{cycle values="odd,even"}">
  450. {if isset($feature.value)}
  451. <td>{$feature.name|escape:'html':'UTF-8'}</td>
  452. <td>{$feature.value|escape:'html':'UTF-8'}</td>
  453. {/if}
  454. </tr>
  455. {/foreach}
  456. </table>
  457. </section>
  458. <!--end Data sheet -->
  459. {/if}
  460. {if $product->description}
  461. <!-- More info -->
  462. <section class="page-product-box">
  463. <h3 class="page-product-heading">{l s='More info'}</h3>{/if}
  464. {if isset($product) && $product->description}
  465. <!-- full description -->
  466. <div class="rte">{$product->description}</div>
  467. </section>
  468. <!--end More info -->
  469. {/if}
  470. <!--HOOK_PRODUCT_TAB -->
  471. <section class="page-product-box">
  472. {$HOOK_PRODUCT_TAB}
  473. {if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if}
  474. </section>
  475. <!--end HOOK_PRODUCT_TAB -->
  476. {if isset($accessories) && $accessories}
  477. <!--Accessories -->
  478. <section class="page-product-box">
  479. <h3 class="page-product-heading">{l s='Accessories'}</h3>
  480. <div class="block products_block accessories-block clearfix">
  481. <div class="block_content">
  482. <ul id="bxslider" class="bxslider clearfix">
  483. {foreach from=$accessories item=accessory name=accessories_list}
  484. {if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0 || $accessory.quantity > 0) && $accessory.available_for_order && !isset($restricted_country_mode)}
  485. {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}
  486. <li class="item product-box ajax_block_product{if $smarty.foreach.accessories_list.first} first_item{elseif $smarty.foreach.accessories_list.last} last_item{else} item{/if} product_accessories_description">
  487. <div class="product_desc">
  488. <a href="{$accessoryLink|escape:'html':'UTF-8'}" title="{$accessory.legend|escape:'html':'UTF-8'}" class="product-image product_image">
  489. <img class="lazyOwl" src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{$accessory.legend|escape:'html':'UTF-8'}" width="{$homeSize.width}" height="{$homeSize.height}"/>
  490. </a>
  491. <div class="block_description">
  492. <a href="{$accessoryLink|escape:'html':'UTF-8'}" title="{l s='More'}" class="product_description">
  493. {$accessory.description_short|strip_tags|truncate:25:'...'}
  494. </a>
  495. </div>
  496. </div>
  497. <div class="s_title_block">
  498. <h5 class="product-name">
  499. <a href="{$accessoryLink|escape:'html':'UTF-8'}">
  500. {$accessory.name|truncate:20:'...':true|escape:'html':'UTF-8'}
  501. </a>
  502. </h5>
  503. {if $accessory.show_price && !isset($restricted_country_mode) && !$PS_CATALOG_MODE}
  504. <span class="price">
  505. {if $priceDisplay != 1}
  506. {displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}
  507. {/if}
  508. </span>
  509. {/if}
  510. </div>
  511. <div class="clearfix" style="margin-top:5px">
  512. {if !$PS_CATALOG_MODE && ($accessory.allow_oosp || $accessory.quantity > 0)}
  513. <div class="no-print">
  514. <a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&amp;id_product={$accessory.id_product|intval}&amp;token={$static_token}&amp;add")|escape:'html':'UTF-8'}" data-id-product="{$accessory.id_product|intval}" title="{l s='Add to cart'}">
  515. <span>{l s='Add to cart'}</span>
  516. </a>
  517. </div>
  518. {/if}
  519. </div>
  520. </li>
  521. {/if}
  522. {/foreach}
  523. </ul>
  524. </div>
  525. </div>
  526. </section>
  527. <!--end Accessories -->
  528. {/if}
  529. {if isset($HOOK_PRODUCT_FOOTER) && $HOOK_PRODUCT_FOOTER}{$HOOK_PRODUCT_FOOTER}{/if}
  530. <!-- description & features -->
  531. {if (isset($product) && $product->description) || (isset($features) && $features) || (isset($accessories) && $accessories) || (isset($HOOK_PRODUCT_TAB) && $HOOK_PRODUCT_TAB) || (isset($attachments) && $attachments) || isset($product) && $product->customizable}
  532. <div id="more_info_block" class="col-md-12 review-tab">
  533. <ul id="more_info_tabs" class="idTabs idTabsShort nav nav-tabs">
  534. {if $product->description}<li><a id="more_info_tab_more_info" href="#idTab1">{l s='More info'}</a></li>{/if}
  535. {if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if}
  536. {if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if}
  537. {if isset($accessories) AND $accessories}<li><a href="#idTab4">{l s='Accessories'}</a></li>{/if}
  538. {if isset($product) && $product->customizable}<li><a href="#idTab10">{l s='Product customization'}</a></li>{/if}
  539. {if isset($HOOK_PRODUCT_TAB) && $HOOK_PRODUCT_TAB}<li><a href="#idTab11">{l s='Product Reviews'}</a></li>{/if}
  540. </ul>
  541.  
  542. <div id="more_info_sheets" class="sheets align_justify">
  543. {if isset($product) && $product->description}
  544. <!-- full description -->
  545. <section class="page-product-box" id="idTab1">
  546. {$product->description}
  547. </section>
  548. {/if}
  549.  
  550. {if isset($HOOK_PRODUCT_TAB) && $HOOK_PRODUCT_TAB}
  551. <!-- full description -->
  552.  
  553. <section class="page-product-box" id="idTab11">
  554. {if isset($HOOK_PRODUCT_TAB_CONTENT) && $HOOK_PRODUCT_TAB_CONTENT}{$HOOK_PRODUCT_TAB_CONTENT}{/if}
  555. </section>
  556. {/if}
  557.  
  558. {if isset($features) && $features}
  559. <!-- product's features -->
  560. <section class="page-product-box" id="idTab2">
  561. <ul class="bullet">
  562. {foreach from=$features item=feature}
  563. {if isset($feature.value)}
  564. <li><span>{$feature.name|escape:'htmlall':'UTF-8'}</span> {$feature.value|escape:'htmlall':'UTF-8'}</li>
  565. {/if}
  566. {/foreach}
  567. </ul>
  568. </section>
  569. {/if}
  570.  
  571. {if isset($attachments) && $attachments}
  572. <section class="page-product-box" id="idTab9">
  573. <ul class="bullet">
  574. {foreach from=$attachments item=attachment}
  575. <li><a href="{$link->getPageLink('attachment', true, NULL, "id_attachment={$attachment.id_attachment}")|escape:'html'}">{$attachment.name|escape:'htmlall':'UTF-8'}</a><br />{$attachment.description|escape:'htmlall':'UTF-8'}</li>
  576. {/foreach}
  577. </ul>
  578. </section>
  579. {/if}
  580.  
  581. {if isset($accessories) AND $accessories}
  582. <!-- accessories -->
  583. <section class="page-product-box" id="idTab4">
  584. <div class="block products_block accessories_block clearfix">
  585. <div class="block_content">
  586. <ul>
  587. {foreach from=$accessories item=accessory name=accessories_list}
  588. {if ($accessory.allow_oosp || $accessory.quantity_all_versions > 0 || $accessory.quantity > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode)}
  589. {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}
  590. <li class="ajax_block_product{if $smarty.foreach.accessories_list.first} first_item{elseif $smarty.foreach.accessories_list.last} last_item{else} item{/if} product_accessories_description">
  591. <p class="s_title_block">
  592. <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}">{$accessory.name|escape:'htmlall':'UTF-8'}</a>
  593. {if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} - <span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span>{/if}
  594. </p>
  595. <div class="product_desc">
  596. <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.legend|escape:'htmlall':'UTF-8'}" class="product_image"><img src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'medium_default')|escape:'html'}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /></a>
  597. <div class="block_description">
  598. <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='More'}" class="product_description">{$accessory.description_short|strip_tags|truncate:400:'...'}</a>
  599. </div>
  600. <div class="clear_product_desc">&nbsp;</div>
  601. </div>
  602.  
  603. <p class="clearfix" style="margin-top:5px">
  604. <a class="button" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a>
  605. {if !$PS_CATALOG_MODE && ($accessory.allow_oosp || $accessory.quantity > 0)}
  606. <a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart', true, NULL, "qty=1&amp;id_product={$accessory.id_product|intval}&amp;token={$static_token}&amp;add")|escape:'html'}" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a>
  607. {/if}
  608. </p>
  609.  
  610. </li>
  611. {/if}
  612. {/foreach}
  613. </ul>
  614. </div>
  615. </div>
  616. </section>
  617. {/if}
  618.  
  619. <!-- Customizable products -->
  620. {if isset($product) && $product->customizable}
  621. <section class="page-product-box" id="idTab10">
  622. <div class="bullet customization_block">
  623. <form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm" class="clearfix">
  624. <p class="infoCustomizable">
  625. {l s='After saving your customized product, remember to add it to your cart.'}
  626. {if $product->uploadable_files}<br />{l s='Allowed file formats are: GIF, JPG, PNG'}{/if}
  627. </p>
  628. {if $product->uploadable_files|intval}
  629. <div class="customizableProductsFile">
  630. <h3>{l s='Pictures'}</h3>
  631. <ul id="uploadable_files" class="clearfix">
  632. {counter start=0 assign='customizationField'}
  633. {foreach from=$customizationFields item='field' name='customizationFields'}
  634. {if $field.type == 0}
  635. <li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}
  636. {if isset($pictures.$key)}
  637. <div class="customizationUploadBrowse">
  638. <img src="{$pic_dir}{$pictures.$key}_small" alt="" />
  639. <a href="{$link->getProductDeletePictureLink($product, $field.id_customization_field)|escape:'html'}" title="{l s='Delete'}" >
  640. <img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="11" height="13" />
  641. </a>
  642. </div>
  643. {/if}
  644. <div class="customizationUploadBrowse">
  645. <label class="customizationUploadBrowseDescription">{if !empty($field.name)}{$field.name}{else}{l s='Please select an image file from your computer'}{/if}{if $field.required}<sup>*</sup>{/if}</label>
  646. <input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}" class="customization_block_input {if isset($pictures.$key)}filled{/if}" />
  647. </div>
  648. </li>
  649. {counter}
  650. {/if}
  651. {/foreach}
  652. </ul>
  653. </div>
  654. {/if}
  655. {if $product->text_fields|intval}
  656. <div class="customizableProductsText">
  657. <h3>{l s='Text'}</h3>
  658. <ul id="text_fields">
  659. {counter start=0 assign='customizationField'}
  660. {foreach from=$customizationFields item='field' name='customizationFields'}
  661. {if $field.type == 1}
  662. <li class="customizationUploadLine{if $field.required} required{/if}">
  663. <label for ="textField{$customizationField}">{assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} {if !empty($field.name)}{$field.name}{/if}{if $field.required}<sup>*</sup>{/if}</label>
  664. <textarea name="textField{$field.id_customization_field}" id="textField{$customizationField}" rows="1" cols="40" class="customization_block_input">{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea>
  665. </li>
  666. {counter}
  667. {/if}
  668. {/foreach}
  669. </ul>
  670. </div>
  671. {/if}
  672. <p id="customizedDatas">
  673. <input type="hidden" name="quantityBackup" id="quantityBackup" value="" />
  674. <input type="hidden" name="submitCustomizedDatas" value="1" />
  675. <input type="button" class="button" value="{l s='Save'}" onclick="javascript:saveCustomization()" />
  676. <span id="ajax-loader" style="display:none"><img src="{$img_ps_dir}loader.gif" alt="loader" /></span>
  677. </p>
  678. </form>
  679. <p class="clear required"><sup>*</sup> {l s='required fields'}</p>
  680. </div>
  681. </section>
  682. {/if}
  683. </div>
  684. </div>
  685. {/if}
  686. {if (isset($product) && $product->description) || (isset($features) && $features) || (isset($accessories) && $accessories) || (isset($HOOK_PRODUCT_TAB) && $HOOK_PRODUCT_TAB) || (isset($attachments) && $attachments) || isset($product) && $product->customizable}
  687. {if isset($attachments) && $attachments}
  688.  
  689. <!--Download -->
  690. <section class="page-product-box">
  691. <h3 class="page-product-heading">{l s='Download'}</h3>
  692. {foreach from=$attachments item=attachment name=attachements}
  693. {if $smarty.foreach.attachements.iteration %3 == 1}<div class="row">{/if}
  694. <div class="col-lg-4">
  695. <h4><a href="{$link->getPageLink('attachment', true, NULL, "id_attachment={$attachment.id_attachment}")|escape:'html':'UTF-8'}">{$attachment.name|escape:'html':'UTF-8'}</a></h4>
  696. <p class="text-muted">{$attachment.description|escape:'html':'UTF-8'}</p>
  697. <a class="btn btn-default btn-block" href="{$link->getPageLink('attachment', true, NULL, "id_attachment={$attachment.id_attachment}")|escape:'html':'UTF-8'}">
  698. <i class="icon-download"></i>
  699. {l s="Download"} ({Tools::formatBytes($attachment.file_size, 2)})
  700. </a>
  701. <hr>
  702. </div>
  703. {if $smarty.foreach.attachements.iteration %3 == 0 || $smarty.foreach.attachements.last}</div>{/if}
  704. {/foreach}
  705. </section>
  706. <!--end Download -->
  707. {/if}
  708. {if isset($product) && $product->customizable}
  709. <!--Customization -->
  710. <section class="page-product-box">
  711. <h3 class="page-product-heading">{l s='Product customization'}</h3>
  712. <!-- Customizable products -->
  713. <form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm" class="clearfix">
  714. <p class="infoCustomizable">
  715. {l s='After saving your customized product, remember to add it to your cart.'}
  716. {if $product->uploadable_files}
  717. <br />
  718. {l s='Allowed file formats are: GIF, JPG, PNG'}{/if}
  719. </p>
  720. {if $product->uploadable_files|intval}
  721. <div class="customizableProductsFile">
  722. <h5 class="product-heading-h5">{l s='Pictures'}</h5>
  723. <ul id="uploadable_files" class="clearfix">
  724. {counter start=0 assign='customizationField'}
  725. {foreach from=$customizationFields item='field' name='customizationFields'}
  726. {if $field.type == 0}
  727. <li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}
  728. {if isset($pictures.$key)}
  729. <div class="customizationUploadBrowse">
  730. <img src="{$pic_dir}{$pictures.$key}_small" alt="" />
  731. <a href="{$link->getProductDeletePictureLink($product, $field.id_customization_field)|escape:'html':'UTF-8'}" title="{l s='Delete'}" >
  732. <img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="11" height="13" />
  733. </a>
  734. </div>
  735. {/if}
  736. <div class="customizationUploadBrowse form-group">
  737. <label class="customizationUploadBrowseDescription">
  738. {if !empty($field.name)}
  739. {$field.name}
  740. {else}
  741. {l s='Please select an image file from your computer'}
  742. {/if}
  743. {if $field.required}<sup>*</sup>{/if}
  744. </label>
  745. <input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}" class="form-control customization_block_input {if isset($pictures.$key)}filled{/if}" />
  746. </div>
  747. </li>
  748. {counter}
  749. {/if}
  750. {/foreach}
  751. </ul>
  752. </div>
  753. {/if}
  754. {if $product->text_fields|intval}
  755. <div class="customizableProductsText">
  756. <h5 class="product-heading-h5">{l s='Text'}</h5>
  757. <ul id="text_fields">
  758. {counter start=0 assign='customizationField'}
  759. {foreach from=$customizationFields item='field' name='customizationFields'}
  760. {if $field.type == 1}
  761. <li class="customizationUploadLine{if $field.required} required{/if}">
  762. <label for ="textField{$customizationField}">
  763. {assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field}
  764. {if !empty($field.name)}
  765. {$field.name}
  766. {/if}
  767. {if $field.required}<sup>*</sup>{/if}
  768. </label>
  769. <textarea name="textField{$field.id_customization_field}" class="form-control customization_block_input" id="textField{$customizationField}" rows="3" cols="20">{strip}
  770. {if isset($textFields.$key)}
  771. {$textFields.$key|stripslashes}
  772. {/if}
  773. {/strip}</textarea>
  774. </li>
  775. {counter}
  776. {/if}
  777. {/foreach}
  778. </ul>
  779. </div>
  780. {/if}
  781. <p id="customizedDatas">
  782. <input type="hidden" name="quantityBackup" id="quantityBackup" value="" />
  783. <input type="hidden" name="submitCustomizedDatas" value="1" />
  784. <button class="button btn btn-default button button-small" name="saveCustomization">
  785. <span>{l s='Save'}</span>
  786. </button>
  787. <span id="ajax-loader" class="unvisible">
  788. <img src="{$img_ps_dir}loader.gif" alt="loader" />
  789. </span>
  790. </p>
  791. </form>
  792. <p class="clear required"><sup>*</sup> {l s='required fields'}</p>
  793. </section>
  794. <!--end Customization -->
  795. {/if}
  796. {/if}
  797. {if isset($packItems) && $packItems|@count > 0}
  798. <section id="blockpack">
  799. <h3 class="page-product-heading">{l s='Pack content'}</h3>
  800. {include file="$tpl_dir./product-list.tpl" products=$packItems}
  801. </section>
  802. {/if}
  803. {/if}
  804. {strip}
  805. {strip}
  806. {if isset($smarty.get.ad) && $smarty.get.ad}
  807. {addJsDefL name=ad}{$base_dir|cat:$smarty.get.ad|escape:'html':'UTF-8'}{/addJsDefL}
  808. {/if}
  809. {if isset($smarty.get.adtoken) && $smarty.get.adtoken}
  810. {addJsDefL name=adtoken}{$smarty.get.adtoken|escape:'html':'UTF-8'}{/addJsDefL}
  811. {/if}
  812. {addJsDef allowBuyWhenOutOfStock=$allow_oosp|boolval}
  813. {addJsDef availableNowValue=$product->available_now|escape:'quotes':'UTF-8'}
  814. {addJsDef availableLaterValue=$product->available_later|escape:'quotes':'UTF-8'}
  815. {addJsDef attribute_anchor_separator=$attribute_anchor_separator|addslashes}
  816. {addJsDef attributesCombinations=$attributesCombinations}
  817. {addJsDef currencySign=$currencySign|html_entity_decode:2:"UTF-8"}
  818. {addJsDef currencyRate=$currencyRate|floatval}
  819. {addJsDef currencyFormat=$currencyFormat|intval}
  820. {addJsDef currencyBlank=$currencyBlank|intval}
  821. {addJsDef currentDate=$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}
  822. {if isset($combinations) && $combinations}
  823. {addJsDef combinations=$combinations}
  824. {/if}
  825. {if isset($combinationImages) && $combinationImages}
  826. {addJsDef combinationImages=$combinationImages}
  827. {/if}
  828. {addJsDef customizationFields=$customizationFields}
  829. {addJsDef default_eco_tax=$product->ecotax|floatval}
  830. {addJsDef displayPrice=$priceDisplay|intval}
  831. {addJsDef ecotaxTax_rate=$ecotaxTax_rate|floatval}
  832. {addJsDef group_reduction=$group_reduction}
  833. {if isset($cover.id_image_only)}
  834. {addJsDef idDefaultImage=$cover.id_image_only|intval}
  835. {else}
  836. {addJsDef idDefaultImage=0}
  837. {/if}
  838. {addJsDef img_ps_dir=$img_ps_dir}
  839. {addJsDef img_prod_dir=$img_prod_dir}
  840. {addJsDef id_product=$product->id|intval}
  841. {addJsDef jqZoomEnabled=$jqZoomEnabled|boolval}
  842. {addJsDef maxQuantityToAllowDisplayOfLastQuantityMessage=$last_qties|intval}
  843. {addJsDef minimalQuantity=$product->minimal_quantity|intval}
  844. {addJsDef noTaxForThisProduct=$no_tax|boolval}
  845. {addJsDef oosHookJsCodeFunctions=Array()}
  846. {addJsDef productHasAttributes=isset($groups)|boolval}
  847. {addJsDef productPriceTaxExcluded=($product->getPriceWithoutReduct(true)|default:'null' - $product->ecotax)|floatval}
  848. {addJsDef productBasePriceTaxExcluded=($product->base_price - $product->ecotax)|floatval}
  849. {addJsDef productReference=$product->reference|escape:'html':'UTF-8'}
  850. {addJsDef productAvailableForOrder=$product->available_for_order|boolval}
  851. {addJsDef productPriceWithoutReduction=$productPriceWithoutReduction|floatval}
  852. {addJsDef productPrice=$productPrice|floatval}
  853. {addJsDef productUnitPriceRatio=$product->unit_price_ratio|floatval}
  854. {addJsDef productShowPrice=(!$PS_CATALOG_MODE && $product->show_price)|boolval}
  855. {addJsDef PS_CATALOG_MODE=$PS_CATALOG_MODE}
  856. {if $product->specificPrice && $product->specificPrice|@count}
  857. {addJsDef product_specific_price=$product->specificPrice}
  858. {else}
  859. {addJsDef product_specific_price=array()}
  860. {/if}
  861. {if $display_qties == 1 && $product->quantity}
  862. {addJsDef quantityAvailable=$product->quantity}
  863. {else}
  864. {addJsDef quantityAvailable=0}
  865. {/if}
  866. {addJsDef quantitiesDisplayAllowed=$display_qties|boolval}
  867. {if $product->specificPrice && $product->specificPrice.reduction && $product->specificPrice.reduction_type == 'percentage'}
  868. {addJsDef reduction_percent=$product->specificPrice.reduction*100|floatval}
  869. {else}
  870. {addJsDef reduction_percent=0}
  871. {/if}
  872. {if $product->specificPrice && $product->specificPrice.reduction && $product->specificPrice.reduction_type == 'amount'}
  873. {addJsDef reduction_price=$product->specificPrice.reduction|floatval}
  874. {else}
  875. {addJsDef reduction_price=0}
  876. {/if}
  877. {if $product->specificPrice && $product->specificPrice.price}
  878. {addJsDef specific_price=$product->specificPrice.price|floatval}
  879. {else}
  880. {addJsDef specific_price=0}
  881. {/if}
  882. {addJsDef specific_currency=($product->specificPrice && $product->specificPrice.id_currency)|boolval}
  883. {addJsDef stock_management=$stock_management|intval}
  884. {addJsDef taxRate=$tax_rate|floatval}
  885. {addJsDefL name=doesntExist}{l s='This combination does not exist for this product. Please select another combination.' js=1}{/addJsDefL}
  886. {addJsDefL name=doesntExistNoMore}{l s='This product is no longer in stock' js=1}{/addJsDefL}
  887. {addJsDefL name=doesntExistNoMoreBut}{l s='with those attributes but is available with others.' js=1}{/addJsDefL}
  888. {addJsDefL name=fieldRequired}{l s='Please fill in all the required fields before saving your customization.' js=1}{/addJsDefL}
  889. {addJsDefL name=uploading_in_progress}{l s='Uploading in progress, please be patient.' js=1}{/addJsDefL}
  890. {/strip}
  891. {/if}
Advertisement
Add Comment
Please, Sign In to add comment