can you access product location using liquid

Highlighted
New Member
1 0 0

I am wanting to convert my store over to using locations in shopify. One feature I would like to have on the product page is a message based off the items location. For example, if the item is listed at location "seattle", a message could read saying "This item ships from seattle". 

I have searched through many different questions and blogs but have not been able to find the liquid syntax (if it exists) to filter to the warehouse location for the product. I did find something regarding order.location which was close in concept, but not quite what I need. Does this exist, and if so, what would it look like? 

0 Likes
Highlighted
Shopify Partner
1866 181 748

Hi,

Unfortunately there is nothing within the Shopify Liquid object model present in themes that would let you return the product variants' inventory location. Neither does any query object exist withing the Storefront API that might enable implementing this requirement.

That said, it would be possible to develop such a feature and use app proxies to feed back in to the theme. But as you may have guessed, that requires bespoke development that not all of us are able to perform or afford.

I cannot tell for sure, but maybe there'd already be an existing app that does this - personally I shy away from such and don't know the apps available in order to suggest or recommend any objectively.

Hope this helps!

 

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes
Highlighted
Shopify Partner
154 4 27
Hi,

I created an app to display inventory locations on the frontend, maybe it is helpful for your usecase

You can try it for free: https://inventorylocations.checkmyapp.net

more info:

https://community.shopify.com/c/Shopify-Discussion/Multiple-Warehouse-Inventory/m-p/488417/highlight...
1 Like
Highlighted
Shopify Partner
26 2 4

Hey There !!

 

Now you have: {{ variant.store_availabilities }} on variants ! Really helpfull

 

{%- assign pick_up_availabilities = variant.store_availabilities | where: 'pick_up_enabled', true -%}

{% for pickup in pick_up_availabilities %}
  {{ forloop.index }}
  {{ pickup.available }}
  {{ pickup.location.address }}
  {{ pickup.location.name }}
{% endfor %}

Let us help you - Tranzistor.tech
1 Like