Hi all!
I'm trying to display ratings on this dynamic page:
https://www.grahameschocolateguide.com/Chocolatiers/Acalli
I've been following these instructions:
https://support.wix.com/en/article/wix-code-tutorial-capturing-and-displaying-ratings
I've added the code and made the substitutions.
But it does not seem to be working.
What did I do wrong? : )
Thanks in advance.
To add to Yisrael's comments above, you can see more about onReady for a dataset here.
https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#onReady
Plus the dataset id name should always begin with a lowercase and not a capital/uppercase letter, which you can find the id name either by hovering over the dataset icon on your page or looking in the properties panel for the dataset itself.
$w.onReady( () => { $w("#myDataset").onReady( () => {
As shown clearly in the tutorial that was linked in the original post. https://support.wix.com/en/article/corvid-tutorial-capturing-and-displaying-ratings#adding-the-code
$w("#dataset1").onReady(() => { // get the current item from the dataset const currentItem = $w("#dataset1").getCurrentItem();
This post is also from 2018 and is being closed.
Please add a new post to this forum rather than bumping up an old thread from 2018, add a link to refer back to this old post from 2018 if needed.
Can you assist me as well? I am trying to do the same thing on this link:
Gluten Free Socialite
But I am getting a parsing error as well. I am trying to connect it to the dataset "Products" and changed it on the code as instructed, but the wix code is giving me the error that '#Products' is not a valid selector.
Dear Yisrael,
Thanks so much for your help!!!
Here's how it looks now:
https://www.grahameschocolateguide.com/Chocolatiers/Acalli
Probably still not yet correct, but hopefully closer?
Josh
P.S. I tried the "Reviews Example" link you sent, but it does not seem to be working at the moment.
You have a number of errors. Here is a screen shot of your code panel for the dynamic page:
You have a number of lines in the code that are simply numbers. No only don't they do anything, but they are do not constitute valid Wix Code.
You already have an onReady() function for your dataset in the page's onReady(). The second one in the ratingsInput1_change() function is not needed and invalid. Furthermore, you can see that you have a parsing error due to missing quote marks (") and an incorrect name of the dataset. If it was needed (and it isn't) the line should be:
$w(#DynamicDataset).onReady(() => {
You will need to clean up the syntax and logic errors.
You can see the Reviews example for more information.