News:

Looking for documentation? Take a look on our wiki

Main Menu

Order Status Description in Shopper Email (what changed ?)

Started by dirkb, May 06, 2019, 13:24:27 PM

Previous topic - Next topic

dirkb

echo jText gives me the language constant
vmText directly give me the expected translation (TEST NEWSITE)

See screen.

Jörgen

Then You have to examine the key, I said it contains hidden characters, blanks, carriage return, tabs, you name it.
It is there, you have to examine the result and take appropriate action, this is not VM support, this is common PHP
programming. Find the issue and remove it, there are plenty of PHP functions to use both to examine the key
and to strip unwanted characters. Methodical approach is the best way to do it. I doubt that the vMText is buged,
but without checking Your string, we will never know.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

else add trim + strtoupper to be sure you have the KEY right formated.
something as
$key = strtoupper(trim($key));

dirkb

Jörgen and Studio.

Thanks for all your help. Appreciate it.
Jörgen was right, the ORDER_STATUS_ had a hidden space. Now its working perfectly.
Compared to the core hack I had to do back with 3.0.19, that solution is very elegant =)

cheers

DubStudio

Quote from: Studio 42 on May 07, 2019, 15:00:06 PM
If you use this solution
$order_status_description_key = 'ORDER_STATUS_ '.$this->orderDetails['details']['BT']->order_status.'_DESC';
echo vmText::_($order_status_description_key);
Then you need to add the language keys
ORDER_STATUS_X_DESC
Where X is the order_status Key
If the key is not translate in all cases, then you need to add override in Joomla language FRONT+ADMIN overrides!
Because when you generate the order in admin, the admin Keys are used for overrides and not front


The mysterious space is actually in the above code, so anyone copying and pasting it should delete the space after 'ORDER_STATUS_

AH

Regards
A

Joomla 3.10.11
php 8.0