Two tax rates based on Domain - RESOLVED

  • Posts: 180
  • Thank you received: 13
10 years 3 months ago #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

Last edit: 10 years 2 months ago by esotechie.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 months ago #167462

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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 180
  • Thank you received: 13
10 years 3 months ago #167505

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 or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 3 months ago #167521

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:

$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->database->setQuery($query);
in administrator/components/com_hikashop/classes/currency.php

The following user(s) said Thank You: esotechie

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

  • Posts: 180
  • Thank you received: 13
10 years 3 months ago #167621

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 or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum