Hello Everybody!
New to Shopify and liquid code.
I would like to add a custom Liquid section on my product page to display my estimated delivery times.
I would like it to show based on my own stock but also my suppliers stock (variant-metafield).
From looking around many forums I been trying to make some code without a lot of luck.
{% if product.variants.first.inventory_management == "shopify" %}
{% comment %} More than 5 in stock {% endcomment %}
{% if product.variants.first.inventory_quantity > 5 %}
På lager – 1-2 dage leveringstid.
{% comment %} 1 or less than 1 {% endcomment %}
{% elsif product.variants.first.inventory_quantity <= 1 and product.variants.first.metafields.custom.leverand_r_lager == "Fjernlager" %}
{% comment %} More than 10 in stock {% endcomment %}
{% if product.variants.first.inventory_quantity > 10 %}
In Stock - Delivery time: 4-5 days.
{% comment %} Less than 10 in stock {% endcomment %}
{% elsif product.variants.first.inventory_quantity <= 10 %}
Soldout - Ask for delivery time
{% endif %}
{% endif %}
{% endif %}
Does anybody have any advice or suggestions to make it work? Would be much appriciated