How it works
Last updated
Last updated
If you have a newer Shopify theme compatible with app blocks (any public theme version after March 2023), you can add the Geolocation Button app block directly to your header or footer using section groups.
To add the Geolocation Button, go to the Shopify Theme Editor, navigate to your desired section (header or footer), and insert the app block directly.
However, many themes are not compatible with adding app blocks in a section that appears in all your theme pages (like the header or the footer sections).
If that is your case, follow this tutorial:
Here’s how to do it:
Edit your theme: Go to Online Store > Themes > Edit code in your Shopify admin.
Check your sections folder. Look for a section in this folder called apps.liquid
. If it does not exist, create the file and insert this code:
Create a new file. Insert a new file in the sections
folder with the name: app-group.json
. And insert this code:
Edit theme.liquid. Go the theme.liquid file and insert this after closing the <body>
tag or after the section header
/ section footer
.
Theme Editor. Click on "Customize" your theme, and you will see a new section called Apps
only for adding app blocks to your installed apps.
The Geolocation Button can open either the Geolocation Popup or the Market Selector modal.
To ensure the Geolocation Button works properly, you need to enable the correct app embed based on your selected option. Otherwise, the button will not function as expected. Follow these steps to set it up:
If you choose the Geolocation Popup, make sure the Geolocation Popup
app embed is enabled.
If you select the Market Selector modal, ensure the Market Selector
app embed is enabled with the Modal option selected.
This setup is essential for the button to display the correct selector when clicked.