I'm trying to create some custom product types by subclassing the base product in the core. The goal is to have additional products with different fields, requirements, etc. but when I subclass the ProductController, the new product page is still using ProductController. Example:
This works fine and I'm able to add the new product page.
class CustomProductController extends ProductController {
public function init() {
echo "HELLO!"
}
}
The new CustomProduct page will not use this controller and always uses the ProductController class. I've used the debug_request variable and I get this in return:
Debug (line 262 of RequestHandler.php): Testing '$Action//$ID/$OtherID' with '' on SilverShop\Page\ProductController
Debug (line 270 of RequestHandler.php): Rule '$Action//$ID/$OtherID' matched to action 'handleAction' on SilverShop\Page\ProductController. Latest request params: array ( 'Action' => NULL, 'ID' => NULL, 'OtherID' => NULL, )
Debug (line 186 of RequestHandler.php): Action not set; using default action method name 'index'
I'm trying to create some custom product types by subclassing the base product in the core. The goal is to have additional products with different fields, requirements, etc. but when I subclass the ProductController, the new product page is still using ProductController. Example:
This works fine and I'm able to add the new product page.
The new CustomProduct page will not use this controller and always uses the ProductController class. I've used the debug_request variable and I get this in return:
Is this a bug or am I missing something?