Jump to content

Product comment/review - Broken markup


USB83

Recommended Posts

Hello,

 

I have a problem with the product comment form that lets customers review products.

The little stars are messy as shown in this screenshot : 

9yvKgmE.png

 

I installed a fresh prestashop locally to compare and there are differences in the markup :

 

The broken one : 

<ul id="criterions_list">
  <li>
    <label>Quality:</label>
      <div class="star_content">
          <div class="radio"><span><input type="hidden" name="criterion[1]" value="4">
          <div class="cancel"><a title="Cancel Rating"></a></div>
          <div class="star"><a title="1">1</a></div></span></div>
          <div class="radio"><span><div class="star"><a title="2">2</a></div></span></div>
          <div class="radio"><span><div class="star"><a title="3">3</a></div></span></div>
          <div class="radio"><span class="checked"><div class="star star_on"><a title="4">4</a></div></span></div>
          <div class="radio"><span><div class="star"><a title="5">5</a></div></span></div>
      </div>
    <div class="clearfix"></div>
  </li>
</ul>

The working :

<ul id="criterions_list">
  <li>
    <label>Quality:</label>
      <div class="star_content">
      <input type="hidden" name="criterion[1]" value="3">
      <div class="cancel"><a title="Cancel Rating"></a></div>
      <div class="star star_on"><a title="1">1</a></div>
      <div class="star star_on"><a title="2">2</a></div>
      <div class="star star_on"><a title="3">3</a></div>
      <div class="star"><a title="4">4</a></div>
      <div class="star"><a title="5">5</a></div>
    </div>

    <div class="clearfix"></div>
  </li>
</ul>

It is weird because i removed the products comment module and replaced it with the one from the fresh installation and i'm still having this problem.

 

Any ideas on how to fix this ?

 

Thanks a lot !

 

sdsd

Link to comment
Share on other sites

So you've updated the Product Comments module, but the old code is still displayed? Have you tried going to Advanced Parameters > Performance and clicking the "Clear cache" button?

 

Thank you for your time

Yes, i cleared the cache and the old code is still displayed.

 

Apart from the products comment module, do you think another module takes part in outputting this code and messes things up ?

Link to comment
Share on other sites

If you're using "Force compile" and clearing the cache isn't working, there must be something seriously wrong. You could try manually deleting the cache/smarty/cache and cache/smarty/compile subdirectories.

 

The only difference in the code seems to be the stars being wrapped in radio classes. I suppose it's possible there's a third-party module doing this. It's hard to know for sure.

Link to comment
Share on other sites

  • 2 months later...
Hi,
well we finaly found someone who get the same mistake ! we are not alone :)
We use the 1.6.1.6 with the default-bootstrap theme and the stars in the popup are like on the screenshot.
 
We have spent hours to find where the problems was... the only way we found to resolve this bug is :

 

in themes/default-bootstrap/modules/productcomments/productcomments.tpl find all :

<input class="star not_uniform" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="1" />

change the type like :

<input class="star not_uniform" type="star" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="1" />

I know this is not a valid html element but it makes the output class working... and this is the only way we resolved this bug..

 

If someone has a better idea :)

 

EDIT !!!!

 

Problem comes from uniform plugin... don't do the modification above. Finally you just have to deactivate it in your-theme/js/module/productcomments/productcomments.js

 

at the end of file add :

(function($) {
	$.fn.uniform = function() {
		return this;
	}
;})(jQuery);
Edited by MrC8 (see edit history)
Link to comment
Share on other sites

  • 2 months later...

 

Hi,
well we finaly found someone who get the same mistake ! we are not alone :)
We use the 1.6.1.6 with the default-bootstrap theme and the stars in the popup are like on the screenshot.
 
We have spent hours to find where the problems was... the only way we found to resolve this bug is :

 

in themes/default-bootstrap/modules/productcomments/productcomments.tpl find all :

<input class="star not_uniform" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="1" />

change the type like :

<input class="star not_uniform" type="star" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="1" />

I know this is not a valid html element but it makes the output class working... and this is the only way we resolved this bug..

 

If someone has a better idea :)

 

EDIT !!!!

 

Problem comes from uniform plugin... don't do the modification above. Finally you just have to deactivate it in your-theme/js/module/productcomments/productcomments.js

 

at the end of file add :

(function($) {
	$.fn.uniform = function() {
		return this;
	}
;})(jQuery);

thank you,it works and save much time,

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...