\Commerce_Controller
Top level controller that all commerce controllers should extend. There are some methods that have to be taken from ContentController to allow the Commerce module to operate with just the core framework, or with the CMS.
Currently this class acts pretty much as just a container for these classes.
Synopsis
class Commerce_Controller
extends Controller
{
- // members
- private static String $url_segment;
- protected $dataRecord;
- // methods
- public void data()
- public void getDataRecord()
- public void setDataRecord()
- public void Link()
- public void init()
- public void getPostageAreas()
- public void results()
Hierarchy
Extends
- Controller
Members
private
- $url_segment
—
String
The URL segment that is matched from the routing rules. This MUST be set on your extension class, as it is used to generate $Link()
protected
- $dataRecord
Methods
public
- Link()
- data() — Returns the associated database record
- getDataRecord()
- getPostageAreas() — Function to find relevent postage rates, based on supplied country and zip/postal code data.
- init() — Init actions that happen globally to all commerce interfaces.
- results() — Process and render search results. This has been hacked a bit to load products into the list (if they exists). Will need to come up with a more elegant solution to dealing with complex searches of objects though.
- setDataRecord()