VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: patrik60 on April 21, 2012, 16:09:17 PM

Title: Translate order status
Post by: patrik60 on April 21, 2012, 16:09:17 PM
Is there any way to translate order status?
Title: Re: Translate order status
Post by: K&K media production on April 22, 2012, 22:39:10 PM
You can rename it in BE.
Title: Re: Translate order status
Post by: patrik60 on April 22, 2012, 23:34:33 PM
Thank you,but this makes no sense in a bilingual shop.
Title: Re: Translate order status
Post by: patrik60 on April 23, 2012, 12:28:52 PM
It can be done by using language strings (language override). It works then fine in Virtuemart->Account Maintenace->Order Information->Order History.

But it doesn't work in "your orders" tab and confirmation E-Mail.
Title: Re: Translate order status
Post by: Studio 42 on April 30, 2012, 21:54:51 PM
Hi,
You can use a language Key as joomla , but it's possible in some view the function jText is not in all template files.
Title: Re: Translate order status
Post by: patrik60 on July 15, 2012, 13:56:56 PM
Will there be any solution? It is somehow curious: in the same document I get once a correct translation and on the other side just the language string. See attached pic, it is from the confirm email. Once you can see "In Bearbeitung" (=correct translation) and once you see just the string BEARBEITUNG.


[attachment cleanup by admin]
Title: Re: Translate order status
Post by: jjk on July 15, 2012, 15:32:38 PM
Might be a typo in your 'Downloadable products' plugin language file. (Can't check that, because I don't have that plugin)
Title: Re: Translate order status
Post by: patrik60 on July 15, 2012, 15:39:28 PM
No, I don't think so. See the attached pic. There are problems also in other parts of VM.

[attachment cleanup by admin]
Title: Re: Translate order status
Post by: jjk on July 15, 2012, 16:03:27 PM
"Bearbeitung" is not part of the VM2 source code/language files. So I suppose it is somewhere in your 3rd party template.
Title: Re: Translate order status
Post by: patrik60 on July 15, 2012, 16:12:30 PM
"Bearbeitung" is a language override of "Pending". My question was, why this is working on some parts of VM and on others not.

Since I'm using a bilingual shop, I need to translate order status for both, English and German versions.

There are also other things like e.g. cart attributes which do not work on every part of VM.
Title: Re: Translate order status
Post by: jjk on July 15, 2012, 20:26:28 PM
Got a hint from the lead devloper  ;)
Go to VM2 'Configuration' - 'Order Statuses' and select 'Pending'. In the field 'Order Status Name' enter "COM_VIRTUEMART_ORDER_STATUS_PENDING" (without the quotes) and click on 'Save'. Now it should pick the order status name from the language files. Do the same with the other order statuses. (Don't forget to delete your override)

This is similar to the translation of custom fields.

Update:
Initially works in the backend, but now the emails contain for example: Your order status is COM_VIRTUEMART_ORDER_STATUS_CONFIRMED. Didn't figure out yet how to adjust this now.
Title: Re: Translate order status
Post by: patrik60 on July 16, 2012, 09:59:04 AM
QuoteUpdate:
Initially works in the backend, but now the emails contain for example: Your order status is COM_VIRTUEMART_ORDER_STATUS_CONFIRMED. Didn't figure out yet how to adjust this now.
Now you are as far as I am  ;) Have a look at my fourth post in this topic.

It doesn't matter wether I use COM_VIRTUEMART_ORDER_STATUS_PENDING or BEARBEITUNG. The result remains the same.

The problems with the translation of the custom fields (cart variant) are similar. It doesn't work on the details page of a product: There you will see e.g. COLOR_GREEN. In the cart and the invoice it is translated correctly: green.
Title: Re: Translate order status
Post by: patrik60 on July 16, 2012, 14:54:41 PM
I have seen now that the order status has been updated in rev 6282. It works fine now in the confirm email.

It still not works in the order list (user -> edit_orderlist.php and orders -> list.php). The code there is

<?php echo ShopFunctions::getOrderStatusName($row->order_status); ?>

Could it be completed with a JText function?
Title: Re: Translate order status
Post by: patrik60 on July 16, 2012, 15:11:20 PM
The line must be changed into

<?php echo JText::_(ShopFunctions::getOrderStatusName($row->order_status)); ?>

This way it works also in list.php and edit_orderlist.php
Title: Re: Translate order status
Post by: alatak on July 16, 2012, 19:01:00 PM
Hello,

I have fixed it by adding the JText in the getOrderStatusName function. It will be added in the 2.0.8.e release.
Title: Re: Translate order status
Post by: patrik60 on July 16, 2012, 19:35:07 PM
Thank you. Just checked it from the SVN, works fine. Is there also a possibility to add translation into Custom Field Type: Cart Variant? Title works fine everywhere, values do work everywhere except in the details page of a product.
Title: Re: Translate order status
Post by: alatak on July 17, 2012, 08:39:00 AM
Hello,

