Hi I was wondering if it is possible to add review and ratings to dynamic pages. It is possible fo product pages but they have different element codes.
This picture is the dynamic page. The Red stars are all connected to my main dataset (conservation projects) and display different content depending on the page (repeaters). I then want a separate database for review that people can write for each individual item. These are the blue stars. I basically want people to be able to write a review on the dynamic page for each separate project that appears only on the dynamic page that they wrote the review.
This idea is similar to this tutorial https://support.wix.com/en/article/wix-code-adding-ratings-and-reviews-to-a-wix-stores-site#step-2-set-up-the-shop-product-page but that tutorial is in reference to product pages and i'm not sure it will work on my site as the first lines of data are functions for product pages. (see example code below).
I am happy to try adding this tutorial code but i think it will be a waste of a lot of time. Any ideas how I can achieve the adding reviews on dynamic pages? Can I replace the product functions with another function that relates to my conservation project dataset. thanks
import wixData from 'wix-data';
import wixWindow from 'wix-window';
let product;
$w.onReady(async function () {
product = await $w('#productPage1').getProduct();
initReviews();
});
I'm having the exact same problem,with a dynamic profiles page making customers leave reviews/ratings for, i've spent hours trying to figure out how to make it work, and it just isn't having it, i followed Duncan what he said about replacing every where it says "product" in the codes with title (the first field name in my customer reviews database) and it just doesn't work. do i need to still link all the elements in the repeater to the reviews dataset? is there any clever programmers out there who could kindly help? thanks
@duncan.maguire Me too. I read that it can be done we just have to replace the "product" items with items that pertain to a dynamic page. for example $w('#dproductPage1').getproduct would change to
$w('#dynamicDataset').getCurrentItem(); I added my dynamicDataset..... not sure if that is correct, but that is all I could find out. I am kind of confused on replacing the productId? What do I replace it with on a dynamic page?
I wish we could get some help on this particular code. I like the functionality.