PageRenderTime 66ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/smarty/compile/f5f553d6f86b4ae34b596f402bf85945451f2a0d.file.product.tpl.php

http://marocmall.googlecode.com/
PHP | 817 lines | 796 code | 11 blank | 10 comment | 131 complexity | 87ba02ef1d67577af5854f708f18d05b MD5 | raw file
Possible License(s): LGPL-2.1

Large files files are truncated, but you can click here to view the full file

  1. <?php /* Smarty version Smarty-3.0.7, created on 2011-12-29 16:03:51
  2. compiled from "C:\D\prestashoplf\prestashop/themes/ling/product.tpl" */ ?>
  3. <?php /*%%SmartyHeaderCode:21664efc8f67eccad3-45201732%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
  4. $_smarty_tpl->decodeProperties(array (
  5. 'file_dependency' =>
  6. array (
  7. 'f5f553d6f86b4ae34b596f402bf85945451f2a0d' =>
  8. array (
  9. 0 => 'C:\\D\\prestashoplf\\prestashop/themes/ling/product.tpl',
  10. 1 => 1309352196,
  11. 2 => 'file',
  12. ),
  13. ),
  14. 'nocache_hash' => '21664efc8f67eccad3-45201732',
  15. 'function' =>
  16. array (
  17. ),
  18. 'has_nocache_code' => false,
  19. )); /*/%%SmartyHeaderCode%%*/?>
  20. <?php if (!is_callable('smarty_modifier_escape')) include 'C:\D\prestashoplf\prestashop\tools\smarty\plugins\modifier.escape.php';
  21. if (!is_callable('smarty_modifier_date_format')) include 'C:\D\prestashoplf\prestashop\tools\smarty\plugins\modifier.date_format.php';
  22. if (!is_callable('smarty_function_math')) include 'C:\D\prestashoplf\prestashop\tools\smarty\plugins\function.math.php';
  23. if (!is_callable('smarty_function_counter')) include 'C:\D\prestashoplf\prestashop\tools\smarty\plugins\function.counter.php';
  24. ?><?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_dir')->value)."./errors.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
  25. echo $_template->getRenderedTemplate();?><?php unset($_template);?>
  26. <?php if (count($_smarty_tpl->getVariable('errors')->value)==0){?>
  27. <script type="text/javascript">
  28. // <![CDATA[
  29. // PrestaShop internal settings
  30. var currencySign = '<?php echo html_entity_decode($_smarty_tpl->getVariable('currencySign')->value,2,"UTF-8");?>
  31. ';
  32. var currencyRate = '<?php echo floatval($_smarty_tpl->getVariable('currencyRate')->value);?>
  33. ';
  34. var currencyFormat = '<?php echo intval($_smarty_tpl->getVariable('currencyFormat')->value);?>
  35. ';
  36. var currencyBlank = '<?php echo intval($_smarty_tpl->getVariable('currencyBlank')->value);?>
  37. ';
  38. var taxRate = <?php echo floatval($_smarty_tpl->getVariable('tax_rate')->value);?>
  39. ;
  40. var jqZoomEnabled = <?php if ($_smarty_tpl->getVariable('jqZoomEnabled')->value){?>true<?php }else{ ?>false<?php }?>;
  41. //JS Hook
  42. var oosHookJsCodeFunctions = new Array();
  43. // Parameters
  44. var id_product = '<?php echo intval($_smarty_tpl->getVariable('product')->value->id);?>
  45. ';
  46. var productHasAttributes = <?php if (isset($_smarty_tpl->getVariable('groups',null,true,false)->value)){?>true<?php }else{ ?>false<?php }?>;
  47. var quantitiesDisplayAllowed = <?php if ($_smarty_tpl->getVariable('display_qties')->value==1){?>true<?php }else{ ?>false<?php }?>;
  48. var quantityAvailable = <?php if ($_smarty_tpl->getVariable('display_qties')->value==1&&$_smarty_tpl->getVariable('product')->value->quantity){?><?php echo $_smarty_tpl->getVariable('product')->value->quantity;?>
  49. <?php }else{ ?>0<?php }?>;
  50. var allowBuyWhenOutOfStock = <?php if ($_smarty_tpl->getVariable('allow_oosp')->value==1){?>true<?php }else{ ?>false<?php }?>;
  51. var availableNowValue = '<?php echo smarty_modifier_escape($_smarty_tpl->getVariable('product')->value->available_now,'quotes','UTF-8');?>
  52. ';
  53. var availableLaterValue = '<?php echo smarty_modifier_escape($_smarty_tpl->getVariable('product')->value->available_later,'quotes','UTF-8');?>
  54. ';
  55. var productPriceTaxExcluded = <?php echo (($tmp = @$_smarty_tpl->getVariable('product')->value->getPriceWithoutReduct(true))===null||$tmp==='' ? 'null' : $tmp);?>
  56. - <?php echo $_smarty_tpl->getVariable('product')->value->ecotax;?>
  57. ;
  58. var reduction_percent = <?php if ($_smarty_tpl->getVariable('product')->value->specificPrice&&$_smarty_tpl->getVariable('product')->value->specificPrice['reduction']&&$_smarty_tpl->getVariable('product')->value->specificPrice['reduction_type']=='percentage'){?><?php echo $_smarty_tpl->getVariable('product')->value->specificPrice['reduction']*100;?>
  59. <?php }else{ ?>0<?php }?>;
  60. var reduction_price = <?php if ($_smarty_tpl->getVariable('product')->value->specificPrice&&$_smarty_tpl->getVariable('product')->value->specificPrice['reduction']&&$_smarty_tpl->getVariable('product')->value->specificPrice['reduction_type']=='amount'){?><?php echo $_smarty_tpl->getVariable('product')->value->specificPrice['reduction'];?>
  61. <?php }else{ ?>0<?php }?>;
  62. var specific_price = <?php if ($_smarty_tpl->getVariable('product')->value->specificPrice&&$_smarty_tpl->getVariable('product')->value->specificPrice['price']){?><?php echo $_smarty_tpl->getVariable('product')->value->specificPrice['price'];?>
  63. <?php }else{ ?>0<?php }?>;
  64. var specific_currency = <?php if ($_smarty_tpl->getVariable('product')->value->specificPrice&&$_smarty_tpl->getVariable('product')->value->specificPrice['id_currency']){?>true<?php }else{ ?>false<?php }?>;
  65. var group_reduction = '<?php echo $_smarty_tpl->getVariable('group_reduction')->value;?>
  66. ';
  67. var default_eco_tax = <?php echo $_smarty_tpl->getVariable('product')->value->ecotax;?>
  68. ;
  69. var ecotaxTax_rate = <?php echo $_smarty_tpl->getVariable('ecotaxTax_rate')->value;?>
  70. ;
  71. var currentDate = '<?php echo smarty_modifier_date_format(time(),'%Y-%m-%d %H:%M:%S');?>
  72. ';
  73. var maxQuantityToAllowDisplayOfLastQuantityMessage = <?php echo $_smarty_tpl->getVariable('last_qties')->value;?>
  74. ;
  75. var noTaxForThisProduct = <?php if ($_smarty_tpl->getVariable('no_tax')->value==1){?>true<?php }else{ ?>false<?php }?>;
  76. var displayPrice = <?php echo $_smarty_tpl->getVariable('priceDisplay')->value;?>
  77. ;
  78. var productReference = '<?php echo smarty_modifier_escape($_smarty_tpl->getVariable('product')->value->reference,'htmlall','UTF-8');?>
  79. ';
  80. var productAvailableForOrder = <?php if ((isset($_smarty_tpl->getVariable('restricted_country_mode',null,true,false)->value)&&$_smarty_tpl->getVariable('restricted_country_mode')->value)||$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?>'0'<?php }else{ ?>'<?php echo $_smarty_tpl->getVariable('product')->value->available_for_order;?>
  81. '<?php }?>;
  82. var productShowPrice = '<?php if (!$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?><?php echo $_smarty_tpl->getVariable('product')->value->show_price;?>
  83. <?php }else{ ?>0<?php }?>';
  84. var productUnitPriceRatio = '<?php echo $_smarty_tpl->getVariable('product')->value->unit_price_ratio;?>
  85. ';
  86. var idDefaultImage = <?php if (isset($_smarty_tpl->getVariable('cover',null,true,false)->value['id_image_only'])){?><?php echo $_smarty_tpl->getVariable('cover')->value['id_image_only'];?>
  87. <?php }else{ ?>0<?php }?>;
  88. // Customizable field
  89. var img_ps_dir = '<?php echo $_smarty_tpl->getVariable('img_ps_dir')->value;?>
  90. ';
  91. var customizationFields = new Array();
  92. <?php $_smarty_tpl->tpl_vars['imgIndex'] = new Smarty_variable(0, null, null);?>
  93. <?php $_smarty_tpl->tpl_vars['textFieldIndex'] = new Smarty_variable(0, null, null);?>
  94. <?php $_smarty_tpl->tpl_vars['field'] = new Smarty_Variable;
  95. $_from = $_smarty_tpl->getVariable('customizationFields')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  96. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['customizationFields']['index']=-1;
  97. if ($_smarty_tpl->_count($_from) > 0){
  98. foreach ($_from as $_smarty_tpl->tpl_vars['field']->key => $_smarty_tpl->tpl_vars['field']->value){
  99. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['customizationFields']['index']++;
  100. ?>
  101. <?php $_smarty_tpl->tpl_vars["key"] = new Smarty_variable("pictures_".($_smarty_tpl->getVariable('product')->value->id)."_".($_smarty_tpl->tpl_vars['field']->value['id_customization_field']), null, null);?>
  102. customizationFields[<?php echo intval($_smarty_tpl->getVariable('smarty')->value['foreach']['customizationFields']['index']);?>
  103. ] = new Array();
  104. customizationFields[<?php echo intval($_smarty_tpl->getVariable('smarty')->value['foreach']['customizationFields']['index']);?>
  105. ][0] = '<?php if (intval($_smarty_tpl->tpl_vars['field']->value['type'])==0){?>img<?php echo $_smarty_tpl->getVariable('imgIndex')->value++;?>
  106. <?php }else{ ?>textField<?php echo $_smarty_tpl->getVariable('textFieldIndex')->value++;?>
  107. <?php }?>';
  108. customizationFields[<?php echo intval($_smarty_tpl->getVariable('smarty')->value['foreach']['customizationFields']['index']);?>
  109. ][1] = <?php if (intval($_smarty_tpl->tpl_vars['field']->value['type'])==0&&isset($_smarty_tpl->getVariable('pictures',null,true,false)->value[$_smarty_tpl->getVariable('key',null,true,false)->value])&&$_smarty_tpl->getVariable('pictures')->value[$_smarty_tpl->getVariable('key')->value]){?>2<?php }else{ ?><?php echo intval($_smarty_tpl->tpl_vars['field']->value['required']);?>
  110. <?php }?>;
  111. <?php }} ?>
  112. // Images
  113. var img_prod_dir = '<?php echo $_smarty_tpl->getVariable('img_prod_dir')->value;?>
  114. ';
  115. var combinationImages = new Array();
  116. <?php if (isset($_smarty_tpl->getVariable('combinationImages',null,true,false)->value)){?>
  117. <?php $_smarty_tpl->tpl_vars['combination'] = new Smarty_Variable;
  118. $_smarty_tpl->tpl_vars['combinationId'] = new Smarty_Variable;
  119. $_from = $_smarty_tpl->getVariable('combinationImages')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  120. if ($_smarty_tpl->_count($_from) > 0){
  121. foreach ($_from as $_smarty_tpl->tpl_vars['combination']->key => $_smarty_tpl->tpl_vars['combination']->value){
  122. $_smarty_tpl->tpl_vars['combinationId']->value = $_smarty_tpl->tpl_vars['combination']->key;
  123. ?>
  124. combinationImages[<?php echo $_smarty_tpl->tpl_vars['combinationId']->value;?>
  125. ] = new Array();
  126. <?php $_smarty_tpl->tpl_vars['image'] = new Smarty_Variable;
  127. $_from = $_smarty_tpl->tpl_vars['combination']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  128. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['f_combinationImage']['index']=-1;
  129. if ($_smarty_tpl->_count($_from) > 0){
  130. foreach ($_from as $_smarty_tpl->tpl_vars['image']->key => $_smarty_tpl->tpl_vars['image']->value){
  131. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['f_combinationImage']['index']++;
  132. ?>
  133. combinationImages[<?php echo $_smarty_tpl->tpl_vars['combinationId']->value;?>
  134. ][<?php echo $_smarty_tpl->getVariable('smarty')->value['foreach']['f_combinationImage']['index'];?>
  135. ] = <?php echo intval($_smarty_tpl->tpl_vars['image']->value['id_image']);?>
  136. ;
  137. <?php }} ?>
  138. <?php }} ?>
  139. <?php }?>
  140. combinationImages[0] = new Array();
  141. <?php if (isset($_smarty_tpl->getVariable('images',null,true,false)->value)){?>
  142. <?php $_smarty_tpl->tpl_vars['image'] = new Smarty_Variable;
  143. $_from = $_smarty_tpl->getVariable('images')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  144. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['f_defaultImages']['index']=-1;
  145. if ($_smarty_tpl->_count($_from) > 0){
  146. foreach ($_from as $_smarty_tpl->tpl_vars['image']->key => $_smarty_tpl->tpl_vars['image']->value){
  147. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['f_defaultImages']['index']++;
  148. ?>
  149. combinationImages[0][<?php echo $_smarty_tpl->getVariable('smarty')->value['foreach']['f_defaultImages']['index'];?>
  150. ] = <?php echo $_smarty_tpl->tpl_vars['image']->value['id_image'];?>
  151. ;
  152. <?php }} ?>
  153. <?php }?>
  154. // Translations
  155. var doesntExist = '<?php echo smartyTranslate(array('s'=>'The product does not exist in this model. Please choose another.','js'=>1),$_smarty_tpl);?>
  156. ';
  157. var doesntExistNoMore = '<?php echo smartyTranslate(array('s'=>'This product is no longer in stock','js'=>1),$_smarty_tpl);?>
  158. ';
  159. var doesntExistNoMoreBut = '<?php echo smartyTranslate(array('s'=>'with those attributes but is available with others','js'=>1),$_smarty_tpl);?>
  160. ';
  161. var uploading_in_progress = '<?php echo smartyTranslate(array('s'=>'Uploading in progress, please wait...','js'=>1),$_smarty_tpl);?>
  162. ';
  163. var fieldRequired = '<?php echo smartyTranslate(array('s'=>'Please fill in all required fields, then save the customization.','js'=>1),$_smarty_tpl);?>
  164. ';
  165. <?php if (isset($_smarty_tpl->getVariable('groups',null,true,false)->value)){?>
  166. // Combinations
  167. <?php $_smarty_tpl->tpl_vars['combination'] = new Smarty_Variable;
  168. $_smarty_tpl->tpl_vars['idCombination'] = new Smarty_Variable;
  169. $_from = $_smarty_tpl->getVariable('combinations')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  170. if ($_smarty_tpl->_count($_from) > 0){
  171. foreach ($_from as $_smarty_tpl->tpl_vars['combination']->key => $_smarty_tpl->tpl_vars['combination']->value){
  172. $_smarty_tpl->tpl_vars['idCombination']->value = $_smarty_tpl->tpl_vars['combination']->key;
  173. ?>
  174. addCombination(<?php echo intval($_smarty_tpl->tpl_vars['idCombination']->value);?>
  175. , new Array(<?php echo $_smarty_tpl->tpl_vars['combination']->value['list'];?>
  176. ), <?php echo $_smarty_tpl->tpl_vars['combination']->value['quantity'];?>
  177. , <?php echo $_smarty_tpl->tpl_vars['combination']->value['price'];?>
  178. , <?php echo $_smarty_tpl->tpl_vars['combination']->value['ecotax'];?>
  179. , <?php echo $_smarty_tpl->tpl_vars['combination']->value['id_image'];?>
  180. , '<?php echo addslashes($_smarty_tpl->tpl_vars['combination']->value['reference']);?>
  181. ', <?php echo $_smarty_tpl->tpl_vars['combination']->value['unit_impact'];?>
  182. , <?php echo $_smarty_tpl->tpl_vars['combination']->value['minimal_quantity'];?>
  183. );
  184. <?php }} ?>
  185. // Colors
  186. <?php if (count($_smarty_tpl->getVariable('colors')->value)>0){?>
  187. <?php if ($_smarty_tpl->getVariable('product')->value->id_color_default){?>var id_color_default = <?php echo intval($_smarty_tpl->getVariable('product')->value->id_color_default);?>
  188. ;<?php }?>
  189. <?php }?>
  190. <?php }?>
  191. //]]>
  192. </script>
  193. <?php $_template = new Smarty_Internal_Template(($_smarty_tpl->getVariable('tpl_dir')->value)."./breadcrumb.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
  194. echo $_template->getRenderedTemplate();?><?php unset($_template);?>
  195. <div id="primary_block" class="clearfix">
  196. <h1><?php echo smarty_modifier_escape($_smarty_tpl->getVariable('product')->value->name,'htmlall','UTF-8');?>
  197. </h1>
  198. <?php if (isset($_smarty_tpl->getVariable('adminActionDisplay',null,true,false)->value)&&$_smarty_tpl->getVariable('adminActionDisplay')->value){?>
  199. <div id="admin-action">
  200. <p><?php echo smartyTranslate(array('s'=>'This product is not visible to your customers.'),$_smarty_tpl);?>
  201. <input type="hidden" id="admin-action-product-id" value="<?php echo $_smarty_tpl->getVariable('product')->value->id;?>
  202. " />
  203. <input type="submit" value="<?php echo smartyTranslate(array('s'=>'Publish'),$_smarty_tpl);?>
  204. " class="exclusive" onclick="submitPublishProduct('<?php echo $_smarty_tpl->getVariable('base_dir')->value;?>
  205. <?php echo $_GET['ad'];?>
  206. ', 0)"/>
  207. <input type="submit" value="<?php echo smartyTranslate(array('s'=>'Back'),$_smarty_tpl);?>
  208. " class="exclusive" onclick="submitPublishProduct('<?php echo $_smarty_tpl->getVariable('base_dir')->value;?>
  209. <?php echo $_GET['ad'];?>
  210. ', 1)"/>
  211. </p>
  212. <div class="clear" ></div>
  213. <p id="admin-action-result"></p>
  214. </p>
  215. </div>
  216. <?php }?>
  217. <?php if (isset($_smarty_tpl->getVariable('confirmation',null,true,false)->value)&&$_smarty_tpl->getVariable('confirmation')->value){?>
  218. <p class="confirmation">
  219. <?php echo $_smarty_tpl->getVariable('confirmation')->value;?>
  220. </p>
  221. <?php }?>
  222. <!-- right infos-->
  223. <div id="pb-right-column">
  224. <!-- product img-->
  225. <div id="image-block">
  226. <?php if ($_smarty_tpl->getVariable('have_image')->value){?>
  227. <img src="<?php echo $_smarty_tpl->getVariable('link')->value->getImageLink($_smarty_tpl->getVariable('product')->value->link_rewrite,$_smarty_tpl->getVariable('cover')->value['id_image'],'large');?>
  228. "
  229. <?php if ($_smarty_tpl->getVariable('jqZoomEnabled')->value){?>class="jqzoom" alt="<?php echo $_smarty_tpl->getVariable('link')->value->getImageLink($_smarty_tpl->getVariable('product')->value->link_rewrite,$_smarty_tpl->getVariable('cover')->value['id_image'],'thickbox');?>
  230. "<?php }else{ ?> title="<?php echo smarty_modifier_escape($_smarty_tpl->getVariable('product')->value->name,'htmlall','UTF-8');?>
  231. " alt="<?php echo smarty_modifier_escape($_smarty_tpl->getVariable('product')->value->name,'htmlall','UTF-8');?>
  232. " <?php }?> id="bigpic" width="<?php echo $_smarty_tpl->getVariable('largeSize')->value['width'];?>
  233. " height="<?php echo $_smarty_tpl->getVariable('largeSize')->value['height'];?>
  234. " />
  235. <?php }else{ ?>
  236. <img src="<?php echo $_smarty_tpl->getVariable('img_prod_dir')->value;?>
  237. <?php echo $_smarty_tpl->getVariable('lang_iso')->value;?>
  238. -default-large.jpg" id="bigpic" alt="" title="<?php echo smarty_modifier_escape($_smarty_tpl->getVariable('product')->value->name,'htmlall','UTF-8');?>
  239. " width="<?php echo $_smarty_tpl->getVariable('largeSize')->value['width'];?>
  240. " height="<?php echo $_smarty_tpl->getVariable('largeSize')->value['height'];?>
  241. " />
  242. <?php }?>
  243. </div>
  244. <?php if (isset($_smarty_tpl->getVariable('images',null,true,false)->value)&&count($_smarty_tpl->getVariable('images')->value)>0){?>
  245. <!-- thumbnails -->
  246. <div id="views_block" <?php if (isset($_smarty_tpl->getVariable('images',null,true,false)->value)&&count($_smarty_tpl->getVariable('images')->value)<2){?>class="hidden"<?php }?>>
  247. <div id="thumbs_list">
  248. <ul id="thumbs_list">
  249. <?php if (isset($_smarty_tpl->getVariable('images',null,true,false)->value)){?>
  250. <?php $_smarty_tpl->tpl_vars['image'] = new Smarty_Variable;
  251. $_from = $_smarty_tpl->getVariable('images')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  252. $_smarty_tpl->tpl_vars['image']->index=-1;
  253. if ($_smarty_tpl->_count($_from) > 0){
  254. foreach ($_from as $_smarty_tpl->tpl_vars['image']->key => $_smarty_tpl->tpl_vars['image']->value){
  255. $_smarty_tpl->tpl_vars['image']->index++;
  256. $_smarty_tpl->tpl_vars['image']->first = $_smarty_tpl->tpl_vars['image']->index === 0;
  257. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['thumbnails']['first'] = $_smarty_tpl->tpl_vars['image']->first;
  258. ?>
  259. <?php $_smarty_tpl->tpl_vars['imageIds'] = new Smarty_variable(($_smarty_tpl->getVariable('product')->value->id)."-".($_smarty_tpl->tpl_vars['image']->value['id_image']), null, null);?>
  260. <li id="thumbnail_<?php echo $_smarty_tpl->tpl_vars['image']->value['id_image'];?>
  261. ">
  262. <a href="<?php echo $_smarty_tpl->getVariable('link')->value->getImageLink($_smarty_tpl->getVariable('product')->value->link_rewrite,$_smarty_tpl->getVariable('imageIds')->value,'thickbox');?>
  263. " rel="other-views" class="thickbox <?php if ($_smarty_tpl->getVariable('smarty')->value['foreach']['thumbnails']['first']){?>shown<?php }?>" title="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['legend']);?>
  264. ">
  265. <img id="thumb_<?php echo $_smarty_tpl->tpl_vars['image']->value['id_image'];?>
  266. " src="<?php echo $_smarty_tpl->getVariable('link')->value->getImageLink($_smarty_tpl->getVariable('product')->value->link_rewrite,$_smarty_tpl->getVariable('imageIds')->value,'medium');?>
  267. " alt="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['image']->value['legend']);?>
  268. " height="<?php echo $_smarty_tpl->getVariable('mediumSize')->value['height'];?>
  269. " width="<?php echo $_smarty_tpl->getVariable('mediumSize')->value['width'];?>
  270. " />
  271. </a>
  272. </li>
  273. <?php }} ?>
  274. <?php }?>
  275. </ul>
  276. </div>
  277. </div>
  278. <?php }?>
  279. <?php if (isset($_smarty_tpl->getVariable('images',null,true,false)->value)&&count($_smarty_tpl->getVariable('images')->value)>1){?><span id="wrapResetImages" style="display:none;"><div><a id="resetImages" href="<?php echo $_smarty_tpl->getVariable('link')->value->getProductLink($_smarty_tpl->getVariable('product')->value);?>
  280. " onclick="$('span#wrapResetImages').hide('slow');return (false);"><?php echo smartyTranslate(array('s'=>'Display all pictures'),$_smarty_tpl);?>
  281. </a></div></span><?php }?>
  282. <!-- usefull links-->
  283. <ul id="usefull_link_block">
  284. <?php if ($_smarty_tpl->getVariable('HOOK_EXTRA_LEFT')->value){?><?php echo $_smarty_tpl->getVariable('HOOK_EXTRA_LEFT')->value;?>
  285. <?php }?>
  286. <li><a href="javascript:print();"><?php echo smartyTranslate(array('s'=>'Print'),$_smarty_tpl);?>
  287. </a></li>
  288. <?php if ($_smarty_tpl->getVariable('have_image')->value&&!$_smarty_tpl->getVariable('jqZoomEnabled')->value){?>
  289. <li><span id="view_full_size" class="span_link"><?php echo smartyTranslate(array('s'=>'View full size'),$_smarty_tpl);?>
  290. </span></li>
  291. <?php }?>
  292. </ul>
  293. </div>
  294. <!-- left infos-->
  295. <div id="pb-left-column">
  296. <?php if ($_smarty_tpl->getVariable('product')->value->description_short||count($_smarty_tpl->getVariable('packItems')->value)>0){?>
  297. <div id="short_description_block">
  298. <?php if ($_smarty_tpl->getVariable('product')->value->description_short){?>
  299. <div id="short_description_content" class="rte align_justify"><?php echo preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->getVariable('product')->value->description_short);?>
  300. </div>
  301. <?php }?>
  302. <?php if ($_smarty_tpl->getVariable('product')->value->description){?>
  303. <p class="buttons_bottom_block"><a href="javascript:{}" class="button"><?php echo smartyTranslate(array('s'=>'More details'),$_smarty_tpl);?>
  304. </a></p>
  305. <?php }?>
  306. <?php if (count($_smarty_tpl->getVariable('packItems')->value)>0){?>
  307. <h3><?php echo smartyTranslate(array('s'=>'Pack content'),$_smarty_tpl);?>
  308. </h3>
  309. <?php $_smarty_tpl->tpl_vars['packItem'] = new Smarty_Variable;
  310. $_from = $_smarty_tpl->getVariable('packItems')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  311. if ($_smarty_tpl->_count($_from) > 0){
  312. foreach ($_from as $_smarty_tpl->tpl_vars['packItem']->key => $_smarty_tpl->tpl_vars['packItem']->value){
  313. ?>
  314. <div class="pack_content">
  315. <?php echo $_smarty_tpl->tpl_vars['packItem']->value['pack_quantity'];?>
  316. x <a href="<?php echo $_smarty_tpl->getVariable('link')->value->getProductLink($_smarty_tpl->tpl_vars['packItem']->value['id_product'],$_smarty_tpl->tpl_vars['packItem']->value['link_rewrite'],$_smarty_tpl->tpl_vars['packItem']->value['category']);?>
  317. "><?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['packItem']->value['name'],'htmlall','UTF-8');?>
  318. </a>
  319. <p><?php echo smarty_modifier_truncate($_smarty_tpl->tpl_vars['packItem']->value['description_short'],100,'...');?>
  320. </p>
  321. </div>
  322. <?php }} ?>
  323. <?php }?>
  324. </div>
  325. <?php }?>
  326. <?php if (isset($_smarty_tpl->getVariable('colors',null,true,false)->value)&&$_smarty_tpl->getVariable('colors')->value){?>
  327. <!-- colors -->
  328. <div id="color_picker">
  329. <p><?php echo smartyTranslate(array('s'=>'Pick a color:','js'=>1),$_smarty_tpl);?>
  330. </p>
  331. <div class="clearblock"></div>
  332. <ul id="color_to_pick_list">
  333. <?php $_smarty_tpl->tpl_vars['color'] = new Smarty_Variable;
  334. $_smarty_tpl->tpl_vars['id_attribute'] = new Smarty_Variable;
  335. $_from = $_smarty_tpl->getVariable('colors')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  336. if ($_smarty_tpl->_count($_from) > 0){
  337. foreach ($_from as $_smarty_tpl->tpl_vars['color']->key => $_smarty_tpl->tpl_vars['color']->value){
  338. $_smarty_tpl->tpl_vars['id_attribute']->value = $_smarty_tpl->tpl_vars['color']->key;
  339. ?>
  340. <li><a id="color_<?php echo intval($_smarty_tpl->tpl_vars['id_attribute']->value);?>
  341. " class="color_pick" style="background: <?php echo $_smarty_tpl->tpl_vars['color']->value['value'];?>
  342. ;" onclick="updateColorSelect(<?php echo intval($_smarty_tpl->tpl_vars['id_attribute']->value);?>
  343. );$('#wrapResetImages').show('slow');" title="<?php echo $_smarty_tpl->tpl_vars['color']->value['name'];?>
  344. "><?php if (file_exists((($_smarty_tpl->getVariable('col_img_dir')->value).($_smarty_tpl->tpl_vars['id_attribute']->value)).('.jpg'))){?><img src="<?php echo $_smarty_tpl->getVariable('img_col_dir')->value;?>
  345. <?php echo $_smarty_tpl->tpl_vars['id_attribute']->value;?>
  346. .jpg" alt="<?php echo $_smarty_tpl->tpl_vars['color']->value['name'];?>
  347. " width="20" height="20" /><?php }?></a></li>
  348. <?php }} ?>
  349. </ul>
  350. <div class="clearblock"></div>
  351. </div>
  352. <?php }?>
  353. <?php if (($_smarty_tpl->getVariable('product')->value->show_price&&!isset($_smarty_tpl->getVariable('restricted_country_mode',null,true,false)->value))||isset($_smarty_tpl->getVariable('groups',null,true,false)->value)||$_smarty_tpl->getVariable('product')->value->reference||(isset($_smarty_tpl->getVariable('HOOK_PRODUCT_ACTIONS',null,true,false)->value)&&$_smarty_tpl->getVariable('HOOK_PRODUCT_ACTIONS')->value)){?>
  354. <!-- add to cart form-->
  355. <form id="buy_block" <?php if ($_smarty_tpl->getVariable('PS_CATALOG_MODE')->value&&!isset($_smarty_tpl->getVariable('groups',null,true,false)->value)&&$_smarty_tpl->getVariable('product')->value->quantity>0){?>class="hidden"<?php }?> action="<?php echo $_smarty_tpl->getVariable('link')->value->getPageLink('cart.php');?>
  356. " method="post">
  357. <!-- hidden datas -->
  358. <p class="hidden">
  359. <input type="hidden" name="token" value="<?php echo $_smarty_tpl->getVariable('static_token')->value;?>
  360. " />
  361. <input type="hidden" name="id_product" value="<?php echo intval($_smarty_tpl->getVariable('product')->value->id);?>
  362. " id="product_page_product_id" />
  363. <input type="hidden" name="add" value="1" />
  364. <input type="hidden" name="id_product_attribute" id="idCombination" value="" />
  365. </p>
  366. <!-- prices -->
  367. <?php if ($_smarty_tpl->getVariable('product')->value->show_price&&!isset($_smarty_tpl->getVariable('restricted_country_mode',null,true,false)->value)&&!$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?>
  368. <p class="price">
  369. <?php if (!$_smarty_tpl->getVariable('priceDisplay')->value||$_smarty_tpl->getVariable('priceDisplay')->value==2){?>
  370. <?php $_smarty_tpl->tpl_vars['productPrice'] = new Smarty_variable($_smarty_tpl->getVariable('product')->value->getPrice(true,@NULL,2), null, null);?>
  371. <?php $_smarty_tpl->tpl_vars['productPriceWithoutRedution'] = new Smarty_variable($_smarty_tpl->getVariable('product')->value->getPriceWithoutReduct(false,@NULL), null, null);?>
  372. <?php }elseif($_smarty_tpl->getVariable('priceDisplay')->value==1){?>
  373. <?php $_smarty_tpl->tpl_vars['productPrice'] = new Smarty_variable($_smarty_tpl->getVariable('product')->value->getPrice(false,@NULL,2), null, null);?>
  374. <?php $_smarty_tpl->tpl_vars['productPriceWithoutRedution'] = new Smarty_variable($_smarty_tpl->getVariable('product')->value->getPriceWithoutReduct(true,@NULL), null, null);?>
  375. <?php }?>
  376. <?php if ($_smarty_tpl->getVariable('product')->value->on_sale){?>
  377. <span class="on_sale"><?php echo smartyTranslate(array('s'=>'On sale!'),$_smarty_tpl);?>
  378. </span>
  379. <?php }elseif($_smarty_tpl->getVariable('product')->value->specificPrice&&$_smarty_tpl->getVariable('product')->value->specificPrice['reduction']&&$_smarty_tpl->getVariable('productPriceWithoutRedution')->value>$_smarty_tpl->getVariable('productPrice')->value){?>
  380. <span class="discount"><?php echo smartyTranslate(array('s'=>'Reduced price!'),$_smarty_tpl);?>
  381. </span>
  382. <?php }?>
  383. <span class="our_price_display">
  384. <?php if ($_smarty_tpl->getVariable('priceDisplay')->value>=0&&$_smarty_tpl->getVariable('priceDisplay')->value<=2){?>
  385. <span id="our_price_display"><?php echo Product::convertPrice(array('price'=>$_smarty_tpl->getVariable('productPrice')->value),$_smarty_tpl);?>
  386. </span>
  387. <?php if ($_smarty_tpl->getVariable('tax_enabled')->value&&((isset($_smarty_tpl->getVariable('display_tax_label',null,true,false)->value)&&$_smarty_tpl->getVariable('display_tax_label')->value==1)||!isset($_smarty_tpl->getVariable('display_tax_label',null,true,false)->value))){?>
  388. <?php if ($_smarty_tpl->getVariable('priceDisplay')->value==1){?><?php echo smartyTranslate(array('s'=>'tax excl.'),$_smarty_tpl);?>
  389. <?php }else{ ?><?php echo smartyTranslate(array('s'=>'tax incl.'),$_smarty_tpl);?>
  390. <?php }?>
  391. <?php }?>
  392. <?php }?>
  393. </span>
  394. <?php if ($_smarty_tpl->getVariable('priceDisplay')->value==2){?>
  395. <span id="pretaxe_price"><span id="pretaxe_price_display"><?php echo Product::convertPrice(array('price'=>$_smarty_tpl->getVariable('product')->value->getPrice(false,@NULL)),$_smarty_tpl);?>
  396. </span>&nbsp;<?php echo smartyTranslate(array('s'=>'tax excl.'),$_smarty_tpl);?>
  397. </span>
  398. <?php }?>
  399. </p>
  400. <div id="other_prices">
  401. <?php if ($_smarty_tpl->getVariable('product')->value->specificPrice&&$_smarty_tpl->getVariable('product')->value->specificPrice['reduction']){?>
  402. <p id="old_price">
  403. <?php if ($_smarty_tpl->getVariable('priceDisplay')->value>=0&&$_smarty_tpl->getVariable('priceDisplay')->value<=2){?>
  404. <?php if ($_smarty_tpl->getVariable('productPriceWithoutRedution')->value>$_smarty_tpl->getVariable('productPrice')->value){?>
  405. <span id="old_price_display"><?php echo Product::convertPrice(array('price'=>$_smarty_tpl->getVariable('productPriceWithoutRedution')->value),$_smarty_tpl);?>
  406. </span>
  407. <?php if ($_smarty_tpl->getVariable('tax_enabled')->value){?>
  408. <?php if ($_smarty_tpl->getVariable('priceDisplay')->value==1){?><?php echo smartyTranslate(array('s'=>'tax excl.'),$_smarty_tpl);?>
  409. <?php }else{ ?><?php echo smartyTranslate(array('s'=>'tax incl.'),$_smarty_tpl);?>
  410. <?php }?>
  411. <?php }?>
  412. <?php }?>
  413. <?php }?>
  414. </p>
  415. <?php }?>
  416. <?php if ($_smarty_tpl->getVariable('product')->value->specificPrice&&$_smarty_tpl->getVariable('product')->value->specificPrice['reduction_type']=='percentage'){?>
  417. <p id="reduction_percent"><?php echo smartyTranslate(array('s'=>'(price reduced by'),$_smarty_tpl);?>
  418. <span id="reduction_percent_display"><?php echo $_smarty_tpl->getVariable('product')->value->specificPrice['reduction']*100;?>
  419. </span> %<?php echo smartyTranslate(array('s'=>')'),$_smarty_tpl);?>
  420. </p>
  421. <?php }?>
  422. <?php if (count($_smarty_tpl->getVariable('packItems')->value)){?>
  423. <p class="pack_price"><?php echo smartyTranslate(array('s'=>'instead of'),$_smarty_tpl);?>
  424. <span style="text-decoration: line-through;"><?php echo Product::convertPrice(array('price'=>$_smarty_tpl->getVariable('product')->value->getNoPackPrice()),$_smarty_tpl);?>
  425. </span></p>
  426. <?php }?>
  427. <?php if ($_smarty_tpl->getVariable('product')->value->ecotax!=0){?>
  428. <p class="price-ecotax"><?php echo smartyTranslate(array('s'=>'include'),$_smarty_tpl);?>
  429. <span id="ecotax_price_display"><?php if ($_smarty_tpl->getVariable('priceDisplay')->value==2){?><?php echo Product::convertAndFormatPrice($_smarty_tpl->getVariable('ecotax_tax_exc')->value);?>
  430. <?php }else{ ?><?php echo Product::convertAndFormatPrice($_smarty_tpl->getVariable('ecotax_tax_inc')->value);?>
  431. <?php }?></span> <?php echo smartyTranslate(array('s'=>'for green tax'),$_smarty_tpl);?>
  432. <?php if ($_smarty_tpl->getVariable('product')->value->specificPrice&&$_smarty_tpl->getVariable('product')->value->specificPrice['reduction']){?><br /><?php echo smartyTranslate(array('s'=>'(not impacted by the discount)'),$_smarty_tpl);?>
  433. <?php }?>
  434. </p>
  435. <?php }?>
  436. <?php if (!empty($_smarty_tpl->getVariable('product',null,true,false)->value->unity)&&$_smarty_tpl->getVariable('product')->value->unit_price_ratio>0.000000){?>
  437. <?php echo smarty_function_math(array('equation'=>"pprice / punit_price",'pprice'=>$_smarty_tpl->getVariable('productPrice')->value,'punit_price'=>$_smarty_tpl->getVariable('product')->value->unit_price_ratio,'assign'=>'unit_price'),$_smarty_tpl);?>
  438. <p class="unit-price"><span id="unit_price_display"><?php echo Product::convertPrice(array('price'=>$_smarty_tpl->getVariable('unit_price')->value),$_smarty_tpl);?>
  439. </span> <?php echo smartyTranslate(array('s'=>'per'),$_smarty_tpl);?>
  440. <?php echo smarty_modifier_escape($_smarty_tpl->getVariable('product')->value->unity,'htmlall','UTF-8');?>
  441. </p>
  442. <?php }?>
  443. </div>
  444. <?php }?>
  445. <?php if (isset($_smarty_tpl->getVariable('groups',null,true,false)->value)){?>
  446. <!-- attributes -->
  447. <div id="attributes">
  448. <?php $_smarty_tpl->tpl_vars['group'] = new Smarty_Variable;
  449. $_smarty_tpl->tpl_vars['id_attribute_group'] = new Smarty_Variable;
  450. $_from = $_smarty_tpl->getVariable('groups')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  451. if ($_smarty_tpl->_count($_from) > 0){
  452. foreach ($_from as $_smarty_tpl->tpl_vars['group']->key => $_smarty_tpl->tpl_vars['group']->value){
  453. $_smarty_tpl->tpl_vars['id_attribute_group']->value = $_smarty_tpl->tpl_vars['group']->key;
  454. ?>
  455. <?php if (count($_smarty_tpl->tpl_vars['group']->value['attributes'])){?>
  456. <p>
  457. <label for="group_<?php echo intval($_smarty_tpl->tpl_vars['id_attribute_group']->value);?>
  458. "><?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['group']->value['name'],'htmlall','UTF-8');?>
  459. :</label>
  460. <?php $_smarty_tpl->tpl_vars["groupName"] = new Smarty_variable("group_".($_smarty_tpl->tpl_vars['id_attribute_group']->value), null, null);?>
  461. <select name="<?php echo $_smarty_tpl->getVariable('groupName')->value;?>
  462. " id="group_<?php echo intval($_smarty_tpl->tpl_vars['id_attribute_group']->value);?>
  463. " onchange="javascript:findCombination();<?php if (count($_smarty_tpl->getVariable('colors')->value)>0){?>$('#wrapResetImages').show('slow');<?php }?>;">
  464. <?php $_smarty_tpl->tpl_vars['group_attribute'] = new Smarty_Variable;
  465. $_smarty_tpl->tpl_vars['id_attribute'] = new Smarty_Variable;
  466. $_from = $_smarty_tpl->tpl_vars['group']->value['attributes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  467. if ($_smarty_tpl->_count($_from) > 0){
  468. foreach ($_from as $_smarty_tpl->tpl_vars['group_attribute']->key => $_smarty_tpl->tpl_vars['group_attribute']->value){
  469. $_smarty_tpl->tpl_vars['id_attribute']->value = $_smarty_tpl->tpl_vars['group_attribute']->key;
  470. ?>
  471. <option value="<?php echo intval($_smarty_tpl->tpl_vars['id_attribute']->value);?>
  472. "<?php if ((isset($_GET[$_smarty_tpl->getVariable('groupName',null,true,false)->value])&&intval($_GET[$_smarty_tpl->getVariable('groupName')->value])==$_smarty_tpl->tpl_vars['id_attribute']->value)||$_smarty_tpl->tpl_vars['group']->value['default']==$_smarty_tpl->tpl_vars['id_attribute']->value){?> selected="selected"<?php }?> title="<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['group_attribute']->value,'htmlall','UTF-8');?>
  473. "><?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['group_attribute']->value,'htmlall','UTF-8');?>
  474. </option>
  475. <?php }} ?>
  476. </select>
  477. </p>
  478. <?php }?>
  479. <?php }} ?>
  480. </div>
  481. <?php }?>
  482. <p id="product_reference" <?php if (isset($_smarty_tpl->getVariable('groups',null,true,false)->value)||!$_smarty_tpl->getVariable('product')->value->reference){?>style="display:none;"<?php }?>><label for="product_reference"><?php echo smartyTranslate(array('s'=>'Reference :'),$_smarty_tpl);?>
  483. </label><span class="editable"><?php echo smarty_modifier_escape($_smarty_tpl->getVariable('product')->value->reference,'htmlall','UTF-8');?>
  484. </span></p>
  485. <!-- quantity wanted -->
  486. <p id="quantity_wanted_p"<?php if ((!$_smarty_tpl->getVariable('allow_oosp')->value&&$_smarty_tpl->getVariable('product')->value->quantity==0)||$_smarty_tpl->getVariable('virtual')->value||!$_smarty_tpl->getVariable('product')->value->available_for_order||$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?> style="display: none;"<?php }?>>
  487. <label><?php echo smartyTranslate(array('s'=>'Quantity :'),$_smarty_tpl);?>
  488. </label>
  489. <input type="text" name="qty" id="quantity_wanted" class="text" value="<?php if (isset($_smarty_tpl->getVariable('quantityBackup',null,true,false)->value)){?><?php echo intval($_smarty_tpl->getVariable('quantityBackup')->value);?>
  490. <?php }else{ ?><?php if ($_smarty_tpl->getVariable('product')->value->minimal_quantity>1){?><?php echo $_smarty_tpl->getVariable('product')->value->minimal_quantity;?>
  491. <?php }else{ ?>1<?php }?><?php }?>" size="2" maxlength="3" <?php if ($_smarty_tpl->getVariable('product')->value->minimal_quantity>1){?>onkeyup="checkMinimalQuantity(<?php echo $_smarty_tpl->getVariable('product')->value->minimal_quantity;?>
  492. );"<?php }?> />
  493. </p>
  494. <!-- minimal quantity wanted -->
  495. <p id="minimal_quantity_wanted_p"<?php if ($_smarty_tpl->getVariable('product')->value->minimal_quantity<=1||!$_smarty_tpl->getVariable('product')->value->available_for_order||$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?> style="display: none;"<?php }?>><?php echo smartyTranslate(array('s'=>'You must add '),$_smarty_tpl);?>
  496. <b id="minimal_quantity_label"><?php echo $_smarty_tpl->getVariable('product')->value->minimal_quantity;?>
  497. </b><?php echo smartyTranslate(array('s'=>' as a minimum quantity to buy this product.'),$_smarty_tpl);?>
  498. </p>
  499. <?php if ($_smarty_tpl->getVariable('product')->value->minimal_quantity>1){?>
  500. <script type="text/javascript">
  501. checkMinimalQuantity();
  502. </script>
  503. <?php }?>
  504. <!-- availability -->
  505. <p id="availability_statut"<?php if (($_smarty_tpl->getVariable('product')->value->quantity<=0&&!$_smarty_tpl->getVariable('product')->value->available_later&&$_smarty_tpl->getVariable('allow_oosp')->value)||($_smarty_tpl->getVariable('product')->value->quantity>0&&!$_smarty_tpl->getVariable('product')->value->available_now)||!$_smarty_tpl->getVariable('product')->value->available_for_order||$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?> style="display:none;"<?php }?>>
  506. <span id="availability_label"><?php echo smartyTranslate(array('s'=>'Availability:'),$_smarty_tpl);?>
  507. </span>
  508. <span id="availability_value"<?php if ($_smarty_tpl->getVariable('product')->value->quantity<=0){?> class="warning_inline"<?php }?>>
  509. <?php if ($_smarty_tpl->getVariable('product')->value->quantity<=0){?><?php if ($_smarty_tpl->getVariable('allow_oosp')->value){?><?php echo $_smarty_tpl->getVariable('product')->value->available_later;?>
  510. <?php }else{ ?><?php echo smartyTranslate(array('s'=>'This product is no longer in stock'),$_smarty_tpl);?>
  511. <?php }?><?php }else{ ?><?php echo $_smarty_tpl->getVariable('product')->value->available_now;?>
  512. <?php }?>
  513. </span>
  514. </p>
  515. <!-- number of item in stock -->
  516. <?php if (($_smarty_tpl->getVariable('display_qties')->value==1&&!$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value&&$_smarty_tpl->getVariable('product')->value->available_for_order)){?>
  517. <p id="pQuantityAvailable"<?php if ($_smarty_tpl->getVariable('product')->value->quantity<=0){?> style="display:none;"<?php }?>>
  518. <span id="quantityAvailable"><?php echo intval($_smarty_tpl->getVariable('product')->value->quantity);?>
  519. </span>
  520. <span <?php if ($_smarty_tpl->getVariable('product')->value->quantity>1){?> style="display:none;"<?php }?> id="quantityAvailableTxt"><?php echo smartyTranslate(array('s'=>'item in stock'),$_smarty_tpl);?>
  521. </span>
  522. <span <?php if ($_smarty_tpl->getVariable('product')->value->quantity==1){?> style="display:none;"<?php }?> id="quantityAvailableTxtMultiple"><?php echo smartyTranslate(array('s'=>'items in stock'),$_smarty_tpl);?>
  523. </span>
  524. </p>
  525. <?php }?>
  526. <!-- Out of stock hook -->
  527. <p id="oosHook"<?php if ($_smarty_tpl->getVariable('product')->value->quantity>0){?> style="display: none;"<?php }?>>
  528. <?php echo $_smarty_tpl->getVariable('HOOK_PRODUCT_OOS')->value;?>
  529. </p>
  530. <p id="last_quantities"<?php if (($_smarty_tpl->getVariable('product')->value->quantity>$_smarty_tpl->getVariable('last_qties')->value||$_smarty_tpl->getVariable('product')->value->quantity<=0)||$_smarty_tpl->getVariable('allow_oosp')->value||!$_smarty_tpl->getVariable('product')->value->available_for_order||$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?> style="display:none;"<?php }?> ><?php echo smartyTranslate(array('s'=>'Warning: Last items in stock!'),$_smarty_tpl);?>
  531. </p>
  532. <?php if ($_smarty_tpl->getVariable('product')->value->online_only){?><p class="online_only"><?php echo smartyTranslate(array('s'=>'Online only'),$_smarty_tpl);?>
  533. !</p><?php }?>
  534. <p<?php if ((!$_smarty_tpl->getVariable('allow_oosp')->value&&$_smarty_tpl->getVariable('product')->value->quantity<=0)||!$_smarty_tpl->getVariable('product')->value->available_for_order||(isset($_smarty_tpl->getVariable('restricted_country_mode',null,true,false)->value)&&$_smarty_tpl->getVariable('restricted_country_mode')->value)||$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?> style="display: none;"<?php }?> id="add_to_cart" class="buttons_bottom_block">
  535. <a class="exclusive" href="javascript:document.getElementById('add2cartbtn').click();"><?php echo smartyTranslate(array('s'=>'Add to cart'),$_smarty_tpl);?>
  536. </a>
  537. <input id="add2cartbtn" type="submit" name="Submit" value="<?php echo smartyTranslate(array('s'=>'Add to cart'),$_smarty_tpl);?>
  538. " />
  539. </p>
  540. <?php if (isset($_smarty_tpl->getVariable('HOOK_PRODUCT_ACTIONS',null,true,false)->value)&&$_smarty_tpl->getVariable('HOOK_PRODUCT_ACTIONS')->value){?><?php echo $_smarty_tpl->getVariable('HOOK_PRODUCT_ACTIONS')->value;?>
  541. <?php }?>
  542. <div class="clearblock"></div>
  543. </form>
  544. <?php }?>
  545. <?php if ($_smarty_tpl->getVariable('HOOK_EXTRA_RIGHT')->value){?><?php echo $_smarty_tpl->getVariable('HOOK_EXTRA_RIGHT')->value;?>
  546. <?php }?>
  547. </div>
  548. </div>
  549. <?php if ($_smarty_tpl->getVariable('quantity_discounts')->value){?>
  550. <!-- quantity discount -->
  551. <ul class="idTabs">
  552. <li><a class="selected"><?php echo smartyTranslate(array('s'=>'Quantity discount'),$_smarty_tpl);?>
  553. </a></li>
  554. </ul>
  555. <div id="quantityDiscount">
  556. <table class="std">
  557. <tr>
  558. <?php $_smarty_tpl->tpl_vars['quantity_discount'] = new Smarty_Variable;
  559. $_from = $_smarty_tpl->getVariable('quantity_discounts')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  560. if ($_smarty_tpl->_count($_from) > 0){
  561. foreach ($_from as $_smarty_tpl->tpl_vars['quantity_discount']->key => $_smarty_tpl->tpl_vars['quantity_discount']->value){
  562. ?>
  563. <th><?php echo intval($_smarty_tpl->tpl_vars['quantity_discount']->value['quantity']);?>
  564. <?php if (intval($_smarty_tpl->tpl_vars['quantity_discount']->value['quantity'])>1){?>
  565. <?php echo smartyTranslate(array('s'=>'quantities'),$_smarty_tpl);?>
  566. <?php }else{ ?>
  567. <?php echo smartyTranslate(array('s'=>'quantity'),$_smarty_tpl);?>
  568. <?php }?>
  569. </th>
  570. <?php }} ?>
  571. </tr>
  572. <tr>
  573. <?php $_smarty_tpl->tpl_vars['quantity_discount'] = new Smarty_Variable;
  574. $_from = $_smarty_tpl->getVariable('quantity_discounts')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  575. if ($_smarty_tpl->_count($_from) > 0){
  576. foreach ($_from as $_smarty_tpl->tpl_vars['quantity_discount']->key => $_smarty_tpl->tpl_vars['quantity_discount']->value){
  577. ?>
  578. <td>
  579. <?php if ($_smarty_tpl->tpl_vars['quantity_discount']->value['price']!=0||$_smarty_tpl->tpl_vars['quantity_discount']->value['reduction_type']=='amount'){?>
  580. -<?php echo Product::convertPrice(array('price'=>floatval($_smarty_tpl->tpl_vars['quantity_discount']->value['real_value'])),$_smarty_tpl);?>
  581. <?php }else{ ?>
  582. -<?php echo floatval($_smarty_tpl->tpl_vars['quantity_discount']->value['real_value']);?>
  583. %
  584. <?php }?>
  585. </td>
  586. <?php }} ?>
  587. </tr>
  588. </table>
  589. </div>
  590. <?php }?>
  591. <?php echo $_smarty_tpl->getVariable('HOOK_PRODUCT_FOOTER')->value;?>
  592. <!-- description and features -->
  593. <?php if ($_smarty_tpl->getVariable('product')->value->description||$_smarty_tpl->getVariable('features')->value||$_smarty_tpl->getVariable('accessories')->value||$_smarty_tpl->getVariable('HOOK_PRODUCT_TAB')->value||$_smarty_tpl->getVariable('attachments')->value){?>
  594. <div id="more_info_block" class="clear">
  595. <ul id="more_info_tabs" class="idTabs idTabsShort">
  596. <?php if ($_smarty_tpl->getVariable('product')->value->description){?><li><a id="more_info_tab_more_info" href="#idTab1"><?php echo smartyTranslate(array('s'=>'More info'),$_smarty_tpl);?>
  597. </a></li><?php }?>
  598. <?php if ($_smarty_tpl->getVariable('features')->value){?><li><a id="more_info_tab_data_sheet" href="#idTab2"><?php echo smartyTranslate(array('s'=>'Data sheet'),$_smarty_tpl);?>
  599. </a></li><?php }?>
  600. <?php if ($_smarty_tpl->getVariable('attachments')->value){?><li><a id="more_info_tab_attachments" href="#idTab9"><?php echo smartyTranslate(array('s'=>'Download'),$_smarty_tpl);?>
  601. </a></li><?php }?>
  602. <?php if (isset($_smarty_tpl->getVariable('accessories',null,true,false)->value)&&$_smarty_tpl->getVariable('accessories')->value){?><li><a href="#idTab4"><?php echo smartyTranslate(array('s'=>'Accessories'),$_smarty_tpl);?>
  603. </a></li><?php }?>
  604. <?php echo $_smarty_tpl->getVariable('HOOK_PRODUCT_TAB')->value;?>
  605. </ul>
  606. <div id="more_info_sheets" class="sheets align_justify">
  607. <?php if ($_smarty_tpl->getVariable('product')->value->description){?>
  608. <!-- full description -->
  609. <div id="idTab1"><?php echo $_smarty_tpl->getVariable('product')->value->description;?>
  610. </div>
  611. <?php }?>
  612. <?php if ($_smarty_tpl->getVariable('features')->value){?>
  613. <!-- product's features -->
  614. <ul id="idTab2" class="bullet">
  615. <?php $_smarty_tpl->tpl_vars['feature'] = new Smarty_Variable;
  616. $_from = $_smarty_tpl->getVariable('features')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  617. if ($_smarty_tpl->_count($_from) > 0){
  618. foreach ($_from as $_smarty_tpl->tpl_vars['feature']->key => $_smarty_tpl->tpl_vars['feature']->value){
  619. ?>
  620. <li><span><?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['feature']->value['name'],'htmlall','UTF-8');?>
  621. </span> <?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['feature']->value['value'],'htmlall','UTF-8');?>
  622. </li>
  623. <?php }} ?>
  624. </ul>
  625. <?php }?>
  626. <?php if ($_smarty_tpl->getVariable('attachments')->value){?>
  627. <ul id="idTab9" class="bullet">
  628. <?php $_smarty_tpl->tpl_vars['attachment'] = new Smarty_Variable;
  629. $_from = $_smarty_tpl->getVariable('attachments')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  630. if ($_smarty_tpl->_count($_from) > 0){
  631. foreach ($_from as $_smarty_tpl->tpl_vars['attachment']->key => $_smarty_tpl->tpl_vars['attachment']->value){
  632. ?>
  633. <li><a href="<?php echo $_smarty_tpl->getVariable('link')->value->getPageLink('attachment.php',true);?>
  634. ?id_attachment=<?php echo $_smarty_tpl->tpl_vars['attachment']->value['id_attachment'];?>
  635. "><?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['attachment']->value['name'],'htmlall','UTF-8');?>
  636. </a><br /><?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['attachment']->value['description'],'htmlall','UTF-8');?>
  637. </li>
  638. <?php }} ?>
  639. </ul>
  640. <?php }?>
  641. <?php if (isset($_smarty_tpl->getVariable('accessories',null,true,false)->value)&&$_smarty_tpl->getVariable('accessories')->value){?>
  642. <!-- accessories -->
  643. <ul id="idTab4">
  644. <?php $_smarty_tpl->tpl_vars['accessory'] = new Smarty_Variable;
  645. $_from = $_smarty_tpl->getVariable('accessories')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  646. $_smarty_tpl->tpl_vars['accessory']->total= $_smarty_tpl->_count($_from);
  647. $_smarty_tpl->tpl_vars['accessory']->iteration=0;
  648. $_smarty_tpl->tpl_vars['accessory']->index=-1;
  649. if ($_smarty_tpl->tpl_vars['accessory']->total > 0){
  650. foreach ($_from as $_smarty_tpl->tpl_vars['accessory']->key => $_smarty_tpl->tpl_vars['accessory']->value){
  651. $_smarty_tpl->tpl_vars['accessory']->iteration++;
  652. $_smarty_tpl->tpl_vars['accessory']->index++;
  653. $_smarty_tpl->tpl_vars['accessory']->first = $_smarty_tpl->tpl_vars['accessory']->index === 0;
  654. $_smarty_tpl->tpl_vars['accessory']->last = $_smarty_tpl->tpl_vars['accessory']->iteration === $_smarty_tpl->tpl_vars['accessory']->total;
  655. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['accessories_list']['first'] = $_smarty_tpl->tpl_vars['accessory']->first;
  656. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['accessories_list']['last'] = $_smarty_tpl->tpl_vars['accessory']->last;
  657. ?>
  658. <?php $_smarty_tpl->tpl_vars['accessoryLink'] = new Smarty_variable($_smarty_tpl->getVariable('link')->value->getProductLink($_smarty_tpl->tpl_vars['accessory']->value['id_product'],$_smarty_tpl->tpl_vars['accessory']->value['link_rewrite'],$_smarty_tpl->tpl_vars['accessory']->value['category']), null, null);?>
  659. <li class="ajax_block_product <?php if ($_smarty_tpl->getVariable('smarty')->value['foreach']['accessories_list']['first']){?>first_item<?php }elseif($_smarty_tpl->getVariable('smarty')->value['foreach']['accessories_list']['last']){?>last_item<?php }else{ ?>item<?php }?> product_accessories_description">
  660. <div class="accessories_desc">
  661. <a class="accessory_image product_img_link" href="<?php echo smarty_modifier_escape($_smarty_tpl->getVariable('accessoryLink')->value,'htmlall','UTF-8');?>
  662. " title="<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['accessory']->value['legend'],'htmlall','UTF-8');?>
  663. "><img src="<?php echo $_smarty_tpl->getVariable('link')->value->getImageLink($_smarty_tpl->tpl_vars['accessory']->value['link_rewrite'],$_smarty_tpl->tpl_vars['accessory']->value['id_image'],'medium');?>
  664. " alt="<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['accessory']->value['legend'],'htmlall','UTF-8');?>
  665. " /></a>
  666. <h5><a class="product_link" href="<?php echo smarty_modifier_escape($_smarty_tpl->getVariable('accessoryLink')->value,'htmlall','UTF-8');?>
  667. "><?php echo smarty_modifier_escape(smarty_modifier_truncate($_smarty_tpl->tpl_vars['accessory']->value['name'],22,'...',true),'htmlall','UTF-8');?>
  668. </a></h5>
  669. <a class="product_descr" href="<?php echo smarty_modifier_escape($_smarty_tpl->getVariable('accessoryLink')->value,'htmlall','UTF-8');?>
  670. " title="<?php echo smartyTranslate(array('s'=>'More'),$_smarty_tpl);?>
  671. "><?php echo smarty_modifier_truncate(preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->tpl_vars['accessory']->value['description_short']),70,'...');?>
  672. </a>
  673. </div>
  674. <div class="accessories_price">
  675. <?php if ($_smarty_tpl->tpl_vars['accessory']->value['show_price']&&!isset($_smarty_tpl->getVariable('restricted_country_mode',null,true,false)->value)&&!$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?><span class="price"><?php if ($_smarty_tpl->getVariable('priceDisplay')->value!=1){?><?php echo Product::displayWtPrice(array('p'=>$_smarty_tpl->tpl_vars['accessory']->value['price']),$_smarty_tpl);?>
  676. <?php }else{ ?><?php echo Product::displayWtPrice(array('p'=>$_smarty_tpl->tpl_vars['accessory']->value['pr…

Large files files are truncated, but you can click here to view the full file