Hello Mohamed!
Thanks for you suggestion, it was a good test scenario to set up but unfortunately it didn't work
I noticed that I forgot to mention that my shipping table is "product weight" dependent. So here is what I did:
1) I duplicated all my shipping modules and set one for 10% and another 20% within the same weight range. I also set the "Price per product" option to YES. I did this for all of them. See pictures: shipping_set_up.jpg & shipping_set_up_2.jpg
2) I tested with three products: 2 with 10% (Food) and 1 with 20% (drink).
a) On the first try, I only worked with shipping until 2kg. So I blocked the other weight range NOT corresponding to the product tax. So it looked like: product 10% - shipping 10%
My shopping car look like shown in the picture: wrong_shipping_cost.jpg
In this case the module calculated the shipping based on the first product:
Neto: 6,25€ + 10% Tax = 6,88€
However it should calculate the shipping with 20%Tax
since the sum of the prices from the products based with 10% (13,30 €)
is smaller as the sum of the one with 20% (18,00 €).
In this case shipping should be 7,50 €
If the product with 20% was in the top, it would calculate the shipping with 20%.
b) On the second try, I worked with all the shipping modules with all the shipping limits. In this case I blocked all the shipping method that didn't correspond to the product tax (shipping_list.jpg)
This is when everything went wrong. No shipping was shown anymore (no_shipping_shown.jpg). When I went ahead with the order, I couldn’t oder at all (cannot_buy.jpg)
Then I tried to have only group with the same taxes (can_only_calculate_one_tax_group_per_order.jpg) and the shipping cost was back there. So it mean, that in this case it will only work if the products in the shopping car have the same taxable value
After all this I had to set everything back to the way it was
So my thinking at the moment is:
Should I remove the tax on my shipping modules and program something like:
If the “sum” of 10% tax products is > than the “sum” of the 20% taxable products, then the shipping cost taxes is:
shipping = {shipping net + 10%,}
else { shipping= shipping net + 20%}
echo shipping
So now, the question is: where do I do this and which are the “string” I need to use so reflect this so I can get the correct result?
Thanks a LOT in advance
VV