Found this page to create a related items section on the product page and for some reason no matter what I do nothing is working. Im not sure if it is the code or something to do with the page setup.
Update: it is now working but only the first item in the repeater shows and the others just show the place holder information.
Anyone know how to have a ID name repeat?
hi,
Make sure that there are, in fact, more than 1 related products.
You can do so by adding a console log to the loadRelatedProducts function:
//...
if (relatedProductResults[0].length > 0)
console.log(relatedProductResults[0].length); //add this line
showRelatedProducts(relatedProductResults[0]);
else
showRelatedProducts(relatedProductResults[1]);
//...
I’m having trouble with getting related products to change when I select one. Say I select Product 1 in the store, and Products 2-4 have been related. If i click Product 2, it takes me to that page and then I get Products 2-4 as related again. I have tried playing around with the database with no change.
i have the same problem,could you fix this ?
Can you tell me how you fix the code? My code is not working, dont show me anything. I follow the instructions of the tutorial. Thanks!!