At the moment the VM-Chrono module displays the values from the form in the cart using the fieldname of the table as the label for the field.
This is because it is not possible to read the actual labels from the form. So now you are limited to short labels without spaces.
In a bright moment I found a real easy solution for this. Just by putting a JText::_()-tag around the label from the database,you can translate the labels via the regular Joomla language files! And even different labels for different languages.
The feature will be in an updated release soon. For existing users I'll post the modifications here, it's just 3 lines!
Open the file modules/mod_bix_vmchrono/helper.php in your FTP-program. Find the function ValuesfromFormid (line 61).
Add two lines to the beginning of the function to include the language-file. Then the function starts like this:
| Code: |
function ValuesfromFormid ( $formid, $mod_params, $object = 0, $showfields_arr = Array() ) {
$lang =& JFactory::getLanguage();
$loadlang = $lang->load('mod_bix_vmchrono');
$hmtl = '';
...
|
Now we must put the JText::_()-tag around the db-fieldname. That is on line 98.
| Code: |
$hmtl .= '<li><span class="bix_vmc_label">'.JText::_($key).': </span><span class="bix_vmc_value">'.$value.'</span></li>';
|
You see the tag placed around $key.
Now you can add the translations to the language file. Open your language file from languages/en-GB/en-GB.mod_bix_vmchrono.ini and add the lines to translate the fieldnames. This is an example from the Bixie demosite:
| Code: |
;formlabels in cart - define your own here. Always use CAPITALS in front of the =
TEXTFIELD=Your text
DEMOOPTION=Quality
OPTION2=Extra options
|
And this is the result:
I hope it makes your forms look better again!