[TYPO3-commerce] How get a dropdown select in billing?

Bert Hiddink hiddink at bendoo.com
Sat Jan 16 15:57:45 CET 2010


Hello,

I found the solution (and bug):

Somewhere at line 750 (class.tx_commerce_pi3.php and 
class.tx_commerce_pi4.php):

...
		// If static items are set
		if (is_array($fieldConfig['values.'])) {
			foreach($fieldConfig['values.'] as $option) {
				$result.= '<option name="' . $option . '" value="' . $option . '"';
				if ($fieldValue === $option) $result.= ' selected="selected"';
				$result.= '>' . $option . '</option>' . "\n";
			}
		} else {

...

$fieldConfig['values.'] was missing a dot, therefore condition became 
false and hence the table-option was triggered...

Thanks and regards


Bert Hiddink wrote:
> Hello!
> 
> I tried the following to get a dropdown for the field gender in the 
> billing-part:
> 
> plugin.tx_commerce_pi3 {
>    billing.sourceFields {
>       gender {
>           type = select
>           values {
>             0=man
>             1=vrouw
>           }
>           default = man
>           mandatory = 1
>         }
>     }   
> }   
> 
> 
> This does not work but what  is wrong here? Any ideas?
> 
> Thanks in advance!
> 
> Bert



More information about the TYPO3-project-commerce mailing list