PageRenderTime 26ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/prestashop/_/cache/smarty/compile/f8/4b/22/f84b2289875ae4afe6b68312e1911038b2844fdd.file.productcomments-extra.tpl.php

https://gitlab.com/A.Julien/sendstockbymail-module-prestashop
PHP | 105 lines | 102 code | 3 blank | 0 comment | 20 complexity | 81264087671a9af6e631ff7564ee4eda MD5 | raw file
  1. <?php /* Smarty version Smarty-3.1.19, created on 2016-08-29 22:06:55
  2. compiled from "C:\xampp\htdocs\prestashop\prestashop\_\themes\default-bootstrap\modules\productcomments\productcomments-extra.tpl" */ ?>
  3. <?php /*%%SmartyHeaderCode:1147257c495df202fb2-13385262%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
  4. $_valid = $_smarty_tpl->decodeProperties(array (
  5. 'file_dependency' =>
  6. array (
  7. 'f84b2289875ae4afe6b68312e1911038b2844fdd' =>
  8. array (
  9. 0 => 'C:\\xampp\\htdocs\\prestashop\\prestashop\\_\\themes\\default-bootstrap\\modules\\productcomments\\productcomments-extra.tpl',
  10. 1 => 1472500930,
  11. 2 => 'file',
  12. ),
  13. ),
  14. 'nocache_hash' => '1147257c495df202fb2-13385262',
  15. 'function' =>
  16. array (
  17. ),
  18. 'variables' =>
  19. array (
  20. 'content_only' => 0,
  21. 'nbComments' => 0,
  22. 'too_early' => 0,
  23. 'is_logged' => 0,
  24. 'allow_guests' => 0,
  25. 'averageTotal' => 0,
  26. 'ratings' => 0,
  27. ),
  28. 'has_nocache_code' => false,
  29. 'version' => 'Smarty-3.1.19',
  30. 'unifunc' => 'content_57c495df480095_97520032',
  31. ),false); /*/%%SmartyHeaderCode%%*/?>
  32. <?php if ($_valid && !is_callable('content_57c495df480095_97520032')) {function content_57c495df480095_97520032($_smarty_tpl) {?>
  33. <?php if ((!$_smarty_tpl->tpl_vars['content_only']->value&&(($_smarty_tpl->tpl_vars['nbComments']->value==0&&$_smarty_tpl->tpl_vars['too_early']->value==false&&($_smarty_tpl->tpl_vars['is_logged']->value||$_smarty_tpl->tpl_vars['allow_guests']->value))||($_smarty_tpl->tpl_vars['nbComments']->value!=0)))) {?>
  34. <div id="product_comments_block_extra" class="no-print" itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">
  35. <?php if ($_smarty_tpl->tpl_vars['nbComments']->value!=0) {?>
  36. <div class="comments_note clearfix">
  37. <span><?php echo smartyTranslate(array('s'=>'Rating','mod'=>'productcomments'),$_smarty_tpl);?>
  38. &nbsp;</span>
  39. <div class="star_content clearfix">
  40. <?php if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']["i"])) unset($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]);
  41. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['name'] = "i";
  42. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['start'] = (int) 0;
  43. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['loop'] = is_array($_loop=5) ? count($_loop) : max(0, (int) $_loop); unset($_loop);
  44. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['step'] = ((int) 1) == 0 ? 1 : (int) 1;
  45. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['show'] = true;
  46. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['loop'];
  47. if ($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['start'] < 0)
  48. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['start'] = max($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['step'] > 0 ? 0 : -1, $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['loop'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['start']);
  49. else
  50. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['start'] = min($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['step'] > 0 ? $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['loop'] : $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['loop']-1);
  51. if ($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['show']) {
  52. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['total'] = min(ceil(($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['step'] > 0 ? $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['loop'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['start'] : $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['start']+1)/abs($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['step'])), $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['max']);
  53. if ($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['total'] == 0)
  54. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['show'] = false;
  55. } else
  56. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['total'] = 0;
  57. if ($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['show']):
  58. for ($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['iteration'] = 1;
  59. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['total'];
  60. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['iteration']++):
  61. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['iteration'];
  62. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['step'];
  63. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['step'];
  64. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['first'] = ($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['iteration'] == 1);
  65. $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['last'] = ($_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']["i"]['total']);
  66. ?>
  67. <?php if ($_smarty_tpl->tpl_vars['averageTotal']->value<=$_smarty_tpl->getVariable('smarty')->value['section']['i']['index']) {?>
  68. <div class="star"></div>
  69. <?php } else { ?>
  70. <div class="star star_on"></div>
  71. <?php }?>
  72. <?php endfor; endif; ?>
  73. <meta itemprop="worstRating" content = "0" />
  74. <meta itemprop="ratingValue" content = "<?php if (isset($_smarty_tpl->tpl_vars['ratings']->value['avg'])) {?><?php echo htmlspecialchars(round($_smarty_tpl->tpl_vars['ratings']->value['avg'],1), ENT_QUOTES, 'UTF-8', true);?>
  75. <?php } else { ?><?php echo htmlspecialchars(round($_smarty_tpl->tpl_vars['averageTotal']->value,1), ENT_QUOTES, 'UTF-8', true);?>
  76. <?php }?>" />
  77. <meta itemprop="bestRating" content = "5" />
  78. </div>
  79. </div> <!-- .comments_note -->
  80. <?php }?>
  81. <ul class="comments_advices">
  82. <?php if ($_smarty_tpl->tpl_vars['nbComments']->value!=0) {?>
  83. <li>
  84. <a href="#idTab5" class="reviews">
  85. <?php echo smartyTranslate(array('s'=>'Read reviews','mod'=>'productcomments'),$_smarty_tpl);?>
  86. (<span itemprop="reviewCount"><?php echo $_smarty_tpl->tpl_vars['nbComments']->value;?>
  87. </span>)
  88. </a>
  89. </li>
  90. <?php }?>
  91. <?php if (($_smarty_tpl->tpl_vars['too_early']->value==false&&($_smarty_tpl->tpl_vars['is_logged']->value||$_smarty_tpl->tpl_vars['allow_guests']->value))) {?>
  92. <li>
  93. <a class="open-comment-form" href="#new_comment_form">
  94. <?php echo smartyTranslate(array('s'=>'Write a review','mod'=>'productcomments'),$_smarty_tpl);?>
  95. </a>
  96. </li>
  97. <?php }?>
  98. </ul>
  99. </div>
  100. <?php }?>
  101. <!-- /Module ProductComments -->
  102. <?php }} ?>