# review and rate dynamic pages

**URL:** <https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863>\
**Category:** Ask the community\
**Tags:** question, code, wix-stores\
**Created:** [February 14, 2019, 11:55am UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863 "2019-02-14T11:55:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![duncanmaguire](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/duncanmaguire/32/9063_2.png) [@duncanmaguire](https://forum.wixstudio.com/u/duncanmaguire)\
**Post date:** [February 14, 2019, 11:55am UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863/1 "2019-02-14T11:55:32Z")

</div>

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.

 ![](https://us1.discourse-cdn.com/wix/original/3X/4/2/429b23e7d8bc2895980f3d3ef0b98f178f1bc9f3.png)

This idea is similar to this tutorial [Velo Tutorial: Adding Ratings and Reviews to a Wix Stores Site | Help Center | Wix.com](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

```javascript

import wixData from 'wix-data';
import wixWindow from 'wix-window';

let product; 

$w.onReady(async function () {
 product = await $w('#productPage1').getProduct(); 
 initReviews(); 
});

```

---

<div class="post-metadata">

**Author:** ![emsimmons77](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/emsimmons77/32/8425_2.png) [@emsimmons77](https://forum.wixstudio.com/u/emsimmons77)\
**Post date:** [February 15, 2019, 5:55pm UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863/2 "2019-02-15T17:55:51Z")

</div>

@ [duncan.maguire](https://forums.wixapps.net/community-discussion/review-and-rate-dynamic-pages?cacheKiller=1550252326147&compId=TPASection_j5ggxs3g&deviceType=desktop&height=626&instance=r316xQYJQ4gNLQyTWR_ndA5jJZ458LIcwpMSiT6nUek.eyJpbnN0YW5jZUlkIjoiMjViODlmMmItM2JmYy00NmNiLTg5NzgtODJiNGMwYTEyN2U3IiwiYXBwRGVmSWQiOiIxNDcyNGYzNS02Nzk0LWNkMWEtMDI0NC0yNWZkMTM4ZjkyNDIiLCJtZXRhU2l0ZUlkIjoiOTA2NDI1MmQtMTEyMi00YzNkLWE2NDctOTViMTJmYjM0YjJlIiwic2lnbkRhdGUiOiIyMDE5LTAyLTE1VDE3OjQxOjM3Ljk5N1oiLCJ1aWQiOiJmMTM1MGFiYy0zNTUzLTRiNTAtYmUwZC1kNWMzYTYxNTFjNTgiLCJpcEFuZFBvcnQiOiI5OC4xOTQuMjE1Ljg4LzUwNDE2IiwidmVuZG9yUHJvZHVjdElkIjpudWxsLCJkZW1vTW9kZSI6ZmFsc2UsIm9yaWdpbkluc3RhbmNlSWQiOiI0YWM4ZWUyNS00OGFlLTQxMTAtODBhYy1iOTY3NmRiYTdmNWMiLCJhaWQiOiIxYjc5YzU0My0yMTk2LTQzZWQtYjEyMi1lZTIyZGVlZmFhMmUiLCJiaVRva2VuIjoiYjVkY2JhMDYtMmFkZS0wYWY2LTJmM2YtMTcwNWVmMTI2Y2M5Iiwic2l0ZU93bmVySWQiOiIzNzU4ODIzYy1lYWYzLTQ2OTQtOWMwOS1jYjcwZjk1OTdlYzMifQ&locale=en&pageId=atumo&section-url=https%3A%2F%2Fwww.wix.com%2Fcode%2Fhome%2Fforum%2F&target=_top&viewMode=site&width=980#) 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.

---

<div class="post-metadata">

**Author:** ![duncanmaguire](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/duncanmaguire/32/9063_2.png) [@duncanmaguire](https://forum.wixstudio.com/u/duncanmaguire)\
**Post date:** [February 15, 2019, 6:13pm UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863/3 "2019-02-15T18:13:46Z")

</div>

Hi Eb.

Yes I managed to do it myself. You can replace the ‘products’ in the code with ‘items’ and it sort of works with a few more tweaks here and there…

where did you read that you could use get current item? I couldn’t find it anywhere!

If you follow the tutorial i have in my first post, basically instead of the product id i want it to relate to my title id. so I replace all the places that relates to product with title as thats the key for my field i wanted to link.

---

<div class="post-metadata">

**Author:** ![emsimmons77](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/emsimmons77/32/8425_2.png) [@emsimmons77](https://forum.wixstudio.com/u/emsimmons77)\
**Post date:** [February 15, 2019, 6:22pm UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863/4 "2019-02-15T18:22:33Z")

</div>

@duncanmaguire here is the link I was referring. The reference to the dynamic page. Thank you for the information regarding " product" I will try it out.

> **[Example: Store Reviews & Rating | Velo by Wix](https://community.wix.com/velo/forum/coding-with-velo/example-store-reviews-rating)**
>
> We took a site with Wix Stores and added Ratings and Reviews functionality to it. 
> 
> Site members can go to a product’s page and add a rating and a written review, and recommend the product. The Product page displays average rating and recommendation...

---

<div class="post-metadata">

**Author:** ![emsimmons77](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/emsimmons77/32/8425_2.png) [@emsimmons77](https://forum.wixstudio.com/u/emsimmons77)\
**Post date:** [February 27, 2019, 1:22am UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863/5 "2019-02-27T01:22:49Z")

</div>

@duncanmaguire I tried replacing the “product” with my reference field but it did not work. Did you run into an error on the lightbox page that states ItemID must be a string? I do not think my .getcontext is collecting any data. If you had this issue how did you fix it? Part’s of my code is working but not all of it.

---

<div class="post-metadata">

**Author:** ![duncanmaguire](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/duncanmaguire/32/9063_2.png) [@duncanmaguire](https://forum.wixstudio.com/u/duncanmaguire)\
**Post date:** [February 28, 2019, 7:15pm UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863/6 "2019-02-28T19:15:16Z")

</div>

@emsimmons77 so instead of product i wanted to get right item from database.  
so at the top its let title. as i am referencing the title field from my database)  
then, title **= await $w(‘#your dataset here’).** getcurrentitem

---

<div class="post-metadata">

**Author:** ![duncanmaguire](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/duncanmaguire/32/9063_2.png) [@duncanmaguire](https://forum.wixstudio.com/u/duncanmaguire)\
**Post date:** [February 28, 2019, 7:16pm UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863/7 "2019-02-28T19:16:02Z")

</div>

@emsimmons77 not sure if that answers your problem. then whereever it says product in your code from then on replace it with ‘title’ or the field ID you want

---

<div class="post-metadata">

**Author:** ![emsimmons77](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/emsimmons77/32/8425_2.png) [@emsimmons77](https://forum.wixstudio.com/u/emsimmons77)\
**Post date:** [February 28, 2019, 9:39pm UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863/8 "2019-02-28T21:39:33Z")

</div>

@duncanmaguire hello thanks for replying. I did those step exactly. But my rating and " recommended " does not pull over.

---

<div class="post-metadata">

**Author:** ![eben-meyers](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/eben-meyers/32/1525_2.png) [@eben-meyers](https://forum.wixstudio.com/u/eben-meyers)\
**Post date:** [April 4, 2019, 3:39pm UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863/9 "2019-04-04T15:39:04Z")

</div>

@emsimmons77 Did you get any further with this?

---

<div class="post-metadata">

**Author:** ![millwards322](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/millwards322/32/13622_2.png) [@millwards322](https://forum.wixstudio.com/u/millwards322)\
**Post date:** [July 29, 2019, 9:48pm UTC](https://forum.wixstudio.com/t/review-and-rate-dynamic-pages/16863/10 "2019-07-29T21:48:00Z")

</div>

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
