{"id":9242,"date":"2018-11-27T19:55:59","date_gmt":"2018-11-27T19:55:59","guid":{"rendered":"https:\/\/www.mageworx.com\/blog\/?p=9242"},"modified":"2022-03-23T08:46:50","modified_gmt":"2022-03-23T08:46:50","slug":"how-to-set-up-shipping-for-alphanumeric-postcodes-in-magento-2","status":"publish","type":"post","link":"https:\/\/www.mageworx.com\/blog\/how-to-set-up-shipping-for-alphanumeric-postcodes-in-magento-2","title":{"rendered":"How to Set Up Shipping for Alphanumeric Postcodes in Magento 2?"},"content":{"rendered":"\n<!-- SEO Ultimate (http:\/\/www.seodesignsolutions.com\/wordpress-seo\/) - Code Inserter module -->\n<!-- Google Tag Manager (noscript) -->\r\n<noscript><iframe src=\"https:\/\/www.googletagmanager.com\/ns.html?id=GTM-5DTCW7B8\"\r\nheight=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"><\/iframe><\/noscript>\r\n<!-- End Google Tag Manager (noscript) -->\n<!-- \/SEO Ultimate -->\n\n<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><p>When it comes to arranging shipping to\/within the United Kingdom, the Netherlands, Canada, or the Republic of Ireland \u2013 i.e. countries with alphanumeric zip codes \u2013their validation can become a predicament in Magento 2. As a result, you will be unable to configure shipping rates and rules conditions correctly.<br \/>\nLet\u2019s learn more about alphanumeric postal codes validation, and how <a href=\"https:\/\/www.mageworx.com\/magento-2-shipping-suite.html\" target=\"_blank\" rel=\"noopener noreferrer\">Shipping Suite Ultimate<\/a> <span style=\"font-weight: 400;\">by MageWorx <\/span>helps deal with it.<\/p>\n<h2>What are alphanumeric zip codes?<\/h2>\n<p>The majority of postal code systems are numeric, i.e.,<span style=\"font-weight: 400;\">&nbsp;made of digits.&nbsp;<\/span>Alphanumeric postal codes use both letters and digits, and normally encode many more locations than numeric postcodes. This happens because such zip codes are assigned to smaller and more specific locations,&nbsp;<span style=\"font-weight: 400;\">such as blocks, for instance.<\/span><br \/>\nTake a look at this explanation of Canadian alphanumeric postal codes by a Quora user, to have a better idea:<\/p>\n<p><!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9244 aligncenter\" src=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Quora_-canada.jpg\" alt=\"Canadian alphanumeric postal codes\" width=\"663\" height=\"430\" srcset=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Quora_-canada.jpg 663w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Quora_-canada-600x389.jpg 600w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/p>\n<p>According to <a href=\"https:\/\/en.wikipedia.org\/wiki\/Postal_code\" target=\"_blank\" rel=\"noopener noreferrer\">Wikipedia<\/a>, there are currently 11 locations that use alphanumeric zip codes: Argentina, Brunei, Canada, Ireland, Kazakhstan, Malta, the Netherlands, Peru, Somalia, the United Kingdom, and Swaziland. Thus, if your Magento 2 store does business with\/within these locations, make sure to dwell on.<\/p>\n<h2>How does Magento 2 postcode validation work by default?<\/h2>\n<p>By default, during the process of postcode validation, Magento 2 compares each one-digit postcode number\/letter with the ones entered in the backend settings, i.e. the elements are analyzed one-by-one. As a result, when it\u2019s required to view the elements as a group, inaccuracy will occur. If we conventionalize the process of postcode validation, this is how it&#8217;ll look like by default:<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9243 aligncenter\" src=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/1200\u04455002-1200x500.png\" alt=\"How to deal with alphanumeric zip codes in Magento? | MageWorx blog\" width=\"1200\" height=\"500\" srcset=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/1200\u04455002.png 1200w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/1200\u04455002-600x250.png 600w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/1200\u04455002-768x320.png 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><br \/>\nWhat can be done to deal with such limitations?<\/h2>\n<p><a href=\"https:\/\/www.mageworx.com\/magento-2-shipping-suite.html\" target=\"_blank\" rel=\"noopener noreferrer\">Shipping Suite Ultimate<\/a> offers the possibility to expand the default functionality by grouping postcode elements.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-9246 alignleft\" src=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/postcode.gif\" alt=\"Alphanumeric postal codes\" width=\"262\" height=\"140\"><\/p>\n<p>This will allow comparing them within the specified sections, <strong>rather than&nbsp;<\/strong>one-by-one. In the example picture offered on the left, you see a Scottish postcode. The extension will check the letters specified in the area section first. If it coincides with the shipping settings you\u2019ve entered, then the verification process will move further to the district section, and so on. Surely, the configuration process is more advanced as numerous combinations happen to be.<\/p>\n<h2>How to set up alphanumeric postcodes in Shipping Suite Ultimate?<\/h2>\n<p><a href=\"https:\/\/www.mageworx.com\/magento-2-shipping-suite.html\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-9245\" src=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/03-Shipping-Suite2-2-600x600.png\" alt=\"Shipping Suite ultimate Magento 2 | MageWorx Blog\" width=\"207\" height=\"207\" srcset=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/03-Shipping-Suite2-2-600x600.png 600w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/03-Shipping-Suite2-2-65x65.png 65w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/03-Shipping-Suite2-2.png 650w\" sizes=\"auto, (max-width: 207px) 100vw, 207px\" \/><\/a><\/p>\n<p>By default, the functionality is disabled. This is done to avoid automatic unexpected changes in logic that may occur after the installation\/update of the extension.<\/p>\n<p>To enable Shipping Suite in your Admin Panel, go to <em>Stores &gt;<\/em>&nbsp;<em>Configuration<\/em>&nbsp;<em>&gt;<\/em> <em>MageWorx<\/em>&nbsp;<em>&gt;<\/em> <em>Shipping Suite&nbsp;&gt; Validation Settings<\/em>. You\u2019ll see the<em> Advanced Postcode Validation: Is Enabled<\/em> tab. After you select \u2018yes\u2019, you\u2019ll be able to set and divide postcodes into groups.<\/p>\n<p>The <em>Advanced Postcode Validation: excessive data means postcode is valid<\/em> tab allows defining how postcodes with a different number of elements will be handled. When enabled, the specific parts of postcodes get to be used during the validation process. For example, you may want to set only area code to cover all the locations within it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-9259 aligncenter\" src=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/backend-setting-of-alphanumeric-zip-codes-1200x678.jpg\" alt=\"Alphanumeric zip codes in Magento 2 | Shipping Suite Ultimate\" width=\"1200\" height=\"678\" srcset=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/backend-setting-of-alphanumeric-zip-codes-1200x678.jpg 1200w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/backend-setting-of-alphanumeric-zip-codes-600x339.jpg 600w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/backend-setting-of-alphanumeric-zip-codes-768x434.jpg 768w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/backend-setting-of-alphanumeric-zip-codes.jpg 1288w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><br \/>\nIf you wish to enable advanced conditions for alphanumeric postcodes when setting rules conditions, make sure to select \u2018yes\u2019 in the <em>Enable advanced conditions for United Kingdom postcodes validation<\/em> tab.<\/p>\n<p><span style=\"font-weight: 400;\">Oh, don\u2019t forget to clear your cache after making any changes. As obvious as it might sound, this step is often omitted by the Store Admins when configuring the extension:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-9253\" src=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Screenshot_14-1200x229.jpg\" alt=\"clear cache after configuring Shipping Suite Ultimate\" width=\"1200\" height=\"229\" srcset=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Screenshot_14-1200x229.jpg 1200w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Screenshot_14-600x115.jpg 600w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Screenshot_14-768x147.jpg 768w, https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Screenshot_14.jpg 1895w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><br style=\"font-weight: 400;\">Take a look at this brief video guide to have a better idea about this small yet critical for correct shipping settings functionality:<\/p>\n<div style=\"width: 696px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-9242-1\" width=\"696\" height=\"392\" autoplay preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Aplhanumeric-zip-codes.mp4?_=1\" \/><a href=\"https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Aplhanumeric-zip-codes.mp4\">https:\/\/www.mageworx.com\/blog\/wp-content\/uploads\/2018\/11\/Aplhanumeric-zip-codes.mp4<\/a><\/video><\/div>\n<h2><\/h2>\n<h2>Bottom Line<\/h2>\n<p>As many as 11 countries currently have alphanumeric postcodes. Their correct validation and set up are critical for Magento 2-based sites that are doing business within those locations or ship to them. This process can be made easy, accurate and error-free with the help of MageWorx Shipping Suite Ultimate.<\/p>\n<p style=\"text-align: center;\">***<\/p>\n<p style=\"text-align: center;\"><em><strong>In case you\u2019ve got any suggestions or thoughts about this article, feel free to leave a comment below.<\/strong><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 3<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>When it comes to arranging shipping to\/within the United Kingdom, the Netherlands, Canada, or the Republic of Ireland \u2013 i.e. countries with alphanumeric zip codes \u2013their validation can become a predicament in Magento 2. As a result, you will be unable to configure shipping rates and rules conditions correctly. Let\u2019s learn more about alphanumeric postal [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":10247,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[255,426],"tags":[397],"class_list":{"0":"post-9242","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-magento-2","8":"category-extensions-tips-and-tricks","9":"tag-shipping-suite-ultimate"},"_links":{"self":[{"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/posts\/9242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/comments?post=9242"}],"version-history":[{"count":22,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/posts\/9242\/revisions"}],"predecessor-version":[{"id":15594,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/posts\/9242\/revisions\/15594"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/media\/10247"}],"wp:attachment":[{"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/media?parent=9242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/categories?post=9242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mageworx.com\/blog\/wp-json\/wp\/v2\/tags?post=9242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}