Prev Chapter 1. Introduction Next

1.2. Differences to phpShop

VM still contains some code parts from phpShop, but experienced phpShop coders will find similarities.

So when you have experience with phpShop or you are to integrate an existing Add-On for phpShop into VM, you will have to know what is the difference between both scripts.

  1. Parameter Renames/Changes

    VM has introduced several new parameters and parameter name changes.

  2. Database Interface

    VirtueMart has its own database class: ps_DB. This database class has been completely modified to be a wrapper class for the Joomla Standard Database Class 'database'. The new filename is ps_database.php.

    VM doesn't connect to the database, but it uses the connection Joomla! has built up. This is for optimal performance since only one open DB connection is needed at runtime.

  3. Database Structure

    Table names have changed and got a prefix!! Use #__{vm}_tablename instead of tablename. The #__ stands for the dynamic Joomla table name prefix. The {vm} stands for the dynamic table name prefix of VM which allows to have more than one shop in one database.

    The database structure of phpShop had to be changed, because Joomla provides an excellent framework with session handling and user management. The following tables have been removed:

    There have been added several tables: jos_pshop_affiliate, jos_vm_affiliate_sale, jos_vm_creditcard, jos_vm_manufacturer, jos_vm_manufacturer_category, jos_vm_product_download, jos_vm_product_mf_xref, jos_vm_product_reviews, jos_vm_product_votes, jos_vm_shipping_carrier, jos_vm_shipping_rate, jos_vm_visit, jos_vm_waiting_list, jos_vm_zone_shipping - just to name some.

  4. Separation into "Component" and "Modules"

    A Joomla! site consists of various elements like components, modules, templates and mambots (called plugins since Joomla! 1.5) - most likely you will know components, modules and templates. A Component is the Main Part of the Page in the "Mainbody". It can have its own configuration/interface.

    Modules are "Side Blocks" surrounding the Mainbody. There are Modules for the Frontend and the Backend.

    The Main application "VirtueMart" is run in the component part. The Component contains all core files. The module "mod_virtuemart" was written to provide all important links so the component can be controlled: Category links, Mini-Cart, Product Search Form, Account Maintenance, Admin.