Dynamic custom Reviews/Ratings Section -Filtering Dataset

Hi ! I need help, I have tried everywhere.

(I am not working with WixStores product reviews.)
I have a website that is a directory that displays a list of businesses. I want users to be able to leave ratings/reviews for each specific business. I am trying to either use the dataset filter or find a code that will:
* filter the rating/review on that dynamic page based on the current business page the user left the review for. Each dynamic page (business page) should have it’s own unique dynamic reviews. PLEASE HELP :frowning:

Hello.

Since you are using a dynamic page, you can use getCurrentItem() just like getProduct() in stores Product page. You can adopt the rest of the set up and code from the product reviews tutorial .

Good luck!

Omg thank you for responding Sam! ok… question since i am a super rookie on this:

  1. should this code be on the actual dynamic page or on the lightbox?

  2. Re: the code below, since i am not reviewing product, what will i change “#productPage1”, “productId” and “product._id” to?

  3. on the product page, it looks like the “productPage1” is a combined/fixed module. What would that correlate to on my site?
    (see attached photo)

Hi sam, if you have an update, I would greatly appreciate it! nothing is working

If ANYONE has an answer, i would greatly appreciate the help! :frowning:

The dynamic page here replaces the product page so everything on the product page should be placed on the dynamic page. Below are the main changes you need to make:

let business;//instead of let product

$w.onReady( () => {
  $w("#myDataset").onReady( () => {
    business = $w("#myDataset").getCurrentItem();
    businessId =business._id; 

  } );

} );

Please name that you can name the variable the way you want.

If you feel like you are struggling with your code consider hiring a Wix Partner.

Good luck!

1 Like

@samuele thank you Sam! i appreciate it i am considering!