Hi Everyone,
I’m looking for some advice. We are using the warehouse theme and the product recommendations You may also likehave never worked properly from the beginning.
We would like to display the related products in the same way as the CORRECT example below. I’ve attached the code and hopefully, it will be simple to fix.
CORRECT DISPLAY!
WRONG DISPLAY - as the You may also like shows unrelated products
The code is for the product-recommendations.liquid
{%- capture section_settings -%}
{
"stackable": false,
"layout": "vertical",
"productId": {{ product.id | json }},
"useRecommendations": {% if product.metafields.sf_related_products.enabled == 1 %}false{% else %}true{% endif %},
"recommendationsCount": 10
}
{%- endcapture -%}
{%- if section.settings.show_product_recommendations -%}
{%- endif -%}
{% schema %}
{
"name": "Product recommendations",
"settings": [
{
"type": "checkbox",
"id": "show_product_recommendations",
"label": "Show dynamic recommendations",
"info": "Dynamic recommendations change and improve with time. [Learn more](https://help.shopify.com/en/themes/development/recommended-products)",
"default": true
},
{
"type": "text",
"id": "heading",
"label": "Heading",
"default": "You may also like"
},
{
"type": "checkbox",
"id": "show_quick_buy",
"label": "Show quick buy",
"default": false
}
]
}
{% endschema %}
If you can help me fix this, I’d be happy to connect up.
Thanks, Dave