hum i have tested also the cart variant and for me it works.
Did you test again?
If yes, can you tell me how you create your custom field, i will try again.
Title: Re: Translate order status
Post by: patrik60 on July 17, 2012, 10:48:23 AM
I'm on rev 6286 now. Step by step what I've done:


1. Create a custom field
2. Select customfield type: Cart Variant
3. Enter title: NOTENSCHRIFT
4. Cart Attribute: Yes

Go to Extensions -> Language Manger -> Overrides

Add NOTENSCHRIFT in both, EN - Site and DE - Site and translate (Alphabetic symbols / Notenbeschriftung)

Add VM_NEIN and VM_JA in both, EN - Site and DE - Site and translate (will be values in product No / Nein    Yes / Ja)**

5. Go to VM -> product
6. Create new product
7. Add custom field1 -> customfield type NOTENSCHRIFT, set value VM_NEIN
8. Add custom field2 -> customfield type NOTENSCHRIFT, set value VM_JA

On the details page you see now the cart attribute "Alphabetic symbols" and you can choose between VM_NEIN and VM_JA. In the cart you will see  Alphabetic symbols No or Alphabetic symbols Yes. Here the appearance is correct.

To be shure that VM works correctly I have disabled all template overrides.

**It is even not necessary to translate Yes and No since both strings exist in the VM language file (COM_VIRTUEMART_YES and COM_VIRTUEMART_NO). The effect remains the same.
Title: Re: Translate order status
Post by: patrik60 on July 20, 2012, 18:02:52 PM
I have found now also an other issue about the title of the cart variant. The translation of the title is ok in the confirm email. But in the update order status email the title is no longer translated. Instead of "Notenbeschriftung" (in English "Alphabetic symbols") only the string NOTENSCHRIFT is visible.

