top of page

Add Comment Section to WIX Dynamic Page🔥

Use wix example to display and collect comments from your dynamic page.

Apr 10, 2022

1 min read

“Learn as if you will live forever, live like you will die tomorrow.” — Mahatma Gandhi

Ever wanted to collect user information through a comment area but can't? Then this tutorial is for you.


I will briefly list the steps I followed to make this work from an already existing tutorial from WIX Examples.


  1. Visited the WIX example and clicked on "Edit Now"

  2. Navigated to the "Product Page" and copied all comment sections from the strip into my website's dynamic page as it is.

  3. Enabled the "Dev Mode" on the example template and copied the code as it is.

  4. Pasted the code from the example template into my website's dynamic page code section.

  5. Opened the lightbox section (Review Box) from the example template and copied the box element to my website.

  6. Opened the code panel section from the lightbox on the example template and copied the code to my lightbox code section.

  7. Created two database collections with exactly the same fields and fieldkeys

    1. review-states - To store number of ratings, recommendations

    2. reviews - To store total number of reviews for each item

  8. Connected all elements to dataset

  9. Adjusted one line of code


FROM THIS

product = await $w('#productPage1').getProduct();


TO THIS

product = await $w('#dynamicDataset').getCurrentItem();




📺 WATCH THE VIDEO

COPY CODE BELOW 👇🏽



Tags: wix comments Comment section User Interaction Fieldkey WIX Data Velo by Wix

PREVIOUS

NEXT

bottom of page