Bixie Forum

This is the forum for the free Bixie extensions and general questions.
Bixie customers can use the Support Center for their support questions.

You can visit the old forum here.

Video Tutorials

Bixie now provides video tutorials to help you setting up the Bixie VM-Chrono module.

Check out the video tutorials here for a step-by-step installation help!

Welcome, Guest
Please Login or Register.    Lost Password?

Changing the fieldnames in the cart-display
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Changing the fieldnames in the cart-display
#303
Changing the fieldnames in the cart-display 1 Year, 6 Months ago  
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!
malles
malles
Admin
Posts: 206
graph
User Offline Click here to see the profile of this user
Last Edit: 2010/07/22 11:09 By malles.
The administrator has disabled public write access.
Bixie customers can use the Support Center for their support questions.
 
#330
Re:Changing the fieldnames in the cart-display 1 Year, 6 Months ago  
Thank you, works great!
darkheart
darkheart
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#553
Re:Changing the fieldnames in the cart-display 1 Year ago  
Hi I have some problems:
- with 10Beta I see all correctly with fieldnames
- with 10RC I can see any fieldnames but I have done all that you have described in you post "Changing the fieldnames in the cart-display"

In the attachment you can see my problem.

How can I solve it?

regads
monak83
monak83
monak83
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/01/29 16:49 By monak83.
The administrator has disabled public write access.
Web Site with Joomla!!!
 
#554
Re:Changing the fieldnames in the cart-display 1 Year ago  
hi friend, sorry to say that admin has left the forum long time ago, dont hope for a reply........


we are waiting for a reply since 2010...........
rajeev_kk
rajeev_kk
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#555
Re:Changing the fieldnames in the cart-display 1 Year ago  
Really?
monak83
monak83
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
Web Site with Joomla!!!
 
#620
Re:Changing the fieldnames in the cart-display 12 Months ago  
Please, can someone help me???

Bye

mona83
monak83
monak83
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
Web Site with Joomla!!!
 
Go to topPage: 12
Moderators: baf