Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [BUG] [FIXED] - productcomments have a javascript conflict in the product pages #253

Closed
maofree opened this issue Aug 9, 2023 · 4 comments
Labels

Comments

@maofree
Copy link

maofree commented Aug 9, 2023

Description

Hi
I've found a javascript conflict inside from list-comments.js and productListingComments.js in the product pages

if there is at least a carousel like the ps_categoryproducts or similar and the current product has one or more comments, the stars of the products inside the carousel will be all to 1 star.
If I remove all code of list-comments.js the stars inside the block carousel are ok

I show you with and without list-comments.js code
2
1

bye

Node.js version

v16

php version

8.1

OS and it's version

linux

Browsers

Chrome

Required module/theme

productcomments

Reproduction steps

1. Add a comment to two products of the same category
2. go to the product page of one product and go down to see the second product inside the carousel of ps_categoryproducts module
3. you can see the second product (inside the carousel) will have just one star
4. instead in the homepage, category pages ... the stars are ok, this problem is only in the product page

Now I've seen that the problem is present also in product page without comments, because it is loaded the file list-comments.js

Logs

No response

@maofree maofree added the bug Something isn't working label Aug 9, 2023
@maofree maofree changed the title 🐛 [BUG] - productcomments have a javascript conflict in the product pages 🐛 [BUG] [FIXED] - productcomments have a javascript conflict in the product pages Aug 9, 2023
@maofree
Copy link
Author

maofree commented Aug 9, 2023

I've fixed the problem inside list-comments.js file

replace the two lines

$('.grade-stars').rating();

with

$('.comments-note .grade-stars').rating();

@maofree
Copy link
Author

maofree commented Aug 18, 2023

Hi
I've found some little errors in the post-comment-modal.tpl file
the for attributes should be removed because they refer to the name attributes and not to the ID ones

for="comment_title"
for="customer_name"
for="comment_title"
for="comment_content"

1
2

Into the original file there are the ID

@Oksydan
Copy link
Owner

Oksydan commented Aug 21, 2023

Hi @maofree,

thank you for creating an issue and providing solution.

@Oksydan
Copy link
Owner

Oksydan commented Aug 31, 2023

Hi @maofree,

new version has been released. I am closing this issue.
Thank your for your contribution.

@Oksydan Oksydan closed this as completed Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants