Need City Selector or City Specific Market Upon Loading Website

Topic summary

A Shopify store owner needs customers to select their city upon website load because product availability varies by location due to shipping constraints for perishable items. All sales occur within one country.

Current Challenge:

  • Shopify Markets only supports country-level targeting, not city-level
  • Previously used Selecty app, but it’s limited to country selection
  • No native or plug-and-play solution found

Proposed Solutions:

Custom Implementation:

  • Build a popup using JavaScript with localStorage or cart.attributes to capture city selection
  • Show/hide products or collections based on user’s chosen city
  • Can be implemented with Liquid + JavaScript without major backend changes

Alternative Tools:

  • Geo Targetly (has free tier) combined with smart collection structuring
  • GeoIP Country Redirect apps that allow manual region setup
  • Hire Shopify developer for lightweight customization

One response included a code example for implementing a city selection popup, though the snippet wasn’t fully visible. The consensus is that a custom solution is needed since Shopify doesn’t natively support city-level market segmentation.

Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

Hello,

I need to find a way to implement a function on my Shopify store that forces customers to select a city upon loading the website.

I need this as I only sell in one country, but my products differ based on the city due to shipping constraints - these are sometimes perishable items which I can only ship in my local city.

Up until now I was able to use Selecty to force have a popup once the page loads, which asks you to select location, but it only works for countries because shopify markets are country specific. I was unable to find a way to narrow down to cities or create custom markets.

Does anyone have a solution to solve my problem? I couldn’t find an app to do this and I’m not quite sure if or how much a shopify expert would charge for this. I was hoping to find a “plug n play” or native solution.

Much appreciated in advance!

Shopify Markets doesn’t support city-level targeting out of the box, which makes things tricky for localized delivery. Since Selecty only works on a country level, you’ll likely need a custom solution with a bit of theme scripting.

The most straightforward way is to use a simple popup or banner at page load (using JavaScript or Shopify’s built-in cart.attributes or localStorage) where users select their city, then you show/hide products or collections based on that choice. It’s not as heavy as it sounds, a basic setup can be done with Liquid + JS and won’t require major backend changes.

If coding isn’t your thing, you could try apps like GeoIP Country Redirect (some allow manual region setup), or hire a Shopify dev for lightweight customization. One note: the app Geo Targetly has a free tier that might actually do the trick if you structure your city-specific collections smartly.

Hi,

Hope this will help

  • Create a City Selection Popup
  • Add Popup to Your Theme
    Code example

  • Show Products Based on City
  • Optional: You can redirect users to a city-specific collection page.
1 Like