- Posts: 190
- Thank you received: 9
Tax namekey changing
6 years 10 months ago #314551
by joris85
Tax namekey changing was created by joris85
-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2
Hi guys,
On the invoice i like to change the namekey so the low and high looks the same.
www.dropbox.com/s/rymxp9p08b3b8uc/Scherm...%2009.58.13.png?dl=0
Now i can't change that name in Hikashop.
How dangerous is it to change that in the database?
Probably a reason why i can't change it
Thanks!
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2
Hi guys,
On the invoice i like to change the namekey so the low and high looks the same.
www.dropbox.com/s/rymxp9p08b3b8uc/Scherm...%2009.58.13.png?dl=0
Now i can't change that name in Hikashop.
How dangerous is it to change that in the database?
Probably a reason why i can't change it

Thanks!
Please Log in or Create an account to join the conversation.
6 years 10 months ago #314553
by nicolas
Replied by nicolas on topic Tax namekey changing
Hi,
You can. Go in the "manage tax rates" button via the System>Taxes menu and create a new tax rate with the namekey you want for your tax rate.
Then, edit your tax rules and change the tax rate to the new one. That way, new orders will use the new tax rate.
Change the tax rate namekey in the database is not a good idea as HikaShop relies on the tax rate namekey when displaying the taxes in the invoice and the backend/frontend as its that namekey which is stored in the order.
So you would have to change the tax namekey in all the orders in the database and it's not easy as the data is serialized in the order information.
Also, you can use translation overrides to change the text.
I suppose you could have a translation override like that:
BTW_HOOG="My custom text"
www.hikashop.com/download/languages.html#modify
You can. Go in the "manage tax rates" button via the System>Taxes menu and create a new tax rate with the namekey you want for your tax rate.
Then, edit your tax rules and change the tax rate to the new one. That way, new orders will use the new tax rate.
Change the tax rate namekey in the database is not a good idea as HikaShop relies on the tax rate namekey when displaying the taxes in the invoice and the backend/frontend as its that namekey which is stored in the order.
So you would have to change the tax namekey in all the orders in the database and it's not easy as the data is serialized in the order information.
Also, you can use translation overrides to change the text.
I suppose you could have a translation override like that:
BTW_HOOG="My custom text"
www.hikashop.com/download/languages.html#modify
Please Log in or Create an account to join the conversation.
6 years 10 months ago #314841
by joris85
Replied by joris85 on topic Tax namekey changing
Yes then i loose my statistics per tax rate, or need to combine them, Why can't i change a label that is shown to users?
But for next i will use the translation keys.
But for next i will use the translation keys.
Please Log in or Create an account to join the conversation.
6 years 10 months ago #314843
by nicolas
Replied by nicolas on topic Tax namekey changing
Hi,
Well, even now you can use a translation override to change it. I think that's the best solution here.
Really changing the tax rate name would require modifying all the orders using that tax rate. If you have thousands of orders, it's impossible to do without a crash of PHP on hosting with small resource limitations. And we want to avoid a crash where you would have some orders modified and some not. So that's why we disallow it.
And if we would allow you to change it without changing it in the orders, you would also loose your satistics so that wouldn't be a solution either.
Well, even now you can use a translation override to change it. I think that's the best solution here.
Really changing the tax rate name would require modifying all the orders using that tax rate. If you have thousands of orders, it's impossible to do without a crash of PHP on hosting with small resource limitations. And we want to avoid a crash where you would have some orders modified and some not. So that's why we disallow it.
And if we would allow you to change it without changing it in the orders, you would also loose your satistics so that wouldn't be a solution either.
Please Log in or Create an account to join the conversation.
Time to create page: 0.056 seconds