A Product's Additional Shipping Charge is the only charge


Let's say you've assigned Products their own "Additional shipping charge" and you want that charge to be the only charge for those products, and for any other prodcucts in the cart you want to calculate shipping using some 'standard' provider (like FedEx, or By Weight, etc.).    Shipping Director's Packing with Exclude Expression can handle it.  Here's the general idea:

EvalType

Name

Expression

Rate Expression

Description Expression
(Exclude)

Packing

Exclude Addl Charge items

Items.Any(Product.AdditionalShippingCharge > 0)

Packing.FirstFitSingleBox

Product.AdditionalShippingCharge > 0

Option

Shipping

true

Shipping.ByTotal

 

Using Packing's Exclude Expression removes those items from "the cart", so that the Shipping.ByWeight provider does not see them.

Note, that nopCommerce will always add Product.AdditionalShippingCharge AFTER the shipping providers return their methods/rates.  Also, be aware the the AdditionalShippingCharge is per quantity - E.g. if quantity of an item in cart is "3", then 3 times the addl charge is added.  (You can read more about that in this blog about "Product Additional Shipping Charges apply only once to the cart item regardless of the Quantity".

Comments
Leave your comment
:
sample@email.tst
Created on: 6/26/2023 5:31 PM
1
sample@email.tst
Created on: 6/26/2023 5:31 PM
1