[TYPO3-commerce] Templated forms for checkout
robelix
roland at robelix.com
Sat Sep 29 14:18:55 CEST 2007
Hi!
Here is a patch (for current svn) that allows templated Address- and
Payment-Forms.
By default it changes nothing, to use the templated Forms for Addresses add:
plugin.tx_commerce_pi3.billing {
formTemplate = TEMPLATE
formTemplate.file = path/to/your/template
formTemplate.subpart = ADDRESSFORM
}
plugin.tx_commerce_pi3.delivery.formTemplate <
plugin.tx_commerce_pi3.billing.formTemplate
The Template file:
<!-- ###ADDRESSFORM### begin -->
Available Markers for every Input:
###FIELD_LABEL_FIELDNAME###
###FIELD_ERROR_FIELDNAME###
###FIELD_INPUT_FIELDNAME###
###FIELD_NAME_FIELDNAME###
###FIELD_INPUTID_FIELDNAME###
###FIELD_VALUE_FIELDNAME###
<!-- ###ADDRESSFORM### begin -->
Using it for payment:
The payment-object ist checked for the method getFormTemplate, if this
returns an array like:
function getFormTemplate($pObj) {
return Array(
'file' => 'path/to/payment/form/template.tpl',
'subpart' => 'MY_PAYMENT_FORM'
);
}
then the Template is used. Since it's optional it doesn't require any
changes in existing payment modules.
have fun,
Robelix
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: class.tx_commerce_pi3-formTemplate.patch
Url: http://lists.netfielders.de/pipermail/typo3-project-commerce/attachments/20070929/8899d8dc/attachment.txt
More information about the TYPO3-project-commerce
mailing list