verbb / postie

A Craft Commerce shipping calculator plugin.
Other
12 stars 18 forks source link

When using Negotiated Rates for UPS an address is required for the shipper #82

Closed jurgenkrol closed 2 years ago

jurgenkrol commented 2 years ago

Description

When using Negotiated Rates for UPS an address is required for the shipper. The shipFrom address is correctly added, but this address is not added to the shipper. Only the account number is added.

Steps to reproduce

  1. Enable Negotiated Rates for UPS
  2. Put something in your cart
  3. Goto the checkout page and fill in your address
  4. In the next step the wrong rates are shown for UPS

Additional info

Additional context This issue can be solved by adding the address to the shipper object below the shipper number, line 410 in verbb/postie/src/providers/UPS.php:

$shipper->setAddress($shipFromAddress);

engram-design commented 2 years ago

That makes sense, but I have no idea how negotiated rates have been working up until this point. I'll look into it. '

jurgenkrol commented 2 years ago

Thanks! I think the solution might be simple. Just add the aforementioned line to UPS.php

engram-design commented 2 years ago

I've just added this for the next version. To get the fix early, change your verbb/postie requirement in composer.json to:

"require": {
  "verbb/postie": "dev-craft-3 as 2.4.14",
  "...": "..."
}

Then run composer update.

jurgenkrol commented 2 years ago

Thanks for the fix!

engram-design commented 2 years ago

Fixed in 2.4.15