I have a little twist on the shipping by quantity issue. First off, I do not calculate shipping by weight because ALL products in my cart get a 10% S&H charge added, so I simply used the custom shipping logic to do this:
$shipping_price = int($subtotal*10 + 0.5) / 100;
Now, the twist is that a certain few products, because of size, require a $6.00 "additional freight fee" for every quantity 5 ordered (i.e., 5 of these items fit in a specially sized box and it costs $6.00 extra for each box).
The big problem is how to do the shipping calculation for each individual product instead of the entire order subtotal.... then sum up the individual products' shipping charges to get the entire order's total shipping charge. Conceptually, it would be something like this:
additional freight fee = round((quantity/5)+0.5)*6
But I'm getting stuck on how to write the conditional statement to have this additional freight fee apply to only certain products.
Please help.