i’m running a dropshipping store on shopify, dawn theme, where i get the products from 2 different suppliers who obviously ships separate.
I need to add a custom script to check the location.id for each product added into the cart, if the location id are different than i would like to show a notification to the customer saying ‘’ This order will be delivered with 2 separate shipping" so i though to write something like this :
{%- for item in cart.items -%}
{%- if location.id[i] != location.id[j]-%}
<div><h2>This order will be delivered with 2 separate shipping</h2></div>
{%- endif -%}
{%- endfor -%}
I’ve looked around but i did not find any solution regarding this matter. I think the above script should work, but i’m not sure at all (i’m skilled in php, js) but not in liquid.
Is there somebody who can help me to solve this matter?
Moreover, in which file should i add this script?
Thank you in advance