v1.6-v1.7 Prestashop Product, Shop Reviews, Reminder, Profile, Rich Snippets Module- Feedback

Marc

Active member
XNullUser
Joined
Feb 27, 2021
Messages
510
Reaction score
33
Points
28
NullCash
29
I tried this module on Prestashop 1.6 and it's working GREAT! I didn't find any error or problem, everything is working smoothly.

I just want a small modification, I want the default rating 5 stars instead of 0 stars when writing the review, users can reduce the rating if they want, but it should be 5 by default. Is there someone who could help to achieve this? Any help would be greatly appreciated.

Kind Regards

Module page link- https://www.nulledfrm.com/threads/p...ews-reminder-profile-rich-snippets-module.331
 

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,542
Reaction score
1,536
Points
113
NullCash
4,201
Bro. This should go to request thread :)
 

Marc

Active member
XNullUser
Joined
Feb 27, 2021
Messages
510
Reaction score
33
Points
28
NullCash
29
Bro. This should go to request thread :)
Thank you so much for the suggestion, I want to edit and move it to the request thread, but I'm not able to see an "Edit" button, am I missing something?
 

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,542
Reaction score
1,536
Points
113
NullCash
4,201
Thank you so much for the suggestion, I want to edit and move it to the request thread, but I'm not able to see an "Edit" button, am I missing something?
yes bro. it is a small problem on this forum. But root will read us and make a decision.
About you problem. do you understand php. you must find output of star variable and add condition.
Some like this
if ($starvar == 0) $starvar=5;
 

Marc

Active member
XNullUser
Joined
Feb 27, 2021
Messages
510
Reaction score
33
Points
28
NullCash
29
Thanks for the help, I don't understand PHP, but I can edit a PHP file and modify the code as suggested by you, but I don't know which file should I edit, could you please help?
Kind Regards
 

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,542
Reaction score
1,536
Points
113
NullCash
4,201
Ок. I will download module. Give me some times. But i need access to you site. You can create private conversion and sent me access to FTP and Admin Backend.
 

Marc

Active member
XNullUser
Joined
Feb 27, 2021
Messages
510
Reaction score
33
Points
28
NullCash
29
Unfortunately, I work for someone else, so can't give the backend access, but I can edit the file if you could let me know which file should I edit and what code should I add to make it work.
I would be very thankful to you.
Kind Regards
 

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,542
Reaction score
1,536
Points
113
NullCash
4,201
Unfortunately, I work for someone else, so can't give the backend access, but I can edit the file if you could let me know which file should I edit and what code should I add to make it work.
I would be very thankful to you.
Kind Regards
Ok. what version PrestaShop you use? I install on my self hosting and try understand code for you.
 

Marc

Active member
XNullUser
Joined
Feb 27, 2021
Messages
510
Reaction score
33
Points
28
NullCash
29
The Prestashop version is 1.6.1.24.
Thank you so much for your help!
Kind Regards
 

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,542
Reaction score
1,536
Points
113
NullCash
4,201
i never developed for ps1.6 need more time.
But first step done
1624468650513.png
add code into
/modules/spmgsnipreview/views/templates/hooks/liststars.tpl

1624468855957.png
 

Marc

Active member
XNullUser
Joined
Feb 27, 2021
Messages
510
Reaction score
33
Points
28
NullCash
29
Zamanınız ve emeğiniz için çok teşekkür ederim.
Nasıl çalıştığını anlamak için harika bir örnek, ancak sadece inceleme formu sayfasını değiştirmem gerekiyor, lütfen ekteki resmi kontrol edin.
Saygılarımla
1-jpg.7660

Post automatically merged:

Sanırım ilgili kod /modules/spmgsnipreview/views/templates/hooks/producttabcontent.tpl dosyasının ilk <div class="rat rating-stars-dynamic"> bölümünün altında.
 
Last edited by a moderator:

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,542
Reaction score
1,536
Points
113
NullCash
4,201
Zamanınız ve emeğiniz için çok teşekkür ederim.
Nasıl çalıştığını anlamak için harika bir örnek, ancak sadece inceleme formu sayfasını değiştirmem gerekiyor, lütfen ekteki resmi kontrol edin.
Saygılarımla
1-jpg.7660

Post automatically merged:

Sanırım ilgili kod /modules/spmgsnipreview/views/templates/hooks/producttabcontent.tpl dosyasının ilk <div class="rat rating-stars-dynamic"> bölümünün altında.
Yes i found all tpl files. But i understand PS1.6 I make the edition, clear cache, no effects. Debug mode very poor in ps1.6

