VirtueMart Forum

VirtueMart 2 + 3 + 4 => Language/Translations => Topic started by: gcarne on April 29, 2014, 17:04:06 PM

Title: [SOLVED] Untranslated info message
Post by: gcarne on April 29, 2014, 17:04:06 PM
1) The info message in the attachment below after deleting a shipment address does not show up as language constant in the overrides search. Where does it reside and how can it be translated?

2) After successful payment with credit card a blue success info text is shown which I need to edit. Is it in VM2 or does it come from the payment plug-in? It is not in the overrides search.

VM 2.0.26d

[attachment cleanup by admin]
Title: Re: Untranslated info message
Post by: GJC Web Design on April 29, 2014, 20:45:13 PM
hard coded in administrator\components\com_virtuemart\models\user.php

line 1406 on vm2.0.26d

if($db->query()){
            vmInfo('Address has been successfully deleted.');
            return true;

what does 2) say?
Title: Re: Untranslated info message
Post by: gcarne on April 30, 2014, 09:20:53 AM
Hello,

1) I guess I can create a new language constant and change user.php in line 1406 accordingly. Can I do this in a copy of user.php and insert the copy at root/templates/<myTemplate>/html/???/??? to protect it from upgrades or is it only possible by changing the core file as this is in the administrator directory?

2) Below is the text after successful payment. It gets translated, but I need to edit it so that a user gets adequate information about how to display/print his order and I cannot find the language constant using the Joomla override search.

German: Der Bezahlvorgang war erfolgreich.
English:  Your payment process was sucessful.

Thanks.
Title: Re: Untranslated info message
Post by: GJC Web Design on April 30, 2014, 09:32:43 AM
you can't over ride a model so you need to change that core code

e.g.  vmInfo('COM_VIRTUEMART_REG_ADDRESS_REMOVED');

I've never looked at how VM detects a lang var (must it be capitalised and underscored?)

2) payments return..

normally the return from payment plugins is a html var from the plgVmConfirmedOrder() function

so look in what ever payment plug your using  - find that function and then look for the $html code

e.g. the core standard one plugins/vmpayment/standard/standard.php

around lines 115

$html = '<table class="vmorder-done">' . "\n";
      $html .= $this->getHtmlRow ('STANDARD_PAYMENT_INFO', $dbValues['payment_name'], 'class="vmorder-done-payinfo"');

those lang vars are in  administrator/language/en-GB/en-GB.plg_vmpayment_standard.ini

your payment plug should have a ini as well in the admin lang folder

Title: Re: Untranslated info message
Post by: gcarne on May 01, 2014, 13:23:11 PM
I have successfully solved both issues by editing the relevant language- and php-files.

Many thanks to GJC who helped me find the right places.