Guest User

Untitled

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