How can I hide the pick-up option for non-Edmonton customers?

How can I hide the pick-up option for non-Edmonton customers?

Anna_Wang1
Excursionist
72 1 4

hi everyone,

 I want to check the customer who are not in Edmonton, and if they are not in Edmonton, I can hide Pick-up in store option. but something was wrong. it couldn't work.

 

Capture.PNG

Replies 2 (2)

BradKrane
Shopify Partner
44 4 10

Use this as your in Edmonton test

is_customer_in_edmonton = Input.cart.shipping_address.city.upcase == 'EDMONTON' 

 

MichaelGeo
Pathfinder
194 3 17

Hi there!

 

If you want to hide "pick up" button from visitors who is not in Edmonton, you might want to set up location-specific content using GeoIP technologies. 

Here is one solution worth checking out: Geo Targetly, particularly, its GeoContent tool. It can help you simply show or hide buttons, forms, or other content based on your visitors' geolocations. The tool is easy to set up rules within a few steps. You don't need to code yourself. The tool will generate javascript code accordingly for you to add to your website.

 

Hope it helps!