So, this is a very strange issue happening in my theme’s product-recommendations.liquid
recommendations.performed is returning false and recommendations.products_count is returning 0. With this, the section cannot load any recommended products in the products page. So, naturally I think that something is going wrong with the data-url of product-recommendations:
<product-recommendations class="product-recommendations page-width"
data-url="{{ routes.product_recommendations_url }}?section_id={{ section.id }}&product_id={{ product.id }}&limit=4">
I’m guessing this is returning null and that’s why recommendation.performed is returning false. However, something strange is that, when I’m in Editor mode and I go to product recommendation, by default is not showing anything, recommendations.performed is false and recommendations.products_count is 0. However, when I hide the section and make it appear once again, product recommendation now works and I can see the products being recommended, recommendations.performed is true and recommendations.products_count is 4
is their any solution how solve this issue