Order subtotal is showing incorrect and tax is not adding in order details.

  • Posts: 13
  • Thank you received: 0
2 weeks 5 days ago #323680

-- HikaShop version -- : HikaShop Business: 4.3.0
-- Joomla version -- : Joomla! 3.9.19
-- PHP version -- : 7.3.19
-- Browser(s) name and version -- : Google Chrome

Hi,

We are showing unit price on checkout(Unit Price(Excl. GST)) and performing calculation on it.
Adding Promocode if applied and GST on Unit Price of the product.

Issue is some of the order are created with Product Price(Unit Price) + GST(TAX) and after that user applied discount and GST(Tax).
But total amount is stored proper.
We are facing this problem with some of the orders.

We have searched for this issue and found some difference in the hikashop_order_product table and hikashop_order table. Tax is not saved and tax info is also not available.

Please find attached screenshot for more details.

Thanks in advance!

Attachments:

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

  • Posts: 2707
  • Thank you received: 351
  • MODERATOR
2 weeks 4 days ago #323700

Hello,

Can you provide screenshot of your Taxes configuration (in HikaShop => Configuration, Main tab and Taxes part) AND of your Coupon (promocode) as well.

Awaiting news from you to be able to answer you precisely.
Regards

Last edit: 2 weeks 4 days ago by Philip.

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

  • Posts: 13
  • Thank you received: 0
2 weeks 4 days ago #323741

Hi,

PFA screenshots of hikashop configuration main taxes and coupon code details.

For some of the orders tax info and tax discount amount is not stored in the table.

Thank you!

Attachments:

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

  • Posts: 70518
  • Thank you received: 10587
  • MODERATOR
2 weeks 3 days ago #323744

Hi,

I see on your first screenshot that you're using HikaMarket.
Is your display issue only on the frontend of HikaMarket ?
Or do you have also the issue in the backend of HikaShop / email notifications etc ?
Also, how are the orders created ? Through the checkout ? Or in the backend ? Or in the frontend by the main vendor ?
Are you able to reproduce the problem if you purchase the same products with the same discount via the checkout ? (you could configure a special "collect on delivery" payment method limited to a user group attached to your user so that only you would be able to use it to go through the checkout without paying).

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

  • Posts: 13
  • Thank you received: 0
2 weeks 3 days ago #323765

nicolas wrote: Hi,

I see on your first screenshot that you're using HikaMarket.
Is your display issue only on the frontend of HikaMarket ?
Or do you have also the issue in the backend of HikaShop / email notifications etc ?
Also, how are the orders created ? Through the checkout ? Or in the backend ? Or in the frontend by the main vendor ?
Are you able to reproduce the problem if you purchase the same products with the same discount via the checkout ? (you could configure a special "collect on delivery" payment method limited to a user group attached to your user so that only you would be able to use it to go through the checkout without paying).


Hi,
Yes we are using Hikamarket for managing vendors.
Display issue of order amount and GST amount is on all the screens, backend and in email notifications also.
Cutomer can create orders through the checkout process. We have same UAT environment and same setting on it. In UAT environment it is working fine for same order with same scenario.

How to configure a special "collect on delivery" payment method limited to a user group attached to our users?

Today one more order created with same issue. Order product tax and order product tax info is not stored in the table.

PFA screenshots from UAT environment and from Production environment you get an idea from that.

Please let me know any solution for this earlier it was working properly for all the orders. Now for some of the orders it is not showing GST but total amount which customer pay is proper.

Attachments:

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

  • Posts: 70518
  • Thank you received: 10587
  • MODERATOR
2 weeks 2 days ago #323769

Hi,

From what I can see on your screenshots, it looks like the system doesn't add any tax to the order because it didn't find any tax rule to apply to the order.
The subtotal and total amounts include the tax value because you have the "floating tax prices" setting activated and thus you enter the prices with taxes in your shop and the system then calculates the amount of the taxes based on the tax rules. But it doesn't find any matching tax rule, and thus it can't calculate the tax amount and thus can't display it.
So it's not a display problem, but a tax rules setup issue.

So the problem is with the settings of your tax rules in the menu System>Taxes.
Either the issue is that the products of the order don't have any tax rule linked to them via the "tax category", or the billing address of the customer is in a zone that isn't in the zone selected in your tax rules, or a combination of both.

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

  • Posts: 13
  • Thank you received: 0
2 weeks 2 days ago #323801

Hello,

We are discussing here to resolve the issue that's why I am sharing the screenshots.

Problem is creating for some of the orders only and others are working properly.

If the order_product_tax and order_product_info stored properly we can solve this problem.

Billing address of the customer is in the zone selected in tax rule.

I have checked all the configuration from the admin panel. Please have a look at the below configuration.

India is published as a tax zone (System > Configuration > Zones)
Main tax zone set to India (System > Configuration > Taxes)
Created a tax rate with tax namekey as "GST" with a rate of 18% (System > Configuration > Taxes > Manage Rates) and
Tax rule for India(System > Taxes ) Default Tax Category
Product Tax category is set to Default Tax Category (Product > Tax Category)

