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

#   Manual Shipping - how to select only one match

##

- **[tdilkie](/forum/user/12002-tdilkie "View tdilkie's Profile")**
- [![tdilkie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/bike_skid.png)](/forum/user/12002-tdilkie "View tdilkie's Profile") Topic Author
- [ Offline](/forum/user/12002-tdilkie)

Less More

- Posts: 6
- Thank you received: 0
-
-

13 years 11 months ago [\#79322](#79322) by [tdilkie](/forum/user/12002-tdilkie "View tdilkie's Profile")  *[Manual Shipping - how to select only one match](/forum/2-general-talk-about-hikashop/76256-manual-shipping-how-to-select-only-one-match#79322 "Is there a way, in the manual shipping plugin, so that only the 1st valid shipping price is displayed, not all matching prices?  I want to provide special local shipping pricing, based on the postal code. I've added a method (see attached) to filter on the postal code. That method is first on the list, however the plugin still selects and shows all the matching methods (see the other attached image)  thanks Trent")* was created by *[tdilkie](/forum/user/12002-tdilkie "View tdilkie's Profile")*

Is there a way, in the manual shipping plugin, so that only the 1st valid shipping price is displayed, not all matching prices?

I want to provide special local shipping pricing, based on the postal code. I've added a method (see attached) to filter on the postal code. That method is first on the list, however the plugin still selects and shows all the matching methods (see the other attached image)

thanks
Trent

[ ![shipping-methods-backend.jpg](/forum/attachment/7241) ](/forum/attachment/7241 "...ds-backend.jpg")

[ ![shipping-multiple-selections.jpg](/forum/attachment/7242) ](/forum/attachment/7242 "...selections.jpg")

- [ ![shipping-methods-backend.jpg](/forum/attachment/7241) ](/forum/attachment/7241 "...ds-backend.jpg") [ ](/forum/attachment/7241?download=1 "...ds-backend.jpg")
- [ ![shipping-multiple-selections.jpg](/forum/attachment/7242) ](/forum/attachment/7242 "...selections.jpg") [ ](/forum/attachment/7242?download=1 "...selections.jpg")

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#79382](#79382) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Manual Shipping - how to select only one match](/forum/2-general-talk-about-hikashop/76256-manual-shipping-how-to-select-only-one-match#79382 "Is there a way, in the manual shipping plugin, so that only the 1st valid shipping price is displayed, not all matching prices?  I want to provide special local shipping pricing, based on the postal code. I've added a method (see attached) to filter on the postal code. That method is first on the list, however the plugin still selects and shows all the matching methods (see the other attached image)  thanks Trent")*

Hi,

You could add more Canada Post shipping method and restrict the post code in these methods too.

For example, if the local post code is B2Y, then restrict a Canada post to the post code from A1A to B2X, and another one from B2Z to Y9Z.
By this way no canada post shipping methods will be displayed.

PS: I don't know how the Canadian post codes work. It's just for example.

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

- **[tdilkie](/forum/user/12002-tdilkie "View tdilkie's Profile")**
- [![tdilkie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/bike_skid.png)](/forum/user/12002-tdilkie "View tdilkie's Profile") Topic Author
- [ Offline](/forum/user/12002-tdilkie)

Less More

- Posts: 6
- Thank you received: 0
-
-

13 years 11 months ago [\#79441](#79441) by [tdilkie](/forum/user/12002-tdilkie "View tdilkie's Profile")  Replied by *[tdilkie](/forum/user/12002-tdilkie "View tdilkie's Profile")* on topic *[Manual Shipping - how to select only one match](/forum/2-general-talk-about-hikashop/76256-manual-shipping-how-to-select-only-one-match#79441 "Is there a way, in the manual shipping plugin, so that only the 1st valid shipping price is displayed, not all matching prices?  I want to provide special local shipping pricing, based on the postal code. I've added a method (see attached) to filter on the postal code. That method is first on the list, however the plugin still selects and shows all the matching methods (see the other attached image)  thanks Trent")*

Thanks, that's a good idea, but I only showed 2 of the local delivery postal codes, in fact their are 12 of them, and they are not consecutive. I fact, I had to had the manual.php program a little bit for it even to work properly. I guess that I'll try to hack it a little bit more.

I will make an enhancement request -- an option that would allow the administrator to select if they want all matches, or only return the first matching manual shipping method

-Trent

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 11 months ago [\#79472](#79472) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Manual Shipping - how to select only one match](/forum/2-general-talk-about-hikashop/76256-manual-shipping-how-to-select-only-one-match#79472 "Is there a way, in the manual shipping plugin, so that only the 1st valid shipping price is displayed, not all matching prices?  I want to provide special local shipping pricing, based on the postal code. I've added a method (see attached) to filter on the postal code. That method is first on the list, however the plugin still selects and shows all the matching methods (see the other attached image)  thanks Trent")*

Another solution could be to create a new zone, with all the city wanted but the 12.
And apply this zone for the canada post shipping methods.

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

- **[tdilkie](/forum/user/12002-tdilkie "View tdilkie's Profile")**
- [![tdilkie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/bike_skid.png)](/forum/user/12002-tdilkie "View tdilkie's Profile") Topic Author
- [ Offline](/forum/user/12002-tdilkie)

Less More

- Posts: 6
- Thank you received: 0
-
-

13 years 11 months ago [\#79475](#79475) by [tdilkie](/forum/user/12002-tdilkie "View tdilkie's Profile")  Replied by *[tdilkie](/forum/user/12002-tdilkie "View tdilkie's Profile")* on topic *[Manual Shipping - how to select only one match](/forum/2-general-talk-about-hikashop/76256-manual-shipping-how-to-select-only-one-match#79475 "Is there a way, in the manual shipping plugin, so that only the 1st valid shipping price is displayed, not all matching prices?  I want to provide special local shipping pricing, based on the postal code. I've added a method (see attached) to filter on the postal code. That method is first on the list, however the plugin still selects and shows all the matching methods (see the other attached image)  thanks Trent")*

I had thought of that, but I didn't see any way to add a CITY (or POSTAL CODE) as a sub-zone... I only see country, state, tax zone, shipping zone, discount zone and payment zone, none of which would let me specify a city or postal code

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#79532](#79532) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Manual Shipping - how to select only one match](/forum/2-general-talk-about-hikashop/76256-manual-shipping-how-to-select-only-one-match#79532 "Is there a way, in the manual shipping plugin, so that only the 1st valid shipping price is displayed, not all matching prices?  I want to provide special local shipping pricing, based on the postal code. I've added a method (see attached) to filter on the postal code. That method is first on the list, however the plugin still selects and shows all the matching methods (see the other attached image)  thanks Trent")*

Hi,

That's right, it's not possible to put a city as a zone.
So the best way would be to override the "checkout &#124; shipping" view

If you just want to display the first shipping method, you can replace Code:

foreach($this-&gt;rates as $rate){

By Code:

$rate = reset($this-&gt;rates); if(!empty($rate)){

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [tdilkie](/forum/user/12002-tdilkie "View tdilkie's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2MjU2LW1hbnVhbC1zaGlwcGluZy1ob3ctdG8tc2VsZWN0LW9ubHktb25lLW1hdGNoP3RtcGw9bWFya2Rvd24=) 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.103 seconds

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

[](#top)
