[TYPO3-commerce] additional address form fields

Mario Hinterreiter mrng at gmx.net
Wed Sep 10 14:44:49 CEST 2008


Although I reply to a bit older message it seems not to be solved yet.

I also want to add some fields to the adress form, and I've got a solution
how to get them into correct order. Normaly new fields appear at the end of
the form because they are just added to an existing php-array ($fieldList),
so we just have to clear the array first and define all fields again in the
order we want.

To clear the array just add this line TS into the setup:
plugin.tx_commerce_pi3.billing.sourceFields >

To define the fields again just copy the according TS-code from
static/setup.txt into your setup, and add the fields you want to:
plugin.tx_commerce_pi3.billing.sourceFields.name.mandatory = 1
plugin.tx_commerce_pi3.billing.sourceFields.surname.mandatory = 1
and so on ...

Unfortunately the other problem mentioned below, that the language-labels
for 'title' and 'description' get overwritten with 'billing_title' and
'billing_description', still exists.

Has anyone an elegant way how to work around this?

cheers, mario



Heiko Hänsge wrote:
> 
> Hello,
> 
> I just wandet to share how to manage additional address form fields if 
> they are needed.
> In our case we also need the fields 'telephone', 'fax', 'customer 
> number' and 'gender'.
> 
> The TS setup has to get extended by those fields to produce the form 
> fields:
> 
> plugin.tx_commerce_pi3 {
>     billing.sourceFields {
>        phone.mandatory = 0
>        fax.mandatory = 0
>        custnumber.mandatory = 0
>        gender.mandatory = 1
>      }
> }
> 
> If possible we use the field names according to already existing DB 
> fields in tt_address table.
> If we need fields not yet existing in the tt_address table we have to 
> add them to the table, for example with the kickstarter.
> 
> All additional fields are now put at the end of the form which is not 
> nice for the 'gender' field since we would expect it to stick in front 
> of the name field. Unfortunately I couldn't find a solution yet to sort 
> the form fields in the frontend form. Somebody knows a solution?
> 
> Next we need to add the labels for our new fields in the TS setup (in 
> our case in German):
> 
> plugin.tx_commerce_pi3 {
>     _LOCAL_LANG.de {
>         general_phone = Telefon
>         general_fax = Fax
>         general_custnumber = Kundennummer
>         general_gender = Anrede
> }
> 
> Now the new form fields shoud occur with labels in the frontend.
> One has to be carefull with the tt_address fields 'title' and 
> 'description' because the form fields are generated correctly BUT the 
> labels are not getting parsed correctly. They will be overwritten by the 
> following label values for billing or delivery :
> 
> plugin.tx_commerce_pi3 {
>     _LOCAL_LANG.de {
>         billing_title = Rechnungsadresse
>         billing_description = Angaben zur Rechnungsadresse
> }
> 
> This might be a bug though.
> 
> Our new address form field values are getting stored in the DB 
> automaticly while checking out.
> Next step is to create additional markers for the email template and to 
> substitute them by the form field values.
> That's were I'm just working on...
> 
> regards
> Heiko
> _______________________________________________
> TYPO3-project-commerce mailing list
> TYPO3-project-commerce at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-commerce
> 
> 

-- 
View this message in context: http://www.nabble.com/additional-address-form-fields-tp14026181p19412791.html
Sent from the TYPO3 - Projects - Commerce mailing list archive at Nabble.com.



More information about the TYPO3-project-commerce mailing list