I recently upgraded from 1.8.6 to 2.2.0 (Umbraco 8.18.3). I had a custom shippingCalculator that worked fine in 1.8.6. But after the upgrade it's not running at all. I got a breakpoint at the start of the method which is not being hit.
What interactions are you performing on the order as the calculator will only run if it needs to so have you tried swapping the shipping method etc to force it to run?
var order = _sessionManager.GetOrCreateCurrentOrder(store.Id)
.AsWritable(uow).SetShippingMethod(shippingMethod);
To set the shipping method. I tried swicthing between 2 shipping methods. I can see how the order changes shippingMethodId changes between the 2. But it's still not reaching CalculateShippingMethodPrice.
Hmm, is it because you have called your composer VendrComposer and also set it to compose after VendrComposer and so it's not actually running after our composer, rather it's attempting to compose after itself. Maybe rename your composer and see if that works.
EDIT: This would explain why it used to work as there used to be a VendrCoreComposer and VendrWebComposer but now there is only one VendrComposer so this might be the conflict.
ShippingCalculator not running
Hi!
I recently upgraded from 1.8.6 to 2.2.0 (Umbraco 8.18.3). I had a custom shippingCalculator that worked fine in 1.8.6. But after the upgrade it's not running at all. I got a breakpoint at the start of the method which is not being hit.
My implementation looks like this:
And composer looks like this:
I am really confused why this isn't working.
Any ideas?
//Johannes
Hey Johannes,
What interactions are you performing on the order as the calculator will only run if it needs to so have you tried swapping the shipping method etc to force it to run?
Hi Matt!
I am using:
To set the shipping method. I tried swicthing between 2 shipping methods. I can see how the order changes
shippingMethodId
changes between the 2. But it's still not reachingCalculateShippingMethodPrice
.//Johannes
Hmm, is it because you have called your composer
VendrComposer
and also set it to compose afterVendrComposer
and so it's not actually running after our composer, rather it's attempting to compose after itself. Maybe rename your composer and see if that works.EDIT: This would explain why it used to work as there used to be a
VendrCoreComposer
andVendrWebComposer
but now there is only oneVendrComposer
so this might be the conflict.Thank you so much Matt!
That did it!
Fantastic 👍
is working on a reply...