PageRenderTime 35ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/smarty/compile/a54aa37eb64064d65f8ba120033d7bc419d04b9e.file.homefeatured.tpl.php

http://marocmall.googlecode.com/
PHP | 106 lines | 103 code | 3 blank | 0 comment | 13 complexity | 273f51e3496508a604173e2d71fbe9da MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php /* Smarty version Smarty-3.0.7, created on 2011-12-29 16:34:29
  2. compiled from "C:\D\prestashoplf\prestashop/modules/homefeatured/homefeatured.tpl" */ ?>
  3. <?php /*%%SmartyHeaderCode:250804efc9695540140-30142247%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
  4. $_smarty_tpl->decodeProperties(array (
  5. 'file_dependency' =>
  6. array (
  7. 'a54aa37eb64064d65f8ba120033d7bc419d04b9e' =>
  8. array (
  9. 0 => 'C:\\D\\prestashoplf\\prestashop/modules/homefeatured/homefeatured.tpl',
  10. 1 => 1306141904,
  11. 2 => 'file',
  12. ),
  13. ),
  14. 'nocache_hash' => '250804efc9695540140-30142247',
  15. 'function' =>
  16. array (
  17. ),
  18. 'has_nocache_code' => false,
  19. )); /*/%%SmartyHeaderCode%%*/?>
  20. <?php if (!is_callable('smarty_function_math')) include 'C:\D\prestashoplf\prestashop\tools\smarty\plugins\function.math.php';
  21. if (!is_callable('smarty_modifier_escape')) include 'C:\D\prestashoplf\prestashop\tools\smarty\plugins\modifier.escape.php';
  22. ?>
  23. <!-- MODULE Home Featured Products -->
  24. <div id="featured-products_block_center" class="block products_block">
  25. <h4><?php echo smartyTranslate(array('s'=>'Featured products','mod'=>'homefeatured'),$_smarty_tpl);?>
  26. </h4>
  27. <?php if (isset($_smarty_tpl->getVariable('products',null,true,false)->value)&&$_smarty_tpl->getVariable('products')->value){?>
  28. <div class="block_content">
  29. <?php $_smarty_tpl->tpl_vars['liHeight'] = new Smarty_variable(342, null, null);?>
  30. <?php $_smarty_tpl->tpl_vars['nbItemsPerLine'] = new Smarty_variable(4, null, null);?>
  31. <?php $_smarty_tpl->tpl_vars['nbLi'] = new Smarty_variable(count($_smarty_tpl->getVariable('products')->value), null, null);?>
  32. <?php echo smarty_function_math(array('equation'=>"nbLi/nbItemsPerLine",'nbLi'=>$_smarty_tpl->getVariable('nbLi')->value,'nbItemsPerLine'=>$_smarty_tpl->getVariable('nbItemsPerLine')->value,'assign'=>'nbLines'),$_smarty_tpl);?>
  33. <?php echo smarty_function_math(array('equation'=>"nbLines*liHeight",'nbLines'=>ceil($_smarty_tpl->getVariable('nbLines')->value),'liHeight'=>$_smarty_tpl->getVariable('liHeight')->value,'assign'=>'ulHeight'),$_smarty_tpl);?>
  34. <ul style="height:<?php echo $_smarty_tpl->getVariable('ulHeight')->value;?>
  35. px;">
  36. <?php $_smarty_tpl->tpl_vars['product'] = new Smarty_Variable;
  37. $_from = $_smarty_tpl->getVariable('products')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
  38. $_smarty_tpl->tpl_vars['product']->total= $_smarty_tpl->_count($_from);
  39. $_smarty_tpl->tpl_vars['product']->iteration=0;
  40. $_smarty_tpl->tpl_vars['product']->index=-1;
  41. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['homeFeaturedProducts']['total'] = $_smarty_tpl->tpl_vars['product']->total;
  42. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['homeFeaturedProducts']['iteration']=0;
  43. if ($_smarty_tpl->tpl_vars['product']->total > 0){
  44. foreach ($_from as $_smarty_tpl->tpl_vars['product']->key => $_smarty_tpl->tpl_vars['product']->value){
  45. $_smarty_tpl->tpl_vars['product']->iteration++;
  46. $_smarty_tpl->tpl_vars['product']->index++;
  47. $_smarty_tpl->tpl_vars['product']->first = $_smarty_tpl->tpl_vars['product']->index === 0;
  48. $_smarty_tpl->tpl_vars['product']->last = $_smarty_tpl->tpl_vars['product']->iteration === $_smarty_tpl->tpl_vars['product']->total;
  49. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['homeFeaturedProducts']['first'] = $_smarty_tpl->tpl_vars['product']->first;
  50. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['homeFeaturedProducts']['iteration']++;
  51. $_smarty_tpl->tpl_vars['smarty']->value['foreach']['homeFeaturedProducts']['last'] = $_smarty_tpl->tpl_vars['product']->last;
  52. ?>
  53. <li class="ajax_block_product <?php if ($_smarty_tpl->getVariable('smarty')->value['foreach']['homeFeaturedProducts']['first']){?>first_item<?php }elseif($_smarty_tpl->getVariable('smarty')->value['foreach']['homeFeaturedProducts']['last']){?>last_item<?php }else{ ?>item<?php }?> <?php if ($_smarty_tpl->getVariable('smarty')->value['foreach']['homeFeaturedProducts']['iteration']%$_smarty_tpl->getVariable('nbItemsPerLine')->value==0){?>last_item_of_line<?php }elseif($_smarty_tpl->getVariable('smarty')->value['foreach']['homeFeaturedProducts']['iteration']%$_smarty_tpl->getVariable('nbItemsPerLine')->value==1){?>clear<?php }?> <?php if ($_smarty_tpl->getVariable('smarty')->value['foreach']['homeFeaturedProducts']['iteration']>($_smarty_tpl->getVariable('smarty')->value['foreach']['homeFeaturedProducts']['total']-($_smarty_tpl->getVariable('smarty')->value['foreach']['homeFeaturedProducts']['total']%$_smarty_tpl->getVariable('nbItemsPerLine')->value))){?>last_line<?php }?>">
  54. <h5><a href="<?php echo $_smarty_tpl->tpl_vars['product']->value['link'];?>
  55. " title="<?php echo smarty_modifier_escape(smarty_modifier_truncate($_smarty_tpl->tpl_vars['product']->value['name'],32,'...'),'htmlall','UTF-8');?>
  56. "><?php echo smarty_modifier_escape(smarty_modifier_truncate($_smarty_tpl->tpl_vars['product']->value['name'],27,'...'),'htmlall','UTF-8');?>
  57. </a></h5>
  58. <div class="product_desc"><a href="<?php echo $_smarty_tpl->tpl_vars['product']->value['link'];?>
  59. " title="<?php echo smartyTranslate(array('s'=>'More','mod'=>'homefeatured'),$_smarty_tpl);?>
  60. "><?php echo smarty_modifier_truncate(preg_replace('!<[^>]*?>!', ' ', $_smarty_tpl->tpl_vars['product']->value['description_short']),130,'...');?>
  61. </a></div>
  62. <a href="<?php echo $_smarty_tpl->tpl_vars['product']->value['link'];?>
  63. " title="<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['product']->value['name'],'html','UTF-8');?>
  64. " class="product_image"><img src="<?php echo $_smarty_tpl->getVariable('link')->value->getImageLink($_smarty_tpl->tpl_vars['product']->value['link_rewrite'],$_smarty_tpl->tpl_vars['product']->value['id_image'],'home');?>
  65. " height="<?php echo $_smarty_tpl->getVariable('homeSize')->value['height'];?>
  66. " width="<?php echo $_smarty_tpl->getVariable('homeSize')->value['width'];?>
  67. " alt="<?php echo smarty_modifier_escape($_smarty_tpl->tpl_vars['product']->value['name'],'html','UTF-8');?>
  68. " /></a>
  69. <div>
  70. <?php if ($_smarty_tpl->tpl_vars['product']->value['show_price']&&!isset($_smarty_tpl->getVariable('restricted_country_mode',null,true,false)->value)&&!$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?><p class="price_container"><span class="price"><?php if (!$_smarty_tpl->getVariable('priceDisplay')->value){?><?php echo Product::convertPrice(array('price'=>$_smarty_tpl->tpl_vars['product']->value['price']),$_smarty_tpl);?>
  71. <?php }else{ ?><?php echo Product::convertPrice(array('price'=>$_smarty_tpl->tpl_vars['product']->value['price_tax_exc']),$_smarty_tpl);?>
  72. <?php }?></span></p><?php }else{ ?><div style="height:21px;"></div><?php }?>
  73. <a class="button" href="<?php echo $_smarty_tpl->tpl_vars['product']->value['link'];?>
  74. " title="<?php echo smartyTranslate(array('s'=>'View','mod'=>'homefeatured'),$_smarty_tpl);?>
  75. "><?php echo smartyTranslate(array('s'=>'View','mod'=>'homefeatured'),$_smarty_tpl);?>
  76. </a>
  77. <?php if (($_smarty_tpl->tpl_vars['product']->value['id_product_attribute']==0||(isset($_smarty_tpl->getVariable('add_prod_display',null,true,false)->value)&&($_smarty_tpl->getVariable('add_prod_display')->value==1)))&&$_smarty_tpl->tpl_vars['product']->value['available_for_order']&&!isset($_smarty_tpl->getVariable('restricted_country_mode',null,true,false)->value)&&$_smarty_tpl->tpl_vars['product']->value['minimal_quantity']==1&&$_smarty_tpl->tpl_vars['product']->value['customizable']!=2&&!$_smarty_tpl->getVariable('PS_CATALOG_MODE')->value){?>
  78. <?php if (($_smarty_tpl->tpl_vars['product']->value['quantity']>0||$_smarty_tpl->tpl_vars['product']->value['allow_oosp'])){?>
  79. <a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_<?php echo $_smarty_tpl->tpl_vars['product']->value['id_product'];?>
  80. " href="<?php echo $_smarty_tpl->getVariable('link')->value->getPageLink('cart.php');?>
  81. ?qty=1&amp;id_product=<?php echo $_smarty_tpl->tpl_vars['product']->value['id_product'];?>
  82. &amp;token=<?php echo $_smarty_tpl->getVariable('static_token')->value;?>
  83. &amp;add" title="<?php echo smartyTranslate(array('s'=>'Add to cart','mod'=>'homefeatured'),$_smarty_tpl);?>
  84. "><?php echo smartyTranslate(array('s'=>'Add to cart','mod'=>'homefeatured'),$_smarty_tpl);?>
  85. </a>
  86. <?php }else{ ?>
  87. <span class="exclusive"><?php echo smartyTranslate(array('s'=>'Add to cart','mod'=>'homefeatured'),$_smarty_tpl);?>
  88. </span>
  89. <?php }?>
  90. <?php }else{ ?>
  91. <div style="height:23px;"></div>
  92. <?php }?>
  93. </div>
  94. </li>
  95. <?php }} ?>
  96. </ul>
  97. </div>
  98. <?php }else{ ?>
  99. <p><?php echo smartyTranslate(array('s'=>'No featured products','mod'=>'homefeatured'),$_smarty_tpl);?>
  100. </p>
  101. <?php }?>
  102. </div>
  103. <!-- /MODULE Home Featured Products -->