BTW I tried also to set the language strings of the values in the default field of the cart variant form (VM_NEIN;VM_JA) and enable "Is a list?". This way I didn't have any succes neither.
Title: Re: Translate order status
Post by: jjk on July 20, 2012, 22:12:19 PM
Your attempt to translate cart variant values dosn't look entirely correct to me. I've added some images which you might use as an example for your setup. The translated values in my example do show up correctly in the cart and the emails, too. (I'm using latest SVN version)

(Note: the forum software allows a maximum of 4 images per post. There are 3 more in the following post)

The order status translation is more simple. Just enter the order status key into the order status name field (see last image in next post).  This works fine in latest SVN version, also in the emails.


[attachment cleanup by admin]
Title: Re: Translate order status
Post by: jjk on July 20, 2012, 22:13:30 PM
Here are the last three images:

[attachment cleanup by admin]
Title: Re: Translate order status
Post by: patrik60 on July 21, 2012, 00:28:22 AM
I want the custom field type as a cart variant not as a string.
See my pictures. It is really not working. Read also this post:

http://forum.virtuemart.net/index.php?topic=99678.msg351136#msg351136

especially this sentence in the quotes: ...EXCEPT in the product detail page, the most important one for the customer.

I'm not the only one having this problems. He is talking about the cart variant and because it is not working correctly he was changing to drop plugin. This is another problem I don't want to talk about because it is a third party extension.

This user is also telling that it works everywhere EXCEPT product details page. There is needed another JText function. But I don't know where, maybe in vmplugin.php, vmcustomplugin.php or shopfunctions.php.

BTW: Order status is working perfectly after fix of alatak in 2.0.8e!!

[attachment cleanup by admin]
Title: Re: Translate order status
Post by: patrik60 on July 21, 2012, 00:32:32 AM
More pics

[attachment cleanup by admin]
Title: Re: Translate order status
Post by: jjk on July 21, 2012, 07:12:32 AM
Quote from: patbe60 on July 21, 2012, 00:28:22 AM
I want the custom field type as a cart variant not as a string...
If you look at my first example image again you will see that it is a string AND cart attribute = "Yes" and this works, but I suppose you want it as a dropdown rather than a Yes/No checkbox in the cart, which I didn't test.
Title: Re: Translate order status
Post by: patrik60 on July 21, 2012, 07:24:09 AM
Quotebut I suppose you want it as a dropdown rather than a Yes/No checkbox in the cart, which I didn't test.

Yes you are right. I prefer the dropdown. And this one is working fine except in the product details page. I tried to find out where to add a JText function. I don't really have an idea about php coding. I think it needs a little bit more than a simple add of JText function. ???
Title: Re: Translate order status
Post by: rvbgnu on July 26, 2012, 19:26:08 PM
Quote from: jjk on July 21, 2012, 07:12:32 AM
Quote from: patbe60 on July 21, 2012, 00:28:22 AM
I want the custom field type as a cart variant not as a string...
If you look at my first example image again you will see that it is a string AND cart attribute = "Yes" and this works, but I suppose you want it as a dropdown rather than a Yes/No checkbox in the cart, which I didn't test.
I can confirm that the translation is working when NOT in a dropdown (selection list menu). I did a setup with radiobox as well before, with VM2.0.6 I think, and it was ok too. I am still hoping to find a nice solution, but like said above, I switch to the Dropbox plugin for the moment, I have more issues to fix with the checkout in the second language...

Please keep on the good work!!
Title: Re: Translate order status
Post by: alejandroamo on September 29, 2012, 23:49:12 PM
hi guys,
unfortunately, Im suspicious the developers did'nt fix this yet, as I am using the  2.0.10 release and still has exactly the same problem.

More confirmations, overe there?
Title: Re: Translate order status
Post by: jjk on September 30, 2012, 10:04:03 AM
Quote from: alejandroamo on September 29, 2012, 23:49:12 PM
hi guys,
unfortunately, Im suspicious the developers did'nt fix this yet...
Do you mean the 'Order Status' (the topic of this thread) or the custom field dropdown we were talking about in the last posts?
Title: Re: Translate order status
Post by: jbrailas on April 15, 2013, 10:29:33 AM
The bug is not resolved (or re-appears ? ) in vm 2.0.20b: Order Status doesn't use the translated strings which exist in el-GR.com_virtuemart.ini
Specifically, the following strings exist but they are not used:
COM_VIRTUEMART_ORDER_STATUS_CANCELLED
COM_VIRTUEMART_ORDER_STATUS_CONFIRMED
COM_VIRTUEMART_ORDER_STATUS_CONFIRMED_BY_SHOPPER
COM_VIRTUEMART_ORDER_STATUS_PENDING
COM_VIRTUEMART_ORDER_STATUS_REFUNDED
COM_VIRTUEMART_ORDER_STATUS_SHIPPED

Joomla 2.5.9 multilingual
Title: Re: Translate order status
Post by: K&K media production on April 15, 2013, 10:52:51 AM
Where? Confirmation email? Orderlist? ...
Title: Re: Translate order status
Post by: lindapowers on April 15, 2013, 11:53:25 AM
Can't you make it with the same method as translations for categories, products, payment methods etc?

Is a nightmare translating with those language files specially when after each upgrade the language files are overwriten.
Title: Re: Translate order status
Post by: jbrailas on April 15, 2013, 12:34:13 PM
Quote from: kkmediaproduction on April 15, 2013, 10:52:51 AM
Where? Confirmation email? Orderlist? ...

Confirmation emails for both shopper and shop admin.
+
Administrator>virtuemart>Orders & Shoppers>Orders
Title: Re: Translate order status
Post by: K&K media production on April 15, 2013, 13:32:14 PM
You need the language keys in your language overrides for administrator

extensions -> language manager -> overrides

choose administrator from dropdown

put there your overrides with key and translation
Title: Re: Translate order status
Post by: lindapowers on June 08, 2013, 13:48:05 PM
Hi guys,  in 2.021D  the order status inside the confirmation emails is not being translated and the files have those keys included as is the newest language pack avi.

The text im refering to shows this way in spanish just below the total at the order emails:

"El estado de su pedido es: Confirmed."

-------------------

Also the order status is not translated in the backend administrator of VM2.

Do we still need to make overrides as jjk mentioned previously or it should read it directly from the new language files?

Regards
Title: Re: Translate order status
Post by: jjk on June 08, 2013, 15:27:22 PM
Might be fixed already. I did see some changes related to the order status in 2.0.20d (not yet released  ;) ).
Title: Re: Translate order status
Post by: lindapowers on June 08, 2013, 15:42:06 PM
Oh sorry, yes im actually testing version D, Max send it to me to test few things.

He told me to change in the order edit status at the backed of VM: Confirmed to COM_VIRTUEMART_ORDER_STATUS_CONFIRMED etc that seems to work for the backend, have not tested yet in the emails.
Title: Re: Translate order status
Post by: bulesz on August 23, 2013, 08:40:35 AM
FYI:
Not working with VM2.22a in the order confirmation emails.

Not the lang codes in the lang files and neither with the overrides.
Title: Re: Translate order status
Post by: Marttyn on September 18, 2013, 20:46:00 PM
Still not working, im on v2.0.22a. Ive made the fix for myself. But you should fix for future releases.
Im working on this view: orders/details_items.php
Title: Re: Translate order status
Post by: Maxim Pishnyak on September 18, 2013, 21:06:07 PM
Why not fix on 22d then? What did you do?
Title: Re: Translate order status
Post by: Marttyn on September 18, 2013, 21:34:29 PM
I dont know if in 22d is corrected.
In 22a is not.
Just changed this (line 65 for me):
$this->orderstatuses[$item->order_status]

for this:
JText::_($this->orderstatuses[$item->order_status])