Advertisement
Guest User

Untitled

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