order discount tax

  • Posts: 4
  • Thank you received: 1
1 day 18 minutes ago #369165

-- HikaShop version -- : HikaShop Starter: 6.1.0
-- Joomla version -- : 5.4.0
-- PHP version -- : 8.3
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : "order_discount_tax": "0.00000",

Regardless of the VAT rate set for the coupon, I always see 0.00000 in the logs.
"order_discount_tax": "0.00000",

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

  • Posts: 84585
  • Thank you received: 13755
  • MODERATOR
10 hours 2 minutes ago #369166

Hi,

What logs are you referring to ? Do you see the correct value in the order_discount_tax column of the hikashop_order table in your database ?

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

  • Posts: 4
  • Thank you received: 1
9 hours 38 minutes ago #369172

I'm creating an integration with an external service and saving all order data to a file to check the values. The default tax category is 23. I'm adding a coupon with a fixed value of 10 and setting the Automatic Taxes to NO and the Tax Category to Default Tax Category. In the order data, my coupon has a value of 10, but the VAT rate is 0. The order_discount_tax in the Hikashop table is also 0.

Last edit: 8 hours 51 minutes ago by nicolas.

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

  • Posts: 84585
  • Thank you received: 13755
  • MODERATOR
6 hours 47 minutes ago #369173

Hi,

Well, if the VAT rate is 0 in the cart, it's normal that the order_discount_tax value is also 0 when the order is created from the cart.
And thus, the problem has nothing to do with HikaShop not properly filling the order_discount_tax value when the order is created from the cart. The problem is that the tax is not calculated for the coupon.
And based on what you wrote, the issue is likely that your taxes are not configured properly for what you want to do.

I've checked your settings with the backend access you provided. I think the issue is with the "apply coupon" setting of the HikaShop configuration:
www.hikashop.com/support/documentation/5...nfig.html#main_taxes
Since that setting is set to "after taxes", it means that the taxes are calculated for the cart, and then the coupon applies to the cart.
You probably want to change that setting to "before taxes". And you also want to change the flat amount of your coupon as you want to provide the value without taxes: 8.13
I've made the changes for you and now the taxes properly updates based on the value of the coupon when added to the cart:
i.imgur.com/a3YiI0R.png

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

Time to create page: 0.057 seconds
Powered by Kunena Forum