Geolocation app - API

StephenK
Shopify Partner
55 4 26

If jQuery is being loaded after this snippet of code it might not work.

Say if your snippet is in the middle of a template and jQuery is loaded just before the </body> tag

Some Shopify/Ecommerce related articles - https://medium.com/@stephenkeable
0 Likes
Lassepappa
New Member
7 0 0

Hi!  Im not loading jQuery, I thought this was a native function for shopify and that shopify loads jQuery.

Iam running trhis snippet just before </body> in the theme.liquid file.

Shoiuld o load something like <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

in head?

Do I need geolocation app for this to work?

 

Kindly / Lasse

 

 

0 Likes
StephenK
Shopify Partner
55 4 26

What's your store URL, that's probably the easiest thing to do here?

Some Shopify/Ecommerce related articles - https://medium.com/@stephenkeable
0 Likes
Lassepappa
New Member
7 0 0

the function is not live as i have not gotten it to work yet.

0 Likes
Tom13
Shopify Partner
9 0 1

Hi StephenK,

Thanks for sharing the instructions and information. It's been a big help. 

The screenshot below was taken from the Geolocation app page, developed by Shopify.

Are you (or anyone here) able to turn on the "change shipping country" option? Can it even be done?

I was thinking of the following use case;

  1. Show a popup like in the screenshot
  2. Depending on the shipping country selected, direct the customer to the corresponding expansion store
  3. Things such as "Inventory", "Pages" etc. will be configured differently in each expansion store thereby achieving the localisation we need.

 

ECEAE=.jpg

Thank you in advance. Cheers! 

0 Likes
StephenK
Shopify Partner
55 4 26

I'm not sure the Geolocation app is designed for the expansion stores method of internationalisation I think it's more for the single site that has multiple shipping countries and languages set up in the settings.

If you have expansion stores I would assume you are on Plus and should be able to contact the Shopify Plus Specialists to help decide the best approach.

Some Shopify/Ecommerce related articles - https://medium.com/@stephenkeable
0 Likes
Tom13
Shopify Partner
9 0 1

I am sorry to say that the Plus specialist hasn't been helpful in this area

At the same time, I am quite paranoid that I may have missed some settings that caused some options in the Geolocation app to not show. 

So let's say for a single site that has multiple shipping countries set, how does it help in language and currency localisation using the Geolocation app?

I have tried to include more shipping countries under Settings > Shipping and delivery > Shipping > manage rates. But, nothing special showed up like the one shared in the screenshot by Shopify.

Hoping that my paranoia to be untrue and that the community can help verify.

0 Likes
StephenK
Shopify Partner
55 4 26

The geolocation app will show you a preview of how the app will appear to users.

However when you visit your store it will likely not show as I assume you are in the same country as your store. Unless you try using a VPN to test it.

Have you read through the docs for the app here - https://help.shopify.com/en/manual/cross-border/geolocation

Some Shopify/Ecommerce related articles - https://medium.com/@stephenkeable
Tom13
Shopify Partner
9 0 1

You brought up a good point. Will test with VPN. 

While reading the docs again, I think the session may have confused me.

As quoted, “After a recommendation for a different country or region is accepted or dismissed, your customer won't see another recommendation in your store for 14 days. This wait time is reset if the customer clears their cookies.”

 

Will test that too and update here if I see anything different.