A space to discuss online store customization, theme development, and Liquid templating.
One of my clients is looking a way to show inventory to customers based on their location. Consider this for example - I have a shopify store and have warehouse in three different countries(Australia, India, United Kingdom) with different inventory. I can get customers location using their IP address and based on that I would like to show inventory from the warehouse which is close to them. If a customer from Australia visits my store, I would like to show inventory stock from Australia warehouse and orders should be shipped from Australia warehouse, Likewise customers from India will see inventory stock available in India and their orders will be shippied from warehouse located in India. Is there any possibility of doing it?
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
@anish_soni wrote:
I don't want different domains for three stores. I want to have one domain
and three locations inside one domain.
...
Is there a way?
@PaulNewton wrote:
- One domain inventory locations, using an app to expose the information to the front end
Just tie together with geoip library,service,app,proxy-app or custom app as currently locations are not exposed in liquid.
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
Hi Paul
Would you please be able to elaborate the detail on this, as i need this exactly.
I am working and based out of New Zealand but will be launching in the UK soon via a fulfilment company. I have added in the UK as a location which is great, but what do i need to add and do to ensure customers from the UK are only seeing the products available on the UK inventory.
I am happy to get a separate domain if required, but would prefer an app to handle all of this. Are you able to tell me step by step?
@Littlepom16 inventory.locations are not supported in liquid so you have to have app support or other workarounds
Step by step for something with that many moving parts costs time and money.
https://shopify.dev/docs/admin-api/rest/reference/inventory
https://shopify.dev/tutorials/display-dynamic-store-data-with-app-proxies
An appless method is to tag all products with "UK" or "__UK"(to hide tag in supporting themes),
Customize your theme so all purchase actions are disabled by default,
then just use a frontend geoip service using javascript to estimate if the customers are in the UK and enable purchase actions , otherwise for any outside the UK keep it disabled.
On the backend you'd want to get some order validation for any orders outside the UK to be rejected just in case some still come in if the theme has an issue.
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
I believe you have to have some faith here that Shopify has your back. They know where your clients are coming from, and they know your inventory. So when they propose things to clients, they automatically recommend things that make sense. In other words, they setup an order where you get to fulfill from the locations that make sense. So when Shopify presented a shipping rate to a customer in AUS, they knew you had stock there, and collecting prices appropriate to that. You get the final call, but most of the internal work of routing inventory is being done by Shopify, since that would be a nightmare to offload onto external systems.
Just a guess but it is likely that soon you might even be able to use that to hide inventory from places that are running on empty stock. I imagine they will offer you a checkbox for the inventory that is "stop selling this product to those places when stock runs out", where you can group your places using Shipping profiles. Just a guess. Patience!
@HunkyBill wrote:I believe you have to have some faith here that Shopify has your back. They know where your clients are coming from, and they know your inventory. So when they propose things to clients, they automatically recommend things that make sense. In other words, they setup an order where you get to fulfill from the locations that make sense. So when Shopify presented a shipping rate to a customer in AUS, they knew you had stock there, and collecting prices appropriate to that. You get the final call, but most of the internal work of routing inventory is being done by Shopify, since that would be a nightmare to offload onto external systems.
Just a guess but it is likely that soon you might even be able to use that to hide inventory from places that are running on empty stock. I imagine they will offer you a checkbox for the inventory that is "stop selling this product to those places when stock runs out", where you can group your places using Shipping profiles. Just a guess. Patience!
Thanks @HunkyBill is it possible to hire a shopify expert to do all this for me? I agree in theory it should handle it since i can split out the inventory to show what is available in each country, i just want this to show to the customer in each location, rather than given them the option to purchase products only in stock in a different country.
I have no idea how to do it so i think its easier if i can hire someone to do it for me.
Well, as Paul mentioned, a simple approach would be to set up a private App in your store that would act as a Proxy. When visiting any product page, the Proxy would receive a callback with the customer locale via IP lookup, and the product ID. With that, you could use the private App to open up the inventory for the product and match the levels to the country closest to the IP. Report that level back to the customer.
That is service App developers like we provide, but be aware that even trivial ones like this take hours to set up and deploy due to the interactions needed between the cloud, security, and the pattern itself. No 5-minute fix here. You have to understand, in the beginning, Shopify indeed exposed all inventory levels, and that led to competitors scraping inventory levels and war! So now inventory levels by default remain hidden, and exposing them is more of a chore. Perhaps there is an easy hack with Storefront API to exposing them. Anyway, it is possible.