Change name for the taxes to be displayed

  • Posts: 38
  • Thank you received: 4
  • Hikashop Business
3 months 2 weeks ago #358196

-- HikaShop version -- : 5.0.2
-- Joomla version -- : 5.0.2
-- PHP version -- : 8.2

Hi,

My customer wants a different name for the taxes to be displayed in the checkout and on the invoice.
A simple solution would be to change the 'Tax namekey', but this is locked in the backend, only the tax rate can be adjusted.

- Why is the field blocked?
- What is the best way to implement this change while the shop is running?

Thank you and best regards
Stefan

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
3 months 2 weeks ago #358200

Hi,

It is blocked because the orders already created include that namekey. If you change the namekey of the tax rate, HikaShop will be unable to link the orders and the tax rate and so the columns with the total amounts on the tax rates listing would be 0.

The best way is simply to create a new tax rate and then edit your tax rule(s) and change the selected tax rate to the new one, leaving the old one in place in case you need to extract tax amounts for old orders in the future.

The following user(s) said Thank You: smart web

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

  • Posts: 68
  • Thank you received: 3
1 month 2 weeks ago #359695

Any way to translate the namekey?
When I made the tax settings I wrote in the hungarian version for the name and just found out that in the english version emails shows the hungarian namekey as well instead of VAT.

I found in the emails preload section this:
$cartFooters[] = array(
'CLASS' => 'tax_'.$k,
'NAME' => hikashop_translate($tax->tax_namekey),
'VALUE' => $currencyHelper->format($tax->tax_amount,$data->cart->order_currency_id)
);

Which means for me there is an option to translate, but can't find it anywhere.

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
1 month 2 weeks ago #359700

Hi,

There is indeed a way to translate it.
Just use the namekey as the translation key for your translation override.
For example if the namekey is "my tax rate at 10%", the translation key would be "MYTAXRATEAT10".
How to make translation overrides:
www.hikashop.com/download/languages.html#modify
Note that only latin letters, numbers and underscore are used for translation namekeys.
However, if the namekey doesn't have any of these, then the system will generate a sha1 of the text, which would then be uppercased, and then prepended with T to generate the translation key.
So for example, if your namekey is "Általános forgalmi adó", the translation namekey would be "LTALNOSFORGALMIAD"
But if your namekey is "付加価値税" (VAT in japanese), then the translation namekey would be "T68174B4E441F1686C879364A084E0E58323ED607"
You can convert text to sha1 with online tools like www.sha1-online.com/

The following user(s) said Thank You: Petike1007

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

  • Posts: 68
  • Thank you received: 3
1 month 2 weeks ago #359713

Works great!
Thanks

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

Time to create page: 0.072 seconds
Powered by Kunena Forum