Files
modules/spmgsnipreview/views/templates/hooks/reviewsblockextraleft.tpl
modules/spmgsnipreview/views/templates/hooks/reviewsblockextraright.tpl
modules/spmgsnipreview/views/templates/hooks/reviewsblockproductactions.tpl
modules/spmgsnipreview/views/templates/hooks/reviewsblockproductfooter.tpl

For add the code - maybe in you PS will work my code
reviewsblockproductactions.tpl
1624471516218.png
for this

1624471633168.png
Post automatically merged:

Zamanınız ve emeğiniz için çok teşekkür ederim.
Nasıl çalıştığını anlamak için harika bir örnek, ancak sadece inceleme formu sayfasını değiştirmem gerekiyor, lütfen ekteki resmi kontrol edin.
Saygılarımla
1-jpg.7660

Post automatically merged:

Sanırım ilgili kod /modules/spmgsnipreview/views/templates/hooks/producttabcontent.tpl dosyasının ilk <div class="rat rating-stars-dynamic"> bölümünün altında.
/modules/spmgsnipreview/views/templates/hooks/producttabcontent.tpl dosyasının ilk <div class="rat rating-stars-dynamic">
on this line JS code only to chose rating.
 
Last edited:

Marc

Active member
XNullUser
Joined
Feb 27, 2021
Messages
510
Reaction score
33
Points
28
NullCash
29
I tried the code but unfortunately, it didn't work, I cleared the cache as well.
I was able to solve this problem in Prestashop's default review module, below is the example code, it might help to get a clue.

{if $criterions|@count > 0}
<ul id="criterions_list">
{foreach from=$criterions item='criterion'}
<li>
<label>{$criterion.name|escape:'html':'UTF-8'}:</label>
<div class="star_content">
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="1" />
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="2" />
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="3" checked="checked" />
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="4" />
<input class="star" type="radio" name="criterion[{$criterion.id_product_comment_criterion|round}]" value="5" />
</div>
<div class="clearfix"></div>
</li>
{/foreach}
</ul>
{/if}

Move the checked="checked to assign the default value.

I found a similar code in /modules/spmgsnipreview/views/templates/hooks/producttabcontent.tpl, and that's why I thought it might be related.

I really appreciate your time and efforts.

Kind Regards
 

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,542
Reaction score
1,536
Points
113
NullCash
4,201
No

found one more. keep a clam :)
1624473908865.png
Post automatically merged:

1624474042415.png
 

Marc

Active member
XNullUser
Joined
Feb 27, 2021
Messages
510
Reaction score
33
Points
28
NullCash
29
Great! I think you're about to solve the problem :)
 

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,542
Reaction score
1,536
Points
113
NullCash
4,201
step 1
1624480631617.png
Post automatically merged:

Step 2
{literal}
<script type="text/javascript">
{/literal}{if $spmgsnipreviewis17 == 1}{literal}document.addEventListener("DOMContentLoaded", function(event) { {/literal}{/if}
{literal}
jQuery(document).ready( function() {
init_rating();
read_rating_review_shop('rat_rel1');
});

$("#idTab777-my-click").click(function() {
$('.total-info-tool-product-page .btn-spmgsnipreview').parent().hide();
});

{/literal}{if $spmgsnipreviewis17 == 1}{literal}}); {/literal}{/if}{literal}
</script>
{/literal}

1624480706334.png
 

Attachments

  • 5Star_on_start.zip
    10.2 KB · Views: 1

Marc

Active member
XNullUser
Joined
Feb 27, 2021
Messages
510
Reaction score
33
Points
28
NullCash
29
You're the best! It worked like a charm. However, when I tried to submit the review, I got this error- Please, choose the rating for Quality, so I think it is just showing fake 5 stars selected, but actually, they are not selected. I had to actually click them to submit the review. Please see the attached image.
Screenshot 2021-06-24 022917.jpg
 

d-shilko

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Joined
Jun 10, 2021
Messages
2,542
Reaction score
1,536
Points
113
NullCash
4,201
you little not understand. No fake 5 star just change 0 to 5. On my test site all work good :)
Watch video.

And do screenshot image copy past. I'll need to "Like" Replay to see you screenshot

in video you can see url of test site - try you self :)
 

Marc

Active member
XNullUser
Joined
Feb 27, 2021
Messages
510
Reaction score
33
Points
28
NullCash
29
Thanks for the video, but try to submit a review with a 5-star rating without clicking the stars, if they're real and already selected, then you don't need to click them :) you should only need to click them if you want to give a rating with less then 5 stars.
 
Top