Skip to content

Shippingcost calculation doesn't take PriceAdjustments into account #616

@ipsisPuckHolshuijsen

Description

@ipsisPuckHolshuijsen

Describe the bug
I've got a fixed rate shipping provider setup, which should add 25 euros (excl. vat) to an order when the subtotal is below 800, and should be free when above that amount.
The issue I am having, is that I've got bundled orderlines, and those underlying orderlines can get extra PriceAdjustments added to the TotalPrice.Adjustments.
It looks like the shipping calculation is not taking the adjustments into account.

So what I've got:
Total orderline amount without adjustments is 646,28 excluding vat, and 782,00 including vat (21% vat).
With the adjustments however it is 891.28 excluding vat, and 1.078,45 including vat (21% vat).

During checkout I am showing the possible shippingoptions with their costs, this is going great (shows free), which is calculated like this:
item.ShippingMethod.CalculatePrice()

Image

The order shippingcosts however show the 25 excluding vat - 30.25 including vat:

Image

Steps To Reproduce
Steps to reproduce the behavior:

  1. Add a bundled product to the cart which has a TotalAmount that is below the shipping threshold
  2. Add a PriceAdjustment to the TotalPrice of an underlying orderline, which should put the TotalAmount above the shipping threshold
  3. Check the ShippingInfo inside the current order

Expected behavior
I was expecting to see a free shippingcost because the subtotal (with all adjustments) of the order is above the threshold

Screenshots
Shippingcost setup

Image

Additional context

I am using the Checkout package

Umbraco Commerce version:

Installed Version
Umbraco.Commerce v13.1.12
Installed Payment Providers
Invoicing v13.1.12
Zero Value v13.1.12
Mollie (One Time) v13.1.1 (hotfix - preview 2)
Installed Shipping Providers
Basic v13.1.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions