Applies product and shipment-level shipping cost to the specified line
For each product line item in the specified line item container, a
product shipping line item is created if product-level shipping cost is
defined for the product. If no product-level shipping cost is defined for
the product, an existing product shipping line item is removed.
For each shipment in the specified line item container, shipment-level
shipping cost is calculated. This cost is determined based on the
merchandise total of the shipment after all product and order discounts.
Only products without or with surcharge product-specific shipping cost
count towards this merchandise total. Products with fixed
product-specific shipping cost don't count towards the merchandise total
used to calculate shipment-level shipping cost. The calculated shipping
cost is set at the standard shipping line item of the shipment.
If 'net' taxation is configured for the site, the merchandise total
before tax is used. If 'gross' taxation is configured for the site, the
merchandise total after tax is used.
If no shipping method is set for a shipment, neither product nor
shipment-level shipping cost can be calculated. In this case, the amount
of the standard shipment shipping line item will be set to N/A, and
shipping line items of product line items in this shipment will be
removed from the line item container.
Special cases for product-level shipping cost:
- if a product is member of multiple shipping cost groups, the lowest
shipping cost takes precedence
- if fixed and surcharge shipping cost is defined for a product, the
fixed cost takes precedence
- shipping cost defined for a master product is also defined for all
variants of this master
- shipping cost is not applied to bundled product line items or options