
Compatibility Layer
Published
Zencart, CRE Loaded and xtCommerce are branches build on osCommerce ms2.2. The general folder structure and framework is very similar, but not the same.
Following a short overview how MailBeez is build to be compatible with all platforms.
Recognize Platform
file: mailhive/common/functions/compatibility.php
Function mapping
switch to function-set of current platform. This example shows how to map to the platform-specific functions, the addon uses “mh_redirect()” as an abstract function call
Database Layer
osCommerce, CRE Loaded and xtCommerce are using the same model for the Database Layer just with their own function names – so it is an easy mapping.
Zen Cart is different since it uses a Database class with an object oriented model. I like this new approach – it is similar to what osCommerce Online Merchant v3.0 uses – but I was to lazy to rebuild everything.
For Zencart I included the original osCommerce Database Layer – it requires only a small adaption
file: mailhive/common/functions/osc_database.php
Afterwards the database layer looks like this (example mh_db_perform() )
Email Engine
file: mailhive/common/functions/email_engine.php
Since only osCommerce and CRE Loaded are using the same Email Engine the mapping to the platform’s email engine is separated in it own file.
osCommerce, CRE Loaded
Zen Cart
xtCommerce
If you customized your system to work with another email engine you only need to change this file.