[Skip to main content](#vessel-content)

#   Two tax rates based on Domain - RESOLVED

##

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

12 years 3 months ago -  12 years 3 months ago [\#167448](#167448) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  *[Two tax rates based on Domain - RESOLVED](/forum/40-taxes/870373-two-tax-rates-based-on-domain-resolved#167448 "-- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.2  Hi  A client has set up a Hikashop store to server to domains with the same product set, one shop being the slave of the other with some extra products.  Everything seems to be sorted and working apart from taxes. We have two different taxes as they are in two countries, with tax rates of 23% and 20%.  Is there a call be can make to load the relevant tax rate based on the domain, and of so where is the best place to place the calls without hacking the core Hikashop.  Thanks in advance Mehdi")* was created by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")*

-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.2.2

Hi

A client has set up a Hikashop store to server to domains with the same product set, one shop being the slave of the other with some extra products.

Everything seems to be sorted and working apart from taxes. We have two different taxes as they are in two countries, with tax rates of 23% and 20%.

Is there a call be can make to load the relevant tax rate based on the domain, and of so where is the best place to place the calls without hacking the core Hikashop.

Thanks in advance
Mehdi

Last edit: 12 years 3 months ago by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQwLXRheGVzLzg3MDM3My10d28tdGF4LXJhdGVzLWJhc2VkLW9uLWRvbWFpbi1yZXNvbHZlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 3 months ago [\#167462](#167462) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Two tax rates based on Domain](/forum/40-taxes/870373-two-tax-rates-based-on-domain-resolved#167462 "-- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.2  Hi  A client has set up a Hikashop store to server to domains with the same product set, one shop being the slave of the other with some extra products.  Everything seems to be sorted and working apart from taxes. We have two different taxes as they are in two countries, with tax rates of 23% and 20%.  Is there a call be can make to load the relevant tax rate based on the domain, and of so where is the best place to place the calls without hacking the core Hikashop.  Thanks in advance Mehdi")*

Hi,

The tax is based on the user address, there is not option to set it depending the website domain name.
If you really need that (point that I have difficulties to understand/visualize), you will have to modify the core ; but logically with the user address (country), you have something good. No ?

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQwLXRheGVzLzg3MDM3My10d28tdGF4LXJhdGVzLWJhc2VkLW9uLWRvbWFpbi1yZXNvbHZlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

12 years 3 months ago [\#167505](#167505) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Two tax rates based on Domain](/forum/40-taxes/870373-two-tax-rates-based-on-domain-resolved#167505 "-- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.2  Hi  A client has set up a Hikashop store to server to domains with the same product set, one shop being the slave of the other with some extra products.  Everything seems to be sorted and working apart from taxes. We have two different taxes as they are in two countries, with tax rates of 23% and 20%.  Is there a call be can make to load the relevant tax rate based on the domain, and of so where is the best place to place the calls without hacking the core Hikashop.  Thanks in advance Mehdi")*

Thanks for the reply Jerome

I understand the process of Tax calculation, but the calculation requires a rate to be applied which is determined by the ORIGIN of the sale and not where the customer is based. e.g. France will have a different Tax rate to Denmark (20% and 25%).

This means if Hikashop is serving two stores as master and slave sites, and the sites are based in different countries for the purposes of tax, then you will need two rates. What I am asking is how to call the different rates to be applied.

What I have in mined is to set up Two tax rates with their own rules, and then tell Hikashop which to load depending on the domain, but I do not know what the call would be or where the call should be made.

Regards
Mehdi

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQwLXRheGVzLzg3MDM3My10d28tdGF4LXJhdGVzLWJhc2VkLW9uLWRvbWFpbi1yZXNvbHZlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

12 years 3 months ago [\#167521](#167521) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Two tax rates based on Domain](/forum/40-taxes/870373-two-tax-rates-based-on-domain-resolved#167521 "-- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.2  Hi  A client has set up a Hikashop store to server to domains with the same product set, one shop being the slave of the other with some extra products.  Everything seems to be sorted and working apart from taxes. We have two different taxes as they are in two countries, with tax rates of 23% and 20%.  Is there a call be can make to load the relevant tax rate based on the domain, and of so where is the best place to place the calls without hacking the core Hikashop.  Thanks in advance Mehdi")*

So you're saying that you have two webites, a slave and a master.
If you're using jms multisites for that, then you should be able to configure different tax rules for different websites and in that case there is no problem. Each website will only see its tax rules and thus calculate the taxes based on its own rules.
I would recommend to contact the JMS multisites support in that case for how to configure that exactly.

If you're using another solution, then I don't know how that can work but the principle is the same. If the multisite system doesn't allow you to have different instances of a table (hikashop_taxation here) like JMS, then one solution could be to add a new column in the table hikashop_taxation in order to say which rule is for which website, and then modify the query which loads the tax rules in order to add a condition on that column based on the current domain name.
The query to modify is this one: Code:

$query = 'SELECT b.*,c.* FROM '.hikashop_table('category'). ' AS a '. 'LEFT JOIN '.hikashop_table('taxation').' AS b ON a.category_namekey=b.category_namekey '. 'LEFT JOIN '.hikashop_table('tax').' AS c ON b.tax_namekey=c.tax_namekey WHERE '.implode(' AND ',$filters); $this-&gt;database-&gt;setQuery($query);

in administrator/components/com_hikashop/classes/currency.php

The following user(s) said Thank You: [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQwLXRheGVzLzg3MDM3My10d28tdGF4LXJhdGVzLWJhc2VkLW9uLWRvbWFpbi1yZXNvbHZlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")**
- [![esotechie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7143.jpg)](/forum/user/7143-esotechie "View esotechie's Profile") Topic Author
- [ Offline](/forum/user/7143-esotechie)

Less More

- Posts: 180
- Thank you received: 13
-
-
-
- [](http://www.halare.co.uk/)
-

12 years 3 months ago [\#167621](#167621) by [esotechie](/forum/user/7143-esotechie "View esotechie's Profile")  Replied by *[esotechie](/forum/user/7143-esotechie "View esotechie's Profile")* on topic *[Two tax rates based on Domain](/forum/40-taxes/870373-two-tax-rates-based-on-domain-resolved#167621 "-- HikaShop version -- : 2.3.0 -- Joomla version -- : 3.2.2  Hi  A client has set up a Hikashop store to server to domains with the same product set, one shop being the slave of the other with some extra products.  Everything seems to be sorted and working apart from taxes. We have two different taxes as they are in two countries, with tax rates of 23% and 20%.  Is there a call be can make to load the relevant tax rate based on the domain, and of so where is the best place to place the calls without hacking the core Hikashop.  Thanks in advance Mehdi")*

Thanks for the reply nicolas.

I believe they are using JMS Multisite, so I will give them your answer and see if I can help them set it up.

Thanks again for your advice.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQwLXRheGVzLzg3MDM3My10d28tdGF4LXJhdGVzLWJhc2VkLW9uLWRvbWFpbi1yZXNvbHZlZD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.056 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
