The product I am selling has 3 "Shipping from" variants which are China, US, and UK. I would prefer if the customer did not have to select the proper shipping method so I'm wondering if the "Shipping from" variant can be hidden and auto-selected based on if the customer is from US or UK, any other country would auto-select to shipping from China.
Here is the product variant I'd like to hide from the product page and auto-select based on customer location:
Hope someone can help, thanks!
Unfortunately, Shopify doesn't give easy access to a customer's location info. There are several geolocation apps in the app store, but many of them are based around redirects. Even with one of those apps (provided it gave the information you needed), it would require a fair bit of coding. I've built out similar functionality in the past, feel free to message if you have any questions.
Hi there, here is one GeoIP solution worth checking out: Geo Targetly.
Particularly, its GEOLocation API.
It can identify your website visitors' locations, like country using IPs, and autofill, or auto-select form elements like shipping country, shipping address, etc with your visitors' geolocation data. For example, if you visitor is from UK, with such API, it could simply auto select UK from your shipping location drop-downs.
Hope it helps!