How to translate {VAR:billing_address.address_title} in email templates

  • Posts: 6
  • Thank you received: 0
3 months 4 weeks ago #298170

-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.12

Hi,

in our german language shop we want to salute the costumer by title and lastname. So I've inserted {VAR:billing_address.address_title} and {VAR:billing_address.address_lastname} in the notification email template. Unfortnately {VAR:billing_address.address_title} is not translated, so the var is replaced with 'Mr' instead of 'Herr'. Is there a way to get the translated value?

A second question: If possible, we want salute the costumer by title and lastname in checkout / end.php too. But I can't find a way to get this values. Can you please help my to get this values?

Thanks

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

  • Posts: 64484
  • Thank you received: 9313
  • MODERATOR
3 months 4 weeks ago #298171

Hi,

The tag {VAR:billing_address.address_title} will directly use the value from the database, without any processing.
So you can't use that.
You need to use PHP instead.
For example:

<?php echo JText::_('HIKA_TITLE_'.strtoupper($data->cart->billing_address->address_title)); ?>

For the end page, it's sure is possible too. But you'll need to customize the view file used there with custom PHP code. It will depend on how your checkout is configured, which payment method you're using and how you've configured it, so I can't give a precise answer without knowing that.

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

  • Posts: 6
  • Thank you received: 0
3 months 4 weeks ago #298196

Hi Nicolas,

Thank you very much, it works fine with php code.

I've talked with my client because the end page. We leave it unpersonal with a standard text, because the more complicated idea would not bring a big advantage.

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

Time to create page: 0.070 seconds
Powered by Kunena Forum