-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Which component is this issue related to?
Umbraco Commerce (Core)
Which Umbraco Commerce version are you using? (Please write the exact version, example: 10.1.0)
13.2.2
Bug summary
When selecting a Dynamic Shipping Method configured purely via the back office (no custom calculator code), checkout fails with a NullReferenceException.
Flat-rate shipping methods work without issue — only dynamic shipping methods trigger the error.
Code being called:
_commerceApi.Uow.Execute(uow =>
{
var store = _settingsService.GetStore();
var order = _commerceApi.GetOrCreateCurrentOrder(store.Id)
.AsWritable(uow)
.SetShippingMethod(shippingMethodId);
_commerceApi.SaveOrder(order);
uow.Complete();
});
Specifics
- No custom shipping calculator implemented
- Dynamic rate created according to official documentation
- Order currency & shipping address present and valid
- ShippingMethodId is correctly assigned to the order on update
- Only difference between working and failing shipping methods: Dynamic vs Flat
Steps to reproduce
- Create a Dynamic Shipping Method via back office:
Add valid pricing rules/bands
Save & publish
- Add product to cart and proceed to checkout
- Select the Dynamic Priced Shipping method and submit form/trigger update of order shipping method/continue with checkout flow
- NRE thrown during
_api.SaveOrder(order)
Expected result / actual result
Expected Result
Order is updated with the correct shipping method and pricing, and no errors are thrown/checkout flow continues as expected
Actual Result
A NullReferenceException is thrown when updating the shipping method
Dependencies
No response