[TYPO3-commerce] RFC: #26552 Can't store addresses when using select field with value list
Michael Knabe
typo3 at mfkhh.de
Mon May 2 16:00:12 CEST 2011
This is an SVN Patch request.
Type: Bug
Bugtracker references: http://forge.typo3.org/issues/26552
Branches: trunk
Description:
You can define a select box with a value list, which is working fine in
the edit/create-form:
tx_commerce_pi4.formFields.gender {
type = select
values {
m = Herr
f = Frau
}
}
However, when you store the address, pi4 tries to fetch the label for
the selected value from the database, which fails as no table is defined
here intentionally.
Solution:
One solution I saw on some systems is, to create a static table that
contains nothing but the value/label-list. A cleaner solution is done in
the attached patch: If the select-field has no table defined, but a
value list, use the value list from TS-configuration to get the label.
It also throws a more descriptive exception than TYPO3 does, if no
values are configured at all.
Steps to reproduce:
- Add the config above to your TS.
- Add the marker ###FIELD_GENDER### to the pi4-template.
- Log in.
- Try to create a new address in checkout process.
Cheers,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: commerce_26552.diff
Type: text/x-patch
Size: 1636 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-commerce/attachments/20110502/8916bc66/attachment.bin>
More information about the TYPO3-team-commerce
mailing list