• Resolved Jaroslav Dvorsky

    (@jaroslavdvorsky)


    Hi,
    I’m currently looking for solution for making Woocommerce compatible with tax regulations in Slovakia.
    Based on our law, the shipping tax should be calculated based on invoiced products tax rates, but here is the tricky part.
    Let’s make an example.
    I have a store where customers can buy books as well as artworks. Books are taxed with reduced 10% tax rate, and artworks are taxed with standard 20% tax rate.
    If customer makes an order there all invoiced items are in the 10% tax rate, the shipping tax rate should be 10% as well. If customer makes an order with all products with 20% tax rate, the shipping tax rate should be 20% as well.
    But! If customer makes order where for example 1 product has 10% tax rate and 1 product has 20% tax rate, than shipping must have tax rate calculated based on percentage of price of products with each tax rate.
    So if I have order with books for 150€ with tax rate of 10%, and artworks worth 450€ with tax of 20% = together 600€, than shipping has to be calculated this way:

    Right now shipping costs 4.17€ (excl. tax)
    Price should be in this example calculated:
    150€/600€ * 4.17€ = 1,04€ (this amount needs to be taxed with 10% tax)
    450€/600€ * 4.17€ = 3.13€ (this amount needs to be taxed with 20% tax)

    I hope it’s all makes sense.
    And now here is my question. Is there a way to make this calculation possible somehow, just using Woocommerce setting? If yes, how?

    If not. Do you have any hints, how to code this? I never made some additional code changes to Woocommerce so I am new to this.

    Thank you so so much for every kind of help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @jaroslavdvorsky ,

    If I understand your use case requires you to calculate shipping tax rates based on the product price, right?

    Out of the box, the shipping tax rates will depend on the “tax class” of the product and “shipping rate”. The product price is not considered while calculating the tax for shipping.

    You can find full details on how the shipping tax rate is calculated here: https://woocommerce.com/document/setting-up-taxes-in-woocommerce/#section-6

    I do not have an exact example of how this can be achieved with custom code.

    I’ll keep this thread open for a little longer to see if anyone else can chime in to share any other hints.

    We have our developer resources portal that can help you get going, so I would recommend you to check it further from here: https://developer.woocommerce.com/

    You can also visit the WooCommerce Community Forum, the WooCommerce FB group, or the #developers channel of our Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, too.

    Another option is to check our customizations page to hire an expert that can create a custom solution for you: https://woocommerce.com/customizations/

    Thank you.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shipping tax calculation law’ is closed to new replies.