verbb / postie

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

Postie Not Always Updating Cart #90

Closed RitterKnightCreative closed 1 year ago

RitterKnightCreative commented 2 years ago

Description Not sure if this a Commerce or Postie bug, but I have a custom provider which we forked from the original FedEx provider that Postie provides.

Against my client's better judgement, they decided to do some rate modification if a coupon code is applied. However, was doing some testing and after putting a coupon code in, the rate Commerce is showing doesn't take into account the new rate that we just modified based on the applied code. I have caching turned off.

If I hit update cart a second time, without changing anything, the new rate then shows up... not sure if Postie is notifying Commerce too late in the request or something else is going on?

Steps to reproduce

  1. Add coupon code
  2. Cart updates but Postie displays old rate.
  3. Hit refresh again, shows updated total.
engram-design commented 2 years ago

Quick question - what version are you on? I don't think there would be any problem with modifying the rate based on a coupon code - although a snippet of how you're doing this would be helpful. If that's in your customer provider, or elsewhere using an event.

There is caching involved, but mostly to memoize things. However this was improved in 2.4.16 which is why I ask which version you're on.

engram-design commented 1 year ago

Closing due to inactivity.