[Skip to main content](#vessel-content)

#   UK Postcode Parsing and Range Checking

##

- **[bonzomedia](/forum/user/1859-bonzomedia "View bonzomedia's Profile")**
- [![bonzomedia's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1859-bonzomedia "View bonzomedia's Profile") Topic Author
- [ Offline](/forum/user/1859-bonzomedia)

Less More

- Posts: 131
- Thank you received: 7
-
-

10 years 8 months ago -  10 years 8 months ago [\#232236](#232236) by [bonzomedia](/forum/user/1859-bonzomedia "View bonzomedia's Profile")  *[UK Postcode Parsing and Range Checking](/forum/28-shipping-methods/882819-uk-postcode-parsing-and-range-checking#232236 "Need to restrict a shipping method using a UK postcode range?  I just wanted to thoroughly recommend Brainforge's Manual Shipping Plugin.  I came to the conclusion that the standard Hikashop Manual Shipping Plugin will not work if you want to restrict the method to the first part of a UK postcode as it takes the whole number after the prefix as the min and max range, it's because of the way that UK postcodes are structured  For example: SP119FG - there's no way to split away the SP11 away from the rest of the postcode string. Using simply SP11 as the prefix with no min and max doesn't work.  So, fortunately, I came across Jonathan's work here:-   brainforge.co.uk/downloads/hikashop-deli.../3-brainforge-manual  It has a specific UK postcode parser which works beautifully, and in fact, will even accept a PCRE regex for complex, multi postcode range checking.  It works beautifully, thanks, Jonathan.  &#91;NOTE&#93; One minor gotcha is that when you install the plugin you will need to enable the Postcode Format to UK Special in the plugin Optional Features.")* was created by *[bonzomedia](/forum/user/1859-bonzomedia "View bonzomedia's Profile")*

Need to restrict a shipping method using a UK postcode range?

I just wanted to thoroughly recommend Brainforge's Manual Shipping Plugin.

I came to the conclusion that the standard Hikashop Manual Shipping Plugin will not work if you want to restrict the method to the first part of a UK postcode as it takes the whole number after the prefix as the min and max range, it's because of the way that UK postcodes are structured

For example: SP119FG - there's no way to split away the SP11 away from the rest of the postcode string.
Using simply SP11 as the prefix with no min and max doesn't work.

So, fortunately, I came across Jonathan's work here:- [ brainforge.co.uk/downloads/hikashop-deli.../3-brainforge-manual](http://brainforge.co.uk/downloads/hikashop-delivery-date-plug-ins/product/3-brainforge-manual)

It has a specific UK postcode parser which works beautifully, and in fact, will even accept a PCRE regex for complex, multi postcode range checking.

It works beautifully, thanks, Jonathan.

[NOTE] One minor gotcha is that when you install the plugin you will need to enable the Postcode Format to UK Special in the plugin Optional Features.

Last edit: 10 years 8 months ago by [bonzomedia](/forum/user/1859-bonzomedia "View bonzomedia's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODgyODE5LXVrLXBvc3Rjb2RlLXBhcnNpbmctYW5kLXJhbmdlLWNoZWNraW5nP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.075 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
