I'm referring to the following guide: https://support.wix.com/en/article/corvid-adding-a-related-products-area-to-a-wix-store-product-page
I've implemented this and it is "working". I put working in quotes because it's not working exactly as one would expect: when you click one of the related products, the related products list doesn't change even though the clicked product does load.
Only when I manually refresh the page will the related products list change.
The guide puts all of its code in the onReady state for the page. How do I make it so that the related products list is refreshed when one of the products in the list is clicked?