Is there any other setting remaining?

Can you please tell me from where the order is created from the code so that I can debug it.

Please let me know if you need more details so that we can resolve this issue.

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

  • Posts: 70518
  • Thank you received: 10587
  • MODERATOR
2 weeks 1 day ago #323806

Hi,

The order is created in the createFromCart function of the file administrator/components/com_hikashop/classes/order.php
But that's not where you should look.
If there are no taxes in the order, it most likely means that there are no taxes in the cart.
So the issue is during the loading of the cart. If you want to debug it, you would have to check in the functions of administrator/components/com_hikashop/classes/currency.php
It's in this file that the tax rules are loaded, filtered and used on the prices.
The main function you want to look at is the getTax function there. That's the one loading the tax rules from the database and filtering them based on the current situation (address, products in the cart, user group, etc).

Now, to be able to tell you what's wrong, without debugging, I would need you to provide a URL to a product for which you have the problem, a screenshot of the settings of that product, the address to use on the checkout and a screenshot of the settings of your tax rules listing. That way I could check that the settings of the different elements against the situation on the checkout of your website.

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

  • Posts: 13
  • Thank you received: 0
2 weeks 1 day ago #323855

nicolas wrote: Hi,

The order is created in the createFromCart function of the file administrator/components/com_hikashop/classes/order.php
But that's not where you should look.
If there are no taxes in the order, it most likely means that there are no taxes in the cart.
So the issue is during the loading of the cart. If you want to debug it, you would have to check in the functions of administrator/components/com_hikashop/classes/currency.php
It's in this file that the tax rules are loaded, filtered and used on the prices.
The main function you want to look at is the getTax function there. That's the one loading the tax rules from the database and filtering them based on the current situation (address, products in the cart, user group, etc).

Now, to be able to tell you what's wrong, without debugging, I would need you to provide a URL to a product for which you have the problem, a screenshot of the settings of that product, the address to use on the checkout and a screenshot of the settings of your tax rules listing. That way I could check that the settings of the different elements against the situation on the checkout of your website.



Hi,
In that order issue there are two products and I have shared all the details please check.

Product details page product1
estore.hni-india.com/index.php/hikashop-...ing/product/90-4quip

Product detail page product2
estore.hni-india.com/index.php/hikashop-...ing/product/3-4stava

Below is the checkout page URL with Promo code amount, proper GST amount and total. Up to this, all the values are correct.
estore.hni-india.com/index.php/hikashop-...sting/checkout/cid-3

PFA screenshots of the product setting page, address of the customer and other screenshots as well. There are two products in that order both are the variants.
Shared all the screenshot please check.

Thank you!

Attachments:

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

  • Posts: 70518
  • Thank you received: 10587
  • MODERATOR
2 weeks 20 hours ago #323863

Hi,

Well, I don't get the same result as you when I do the same thing on your website.
I end up with no tax found in the checkout:
monosnap.com/file/oO2Aw2q4Cl181Ge5uDPQZ84oyAc0W7
And your screenshot of the address of the customer as well as the screenshot of the tax rules listing explain why.
The customer address, as well as mine, doesn't have a country selected (I suppose that you disabled the "country" custom field in the menu Display>Custom fields.
But in your tax rule, you've configured the "zone" setting to "india" so that only customers with an address in India are charged taxes.
But since the country is not provided the system cannot use the tax rule.
You should either activate the "country" custom field so that the country can be filled in the addresses, or remove the zone restriction from your tax rule so that the tax applies to everyone on your website.

I can only suppose that the taxes are added for you and other customers on your website because you had created your addresses before disabling the "country" custom field and thus the tax system can still find the country in these addresses even if it's not displayed.

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

  • Posts: 13
  • Thank you received: 0
1 week 5 days ago #323910

Hi,

Thanks for checking!

I have tried with a newly registered customer but getting proper GST amount in the checkout page.

Some of the newly registered customers are not facing this issue only some orders are facing this issue I don't know why?

I am always getting proper values. Can you please share the step which you followed so that I can try to reproduce the issue without tax on the checkout page.

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

  • Posts: 70518
  • Thank you received: 10587
  • MODERATOR
1 week 4 days ago #323914

Hi,

Maybe it's because you have the geolocation plugin activated. In that case, since I'm not located in India the tax won't apply to me and since you're in India you would get it.
So anyone in India with a VPN or a proxy in a foreign country would get the same issue as me and not you and most customers as their IP is in India.

As I said, just remove the country zone from your tax rule and it will apply the tax to everyone, problem solved.

The following user(s) said Thank You: chetan-harrier

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

  • Posts: 13
  • Thank you received: 0
1 week 2 days ago #323998

Hi,

Thank you for finding the root cause and providing solution for it.

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

Time to create page: 0.081 seconds
Powered by Kunena Forum