Free shipping discount with custom shipping fee

We have a custom shipping provider, where we get the shipping cost. This shipping cost is set when we select the shipping provider:

await cartContext.SelectShippingOptionAsync(new SelectShippingOptionArgs
{
     ShippingOptionId = cartContext.Cart.Order.ShippingInfo.First().ShippingOption,
     Fee = Convert.ToDecimal(externalOption.Price),
});

In this case, the custom shipping option is already selected, so we just take the selected shipping option from ShippingInfo, and we also set the “Fee” property. This is working, until we apply the free shipping discount. The fee is “locked” and will not be set to zero. Is this the expected behavior?

Litium version: 8.9.1

yes it is expected behaviour, instead of setting the value to zero, when the free shipping discount is applied, we add a new row in Litium 8 with a negative value that will set-off the original cost. This way, we also preserve the original value as well as clearly show the discount given. This allows us flexibility during refunds and cancellations, because we know the exact shipping cost and discounts given.

My question was worded incorrectly, I didn’t mean that the order row itself would have its value changed to 0, but that the shipping would be free even if you set a custom fee.

I had my free shipping campaign set up incorrectly and as a result I didn’t get free shipping. I simply thought that shipping is not free if you use the “Fee” property, and apply a free shipping discount.

This is a no-issue :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.