I have a client that needs to be able to set a flat rate based on product type. I saw that rfay set a flat rate based on weight, using a component in a loop. So I figure there should be some method to have the flat rate based on product type be triggered in a similar fashion.
My client only offers one flat rate shipping service for $12.00.
But the client offers two products, tins and bags. If there are bags in the cart, the flat rate rule/component needs to divide the total number of bags by 16, then "return ceil($value)" and multiply that by the shipping rate. IOW, every 16 bags gets charged $12 to ship.
I have created the component and it is firing properly based on Rules evaluation. But when the calculation tries to call on the data from this set it is saying the value is empty. Not sure if this is a rules bug, my error in calling things properly, or just my own ineptitude. Feel free to blame me. :-)
Attached are my rules/component. Thanks for the help!