The OpenCart Ecommerce software package is designed for database portability.
PHP, the native language of OpenCart, contains built in functions that are specific to different sql implementations, such as MySql, but these absolutely should not be used in any modules or add-ons that are written for OpenCart.
Instead, the DB class should be used, to preserve database [...]
Entries from November 16th, 2009
Database Access in OpenCart
November 16th, 2009 · No Comments · Uncategorized
Tags:
The OpenCart Controller base class
November 15th, 2009 · No Comments · article, news, opencart
All controllers in OpenCart share a common ancestor, the Controller class, located in the DIR_APPLICATION/system/engine/controller.php file. Note that DIR_APPLICATION is the path to your application directory, and is defined in the OpenCart config.php file.
In object oriented terms, the Controller class is called a base class. It contains common methods and data definitions [...]
Tags:
OpenCart Top Level Controller Architecture
November 14th, 2009 · No Comments · article, news, opencart
An OpenCart top level controller is responsible for orchestrating the complete construction of an OpenCart page.
As an example, the ControllerCheckoutCart controller class is responsible for coordinating the model data and the template view necessary to create a checkout cart page for the client.
Another example is the ControllerCommonHome controller class, which is responsible for the main [...]
Tags:
A Meta Tag to give Hints to AdSense
November 14th, 2009 · No Comments · WordPress, news
Here is a feature I would like to see incorporated into both WordPress and AdSense. If it already exists in some other form, I would like to know.
Basically, I would like to see a Meta Tag that tells AdSense (or other ad programs) ad categories it should not use, on a per page basis.
I’m thinking [...]
Tags:
How OpenCart Renders Pages
November 14th, 2009 · No Comments · article, news, opencart
The OpenCart Controller class contains a render method that is used to produce HTML pages output by all OpenCart classes that inherit from Controller class.
Here is how it works.
Each time a page is rendered, it is done with one top level controller. The top level controller may contain zero or more child controllers and [...]
Tags:
The OpenCart Router Class
November 13th, 2009 · 1 Comment · news, opencart
The OpenCart Router class takes a route string and converts it to an internal representation of a class and a method, typically for invoking a controller.
The Router class is specialized to the directory structure of OpenCart and the naming conventions for OpenCart controller files and class; therefore, before discussing the Router class in detail, it [...]
Tags:
The OpenCart Response Class
November 13th, 2009 · No Comments · news, opencart
The OpenCart Response class has a simple job. It outputs a page of HTML to a client browser.
But it does a few other things related to that function as well, including the following:
It compresses output data in accordance with how the OpenCart installation is configured and the client browser capabilitiles.
It maintains an array of header [...]
Tags:
The Open Cart “load” Class Variable and Magic Methods
November 13th, 2009 · No Comments · news, opencart
All controllers in the OpenCart ecommerce package inherit from the Controller class.
The load variable in those controllers was a bit of a mystery to me, because I could not figure out where it was assigned. Then I realized it was being accessed through the Registry class using a PHP language construct called a “magic [...]
Tags: