PLEASE HELP! Problem with loading comments and reviews on my page

Hello everyone,

I’m trying to post comments on my site, but obviously I have a problem with that.

My code works by extracting the last parameter of URL as a product name and saving it to my dataset( field IDProizvoda) and then compare using filters.

Example URL:
www.soskic.hr/product-page/travarica-1-0l
I get “travarica-1-0l” as my IDProizvoda.

When I load the page, database stored correctly but the comments are not displayed.
I don’t know if there’s a problem with the filter or? Please help.
Find attached screenshots below.

For starters all imports should be at the top of your code.

You are using this tutorial from Wix linked below and you do not actually need any of the code from line 22 onwards.

Corvid by Wix | How to Collect & Display User-Generated Content on Your Website

If you want to do a ratings and reviews setup for your products in Wix Stores, then have a look at this example here.
https://support.wix.com/en/article/corvid-tutorial-adding-ratings-and-reviews-to-a-wix-stores-site

Hi, thanks for the help.

I used the tutorial from youtube but that is not enough. I need specific comments for each product. The video you send contains all the comments together, which means for “xyz” product it will open all comments. I need only comments on “xyz” product.

Because of that I added code from line 22, which save that parameter(IDProizvoda) to database.

How can I compare IDProizvoda with all products in database and show only products that has same IDProizvoda (parameter for recognizing products)???

For sample, When I open product with url https://www.soskic.hr/product-page/travarica-1-0l , I want only show comments that has IDProizvoda " travarica-1-0l " ?

Yes I thought that the original tutorial that you are using would not be suitable, that is why I added the Wix Stores rating and review example too.

You should use this one as it is setup already for Wix Stores and you can open the example up in your own Editor with page all setup and code all setup as well.

If you want to do a ratings and reviews setup for your products in Wix Stores, then have a look at this example here.
https://support.wix.com/en/article/corvid-tutorial-adding-ratings-and-reviews-to-a-wix-stores-site