Manual Shipping - how to select only one match

  • Posts: 6
  • Thank you received: 0
11 years 11 months ago #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



Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 11 months ago #79382

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 or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
11 years 11 months ago #79441

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 or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 11 months ago #79472

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 or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
11 years 11 months ago #79475

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 or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 11 months ago #79532

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 | shipping" view

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

foreach($this->rates as $rate){
By
$rate = reset($this->rates);
if(!empty($rate)){
Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: tdilkie

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum