Different shipping cost tax based on the products

  • Posts: 8
  • Thank you received: 0
10 years 2 weeks ago #178637

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4
-- Browser(s) name and version -- : Chrome 38.0.2125.111

Hi!

In my shop, I have products which taxes are 10% (food) and other are 20% (drinks). When a customer's Shopping Cart's total has more products, for example, with the 10% tax, I need to calculate the shipping cost with this tax amount (10%) . If it is the other way around, when in the Shopping Car total the amount of the 20% taxable products is bigger, then I need to calculate my shipping cost with 20% tax.

How can I make it possible to change the Shipping Taxes depending on these situation?

At the moment my shipping cost depending on the weight is calculate with the 20%. Should I define again my shipping table calculation with the 10%? How will the calculation be done during the check-out so the right taxes are applied when one condition or the other occurs?

I will appreciate all the help on this, since according to the tax authorities, this is mandatory here in Austria :-(

Thanks in advanced.

vv

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 2 weeks ago #178655

Hello,
The solution will be to create 1 shipping method for each product tax category, so you'll just have to :
- Create 2 shipping methods with different "Product Tax Categories" and with the "Price per product" option set to YES
- Go to your product page and block the shipping method that you don't want to use for this product. (and do it for each products)

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 0
10 years 2 weeks ago #178828

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

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 2 weeks ago #178830

Hi,

I think that you could maybe do it differently.

Instead of using the "shipping price per product", you should instead create one warehouse per tax category and add your products to the corresponding warehouse and create one set of shipping methods for each warehouse (restrict each one to the warehouse) and set the corresponding tax category in each shipping method.
That way, during the checkout, the products will be grouped by warehouse and you'll get one shipping method per warehouse each one with a different tax rate and the sum of the fees of the shipping methods will be your final shipping price with the different tax compounds.

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 0
10 years 2 weeks ago #178858

Hi Nicolas!


Thanks for your thoughts, but the problem is that the Austrian laws requires my customer that the taxes applied for shipping needs to be the same as the group that has the higher sum.

For example, let’s say my shopping car has the sum of the following products

90 € —> 10% (taxes for the food)
110 € —> 20% (taxes for the drinks)

Shipping net cost is 6.20€ —> to this I muss charge 20% of taxes since in the shopping car the client spent more money on drink than in food.

The same is for the other possible scenario

100 € —> 10% (taxes for food)
90 € —> 20% (taxes for drinks)

Shipping: 6.20€ + 10% = 6,82 €

I hope I’m making my self clear ans you guys can help me here.

That is why I think I should hard code this so:

If the “sum” of 10% tax products is bigger than the “sum” of the 20% taxable products, then the shipping cost tax is:
shipping = {shipping net cost + 10%,}
else { shipping= shipping net cost + 20%}
echo shipping

could this be possible and in which file should I do this and which are the “strings” I need to use so reflect this so I can get the correct result?

Please Log in or Create an account to join the conversation.

  • Posts: 8
  • Thank you received: 0
10 years 1 week ago #179150

Any idea anyone please.... :(

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 1 week ago #179297

Hello,
There is actually no option to do that, so in your case the solution will probably be to :
- Set no tax category on your shipping configuration page
- Develop a plugin which will add an additional fee which will be the shipping tax regarding the products that you have in your cart.

Note that the plugin will have to be based on the "onAfterCartProductsLoad" function.
Here is the developer documentation for more information : www.hikashop.com/support/documentation/6...fterCartProductsLoad

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum