News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

VM 3.0.16 order status description translation

Started by dirkb, May 19, 2016, 18:31:31 PM

Previous topic - Next topic

dirkb

VM 3.0.16 - J 3.5.1

Hi ... currently struggling with getting the order description to be translated into german and french and displayed in the notification emails.

For the order status names I worked with language overrides and modified the model order.php according to (http://forum.virtuemart.net/index.php?topic=101447.0) since we have to give the necessary bank info through the order description. Even so I hate touching core files, but it seems the only way. Now, how do I get the order status description translated too ? creating language overrides (COM_VIRTUEMART_ORDER_STATUS_EXPECT_PAYMENT_DESC) ... just produces the language constant in the mail, but not the translation. Has it somthing to do because its entered in an editor field.

Troubling that such a small thing can cause such a headache.

Anybody ideas ?

lindapowers


dirkb

Hi Lindapowers ... thanks for the tip. I just double checked and additionally changed (I did toggle before) the jce editor to not add any paragraphs and containers - I still get the language constant in the mails. No div wrapping. Funny enough, in the BE of the order status, its actually translating it in the overview page.

this is how I call the order status description for my mails ...

<?php echo ($this->orderDetails['details']['BT']->order_status_description) ; ?>

and add    

$q = "SELECT  o.*,u.*,
s.order_status_name,
s.order_status_description
FROM #__virtuemart_orders o

... in the order.php

Do I need to call it differently ?

lindapowers

Oh wait you are talking about order status description and I was thinking about payment description. Didnt even know the order status description was supposed to show in the emails.

dirkb

yes ... order description. The idea is that you have an order process canceled or other conditions, you can give the customer additional info. for example credit card, or paypal did not work, got canceled ... you can redirect them to other options - thats the idea, but somehow cant figure out how to get that translated automatically using overrides ...

betterlead

#5
Hi

Not sure if this is the cure for you, but anyway: Even if I use Swedish translation, I need to override the constants both for Swedish and for English. English for sure.

In Language Override admin, Create a New Override after first filtering for English (en-GB) - Administration (If you have that - don't we all?)  Check 'For both locations'. Fill in the Constant and then the text. (Copy textstrings from other 'Values' is a good idea and make the changes you want.

Do the same for German and French.

If you need, create subjects for both 'VENDOR_x' and for 'SHOPPER_x' (The small 'x' stands for the The Order Status Code.)

Try this, if I got your question right. I am really not sure. Might anyway, help someone else...

Kindest regards
/Betterlead

Edit: Ah! Got it now, this was not what you asked for. You need translation for Description of'Order Status'. Sorry.
Live site runs on Joomla 3.9.24 & VM 3.8.6 10373

PHP: 7.3.26

dirkb

Thanks for trying to help. Its flabbergasting  ;) to me how such a small issue, turns out to be such a headache. I´m a designer and not really a developer, so I understand usability but not always what makes it work underneath. Is it really so that the order status description is the only part in virtuemart which cannot be translated ? The mail feature is a way to communicate (automatically) with the customer. You tell them order received, processed etc. and you can add additional info based on the status of the order. Great ! ... but rendered useless in multi-language site ?! I think thats a big flaw.

Well, I hope somebody with some expertise still can help me.

Again, my steps ..

Based on http://forum.virtuemart.net/index.php?topic=101447.0   I was able to add the order status description in the mail template.

I called it like this .. <?php echo ($this->orderDetails['details']['BT']->order_status_description) ; ?>

Now look at the screens below. I created a language override with the language constant COM_VIRTUEMART_ORDER_STATUS_EXPECT_PAYMENT_DESC

If I add this constant in the BE in the order status description, I get only the constant, not the translation.

Anybody ideas ? any help would be appreciated - thanks d.


dirkb

OH MY GOD ... I found it. DAMN ... still a headache, but feeling better now.

<?php echo ($this->orderDetails['details']['BT']->order_status_description) ; ?></p>

<?php echo vmText::_($this->orderDetails['details']['BT']->order_status_description) ; ?></p>

need to add the vmText::_ ... and whopsi, translation shows up.

Hope that helps if somebody has the same issue.