I follow this : https://www.noptools.com/blog/69/product-specific-fixed-rate-for-quantity-1-plus-additional-shipping-charge-for-quantity-1, so I have an additional shipping fee inside of product. When I choose "Pick up in store", in the "Confirm Order" page, this additional shipping fee will show in the "Shipping" row, which should be zero. That's my problem..
Previously I using this in Shipping director : Items.Where(!String.IsNullOrWhiteSpace(Product.AdminComment)).Sum(Decimal.Parse(Product.AdminComment.SubstringBetween("Shipping:",";")) - Product.AdditionalShippingCharge)
This "Product.AdditionalShippingCharge" is come from "Additional shipping charge" in product, which is working fine when custom not select "Pick up at store". However, if custom choose "Pick up at store", the shipping director will be skiped and that "Additional shipping charge" will show in the finall "shipping fee", which should be "0".
So I leave this value as "0" in product, and leave shipping director handle this. Now my shipping director expression using : Items.Where((Product.Name).Contains("Adapter")).Sum(10) + Items.Where((Product.Name).Contains("Adapter")).Sum(5)*(Items.Where((Product.Name).Contains("Adapter")).Sum(Quantity) - 1)
The "10" is the first item's shipping fee, and "5" is the additional shipping fee from second item.
I don't think your formula is correct. If there are two types of Adapter Products in the cart (e.g. "Adapter 1" and "Adapter 2", do you want 10 for first of each Adapter type, and then 5 for each additional (for each adapter type)? For example if two items in cart, the first with quantity 1 and the second with quantity 2, then with your formula, you get
I don't think your formula is correct. If there are two types of Adapter Products in the cart (e.g. "Adapter 1" and "Adapter 2", do you want 10 for first of each Adapter type, and then 5 for each additional (for each adapter type)? For example if two items in cart, the first with quantity 1 and the second with quantity 2, then with your formula, you get
In my case, I have 4 products(and for each of them has different shipping fee and additional fee), and I using the Product.Name.Contains("PartOfProductName") to make sure the filter result is correct. And I create individual shipping director rule for each product with a decimal type return value. Finally calculate the for return value as a total shipping fee. Base on my test It can solve my problem. Maybe using product name to control the filter is not a very good idea..