1172 Posts in 334 Topics by 320 members
Jump to:If this is your first visit, you will need to register before you can post. However, you can browse all messages below.
| Page: 1 | go to end | Reply | |
| Author | Topic: Form Fields | 175 views |

18 August 2008 at 4:28am
Hi
I need to add a field to a product order form which editable by the user. To add extra detail about the product being bought. ie what colour is wanted.
Not quite sure how to adapt this and where to put it
class MyCustomRole extends DataObjectDecorator {
function augmentEcommerceFields(&$fields) {
// Returning users shouldn't be shown phone / email fields
if($this-owner->ID) {
$fields->removeByName('HomePhone');
$fields->removeByName('MobilePhone');
$fields->removeByName('Email');
}
}
}
Thanks in advance
| 175 views | |||
| go to top | Reply |