Prev   Next

Chapter 2. Basics

Table of Contents

2.1. Directory and File Structure
2.2. Main Flow Chart
2.3. Core Modules & their Functions, Environment Variables
2.4. Database Structure
2.5. Database Access
2.6. User Integration

VM holds most of its files in the /administrator part of Joomla. The only files stored in the /components part of a Joomla site are those, which must be accessible from the Frontend of a Joomla site, even when the Administrator part is secured by htaccess files.

/administrator/components/com_virtuemart/

Contains file for the administration interface of VM. Because the administrative interface is also accessible from the frontend, those files are not restricted to the Joomla! Coding Standards. Important files:

/administrator/components/com_virtuemart/classes/

Holds all the core classes which are used by VM Important:

/administrator/components/com_virtuemart/classes/currency/

Directory for the Currency Converter Modules

/administrator/components/com_virtuemart/classes/export/

Export Modules (currently unused and deprecated)

/administrator/components/com_virtuemart/classes/Log/

Contains a slightly modified version of PEAR's Log class

/administrator/components/com_virtuemart/classes/nusoap/

Contains the "NuSOAP" classes for SOAP support in PHP versions < 5

/administrator/components/com_virtuemart/classes/shipping/

Contains Shipping Modules & their informational Files

/administrator/components/com_virtuemart/classes/payment/

Contains Payment Modules & their informational Files

/administrator/components/com_virtuemart/classes/pdf/

Contains the classes of the HTML2FPDF Package (see sourceforge.net/projects/html2fpdf)

/administrator/components/com_virtuemart/classes/phpInputFilter/

contains the phpinputfilter class for VirtueMart

/administrator/components/com_virtuemart/classes/PEAR/

Holds some packages of the PEAR

/administrator/components/com_virtuemart/html/

Holds files which are used for loading VirtueMart pages.

They are ordered by the core module name (e.g. checkout.*.php for the core module checkout)

Important files:

  • basket.php (controls the Cart)

  • ro_basket.php (controls the Cart on the last step of checkout, ro = read only)

/administrator/components/com_virtuemart/languages/

Contains the Language Files which are included from virtuemart_parser.php.

/administrator/components/com_virtuemart/sql/

Holds SQL Dump Files for building up the structure for the tables used by VirtueMart.

/components/com_virtuemart/

Holds the files wich are used to control the call of the Shop from the Frontend.

Important files:

  • virtuemart.php (the file included by Joomla on a call to index.php?option=com_virtuemart&....)

  • virtuemart_parser.php (the central file for VM, prepares the session, authentication, cart & runs functions)

  • show_image_in_imgtag.php (used to display dynamically resized images - using the class.img2thumb.php)

/components/com_virtuemart/css/

Contains the shop's css file (shop.css) and css styles needed for the frontend administration (admin.css)

/components/com_virtuemart/js/

Contains Javascripts

/components/com_virtuemart/shop_image/

Images for the Shop

/availability

Contains images for displaying the availability of a product.

Tip

All images in this folder are automatically parsed and displayed in the product form for selection as the availability image for a product - so just copy them here.

/category

Contains images for categories

/product

Contains Product Images + resized product images

/ps_image

Images for the administrative interface

/vendor

Vendor Logos

/components/com_virtuemart/themes

Contains the themes for VirtueMart. Each theme has the following structure:

Directory/FileFunction
/admin.cssthe stylesheet for the frontend administration
/theme.config.phpthe configuration file for the theme
/theme.cssthe main stylesheet for the theme
/theme.jsthe main javascript controller for the theme
/theme.phpthe "controller" for the theme; used to declare functions and include stylesheets (and more!)
/theme.xmlcontains the theme configuration parameters and additional information
/images/holds the theme images
/templates/holds the template files that allow you to style and restructure the shop pages
/templates/basket/holds the basket templates
/templates/browse/holds the templates for the product listing page
/templates/common/holds some commonly used templates, like the price display, pathway and the product snapshot
/templates/pages/holds the templates for all other pages (e.g. 'account.order_details.tpl.php')
/templates/order_emails/holds the order email templates as used when an order is placed
/templates/product_details/holds the product detail templates