Hi Partners!
I have been trying to build reviews for the Wix store for one of my clients using the Dev Mode and the template provided by Wix here https://support.wix.com/en/article/corvid-tutorial-adding-ratings-and-reviews-to-a-wix-stores-site#step-2-set-up-the-shop-product-page
I’ve followed everything step by step, but I’m stuck. All functions work, except for the product ID. It’s not picking it up when a customer submits a review, so the reviews are not displayed on the website at all. If you go to the backend and manually select a particular product for the Product column then the review is displayed on the correct page. However, it should happen automatically, as soon as the customer submits the review if the code is correct.
I’ve copied and pasted the example code from the template that has been provided and made sure all elements have the same names as on the template, so they correspond on the code. Yet, I get an error “TypeError: Cannot read property ‘productId’ of undefined”. Funny enough, same error shows up on the example template.
I was able to do this whole thing on my own website where I had the same issue with not picking up the productId. Then I added SKUs to my products and it worked. On my client’s website however, there were SKUs already and even after updating them the issue persists.
I am not a coder and definitely don’t know the first thing about JavaScript, but I really want to make this work. Can anyone please help?