We want to set up free shipping discount on a product category, however Postie does not take line item with free shipping into account. Digging into it more even when I toggle free shipping on a product, postie will still fetch rates.
Our use case is to have a free shipping discount on certain line items, which is supported by commerce and their discount system.
Looking at the plugin code, when packing box maybe ignore line items that have free shipping.
This is what Commerce have done when they get prices for an order:
The indented outcome is for free shipping line items to not be accounted for in shipping estimation. This would include free shipping discounts on specific line items.
Steps to reproduce
Enable and configure any shipping provider
Create product type and a product with configurations so that Postie can normally fetch shipping rates on it
Set that product to have free shipping
Check the order and you'll see the order still have shipping
Craft CMS version
3.8.14
Plugin version
2.4.22
Multi-site?
No
Additional context
PHP Version: 7.4.30
OS version: Linux 5.10.124-linuxkit
Craft Commerce: 3.4.22.1
Describe the bug
We want to set up free shipping discount on a product category, however Postie does not take line item with free shipping into account. Digging into it more even when I toggle free shipping on a product, postie will still fetch rates.
Our use case is to have a free shipping discount on certain line items, which is supported by commerce and their discount system.
Looking at the plugin code, when packing box maybe ignore line items that have free shipping.
This is what Commerce have done when they get prices for an order:
https://github.com/craftcms/commerce/blob/fc08a7be4bd723fbdc37f1f248b87bfd8a172605/src/base/ShippingMethod.php#L177-L178
The indented outcome is for free shipping line items to not be accounted for in shipping estimation. This would include free shipping discounts on specific line items.
Steps to reproduce
Craft CMS version
3.8.14
Plugin version
2.4.22
Multi-site?
No
Additional context
PHP Version: 7.4.30 OS version: Linux 5.10.124-linuxkit Craft Commerce: 3.4.22.1