New Example: Wix Stores Related Products

Hi,
I’m a beginner in Wix Code and I was wondering how I add more than 1 related products.I checked the tutorials and my related products are working, but I only have one of them and I would love to have three related products.
Can someone tell me what I have to add?This is the product part in my Javascript at the productpage right now:

// Find related products in the relationship collection by querying for related products in both relation directions. let relatedByTable = await Promise.all([ wixData.query(‘related-products’) .eq(‘productA’, productId) .include(‘productB’) .find(), wixData.query(‘related-products’) .eq(‘productB’, productId) .include(‘productA’) .find() ]); // Merge related products found from both sides of the relationship collection. let relatedProducts = [ …relatedByTable[0].items.map(_ => .productB), …relatedByTable[1].items.map( => _.productA) ];
Thank you.

Did you ever get an answer? I’d like to fix that too.

Did you ever get an answer? I’d like to fix that too.

@yhcmarketing no I never did. The only thing I can see different is in the wix editor part of the examples the navigation bar is set to off. Still working on it …

I’ve tried again to add related products by wix code and still do not work


please inform me what’s wrong and what can I do