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

Invoice Header and Footer

Started by Ventsi Genchev, March 18, 2019, 17:17:00 PM

Previous topic - Next topic

Ventsi Genchev

Virtuemart 3.4.3 .9975
Joomla 3.9.4

Header and footer in invoices remain in the default language.
There is no problem with the content.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

Ventsi Genchev

VirtueMart 3.4.5 10057

The situation is the same.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

StefanSTS

You can edit the invoice and mail layouts and set a language variable there.
echo vmText::_('SOME_HEADER');

The header and footer are normally given in VM config - Shop - Shop. This is plain text/HTML without translation. Mostly it makes sense if the shop owner wants to use the legal language in his country.

You might ask iStraxx if they can add a translatable field there for a membership. Maybe they are interested in doing that. The override with vmText will do though.

Regards
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Ventsi Genchev

#3
The configuration (VM config - Shop - Shop - Invoices/Emails) has "Invoice Head" and "Invoice footer" settings.
They are different for all languages and may change with an editor. You can change fonts, size, and even put text into tables.
If the store owner wants to be only in his / her own language, he can only put such content for all languages.

All this works in the emails without any problem and changes the languages according to the user.
Of course, I chose the "Invoice in user language" option from the configuration. (VM config - Configuration - Configuration - Orders)

In the invoices it also works normally and shows everything as I have set it up (fonts, sizes ...).
It only does not change the language in the header and footer. The content (user data, products, prices) is in the correct language. Status of the order too.

Only the header and footer on the invoice are in the default language.


Added to post: By the way, this happened after some update, but I do not remember exactly which one.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

StefanSTS

I tried that just now, you are right.
I never expected it to work because there are no language flags for the fields like in the other views like for product names.
Only for the CSS stile. Strange.

Thanks for pointing that out and proving me wrong.

--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Ventsi Genchev

No problem. It is good to solve this problem as well.
It is important that Virtuemart is getting better.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

StefanSTS

Maybe you find a hint why it does not work if you switch the setting in VM config - tab Orders "invoice in user language" on and off.

Check the name of the input element in the setting and search for that in the core files.

--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Ventsi Genchev

Yes, this is a good idea.
I will look for it, but in a few days, because I have important tasks at the moment, and I am late in the deadlines.

Thank you
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English

Ventsi Genchev

#8
By the way, a quick search:

components\com_virtuemart\views\invoice\view.html.php

if(VmConfig::get('invoiceInUserLang', false) and !empty($orderDetails['details']['BT']->order_language)){
if($orderDetails['details']['BT']->order_language!=VmConfig::$vmlangTag){
shopFunctionsF::loadOrderLanguages($orderDetails['details']['BT']->order_language);
$orderDetails = $orderModel->getOrder($orderDetails['details']['BT']->virtuemart_order_id);
}
}


The element name (invoiceInUserLang) only occurs there.

Maybe Max can give more information.
Audio Store:
https://vsystem.bg - Bulgarian language
https://vsystem.bg/en - English