Is this issue solved?
https://github.com/silverstripe/silverstripe-framework/issues/3131
i did :
class Shop_Controller extends Page_Controller {
public static $allowed_actions = array ('basket');
public function init() {
parent::init();
}
public function basket(SS_HTTPRequest $request){
$fields = new FieldList(
new TextField('firstname', 'Vorname'),
new TextField('lastname', 'Nachname'),
new EmailField('email', 'Email'),
new TextField('tel', 'Telefon')
);
$actions = new FieldList(
new FormAction('processPayment', 'Jetzt Bezahlen')
);
$validator = '';
$form = new Form($this, 'processPayment', $fields, $actions, $validator);
$Data = array(
'Breadcrumbs' => 'Shop / Ihr Warenkorb',
'Title' => 'Shop / Ihr Warenkorb',
'BasketForm' => $form
);
return $this->customise($Data)->renderWith(array('Basket', 'Page'));
}
public function processPayment(SS_HTTPRequest $request) {
}
}
******************************************************************************
//_config.php:
Director::addRules(100, array(
'shop//basket' => 'Shop_Controller'
));
What am i doing wrong?
thanks.timo.