Free Local Shipping

Shopify Partner
9 0 1

Hi there,

I'm building a site for a new client and have a challenge regarding delivery.

The client intends to charge a set rate for delivery to anywhere in the UK, but also offer free delivery within a 25 mile radius of Southampton.

It would be easy to give a free option and label it something like "Only select if you're within 25 miles of Southampton" but inevitably people would select this option even if they weren't in this area and it would just cause my client a massive headache.

What I need to be able to (somehow) is only show that free delivery option to people within certain postcodes.

I'm thinking I may be able to hide the free delivery option, then check the postcode using jQuery (i.e. if postcode equals 'SO40' OR 'SO41' OR 'SO42' for example) and if the postcode matches, display the free delivery option.

Normally I think this may be do-able but with the restrictions on Shopify's checkout this may be an issue.

I'd love to stick with Shopify rather than going over to the dark side, but really need to find a solution for this one.

Any ideas, help or suggestions would be massively appreciated.

Thanks in advance,


Shopify Staff (Retired)
Shopify Staff (Retired)
43 0 2

Hello Tom, 

I am Dumitro, a Support Guru with Shopify and I would be happy to shed some light on generating these kinds of shopping rates.

It's true that the manual shipping rates in Shopify wont allow for delivery option to people within certain postcodes. For this kind of feature, you would need to use an app like: 

- [Better Shipping](
- [Advanced Shipping Manager for Shopify](



Have a great day, Dumitro R. Support Guru Shopify
Shopify Partner
19 0 7

Are you on Shopify Plus? If so, you could achieve this with a javascript loop. I developed a similar solution to a different use case, but it could easily be updated for your needs by checking the shipping zip code instead of the cart attribute (as it's coded now).

Check out the the snippet I created called "iao-checkout-shipping-method.liquid" here.

Basic concepts:

Create a hidden span or other element with the checkout liquid object you want to access, {{ }} in your case. 

In javascript, get that element's text content, use it in a variable to check against list of zip codes, then loop through the shipping method page elements to either hide the free option if false, or hide the paid option if true.

However, if you don't have access to add the snippet to your checkout.liquid file, I don't know of an alternative other than maybe some kind of app. But the reason I went to this trouble is because I didn't want to use an app or I couldn't find an app that had the functionality I needed for a decent price.