I doubt that you need to extend controllers or models heavily for the template. Possibly something small.
You can do one of the following:
1. Create a hook to controller
2. Create "pre" or "post" controller
Note: You can not override controller completely.
For #1. You need to create an Extension type class with "magic" hook method inside of main.php of your extension.
(This can be done in included file of cause)
Example:
class ExtensionTestName extends Extension {
public function onControllerPagesCheckoutPayment_InitData() {
$that = $this->baseObject;
}
}
This class name should consist of Extension[extension text id] and shoudl extend Extension base class
To hook to specific controller, you need to create a "magic" method that id constructed as following:
onController[controller name path]_InitData()
or
onController[controller name path]_UpdateData()
InitData() is before main controller is executed and UpdateData() after main controller is executed.
To access and change main controller objects and data use $this->baseObject;
For #2.
You need to create a new controller with the same relative path as main controller starting from [ext dir]/[storefront oe admin]/controllers/....
Name of the controller should end with .pre or .post.
Example: ../checkout/payment.pre.php
As for model. You can not extend model easily. You can always create your own model and get data what you need for your controller or hook.
This document covers extension dev in details:
https://abantecart.atlassian.net/wiki/spaces/DOC/pages/17727622/Extension+s+Developer+GuideIf you have suggestions how to improve this document, please let us know. Help us to improve it.