VirtueMart Developer ManualSoeren Eberhardt-Biermann
x
1Chapter 1. Introduction1.1. HistoryVM has its roots in an Open Source Shopping Cart Script called phpShop. This script was developedby Edikon Corp. a
Joomla! Integration2Table names have changed and got a prefix!! Use #__{vm}_tablename instead of tablename.The #__ stands for the dynamic Joomla table
3Chapter 2. Basics2.1. Directory and File StructureVM holds most of its files in the /administrator part of Joomla. The only files stored in the /comp
Directory and File Structure4Contains the classes of the phpMailer Package (also used byJoomla! and Mambo) - see phpmailer.sourceforge.net/ [http://ph
Main Flow Chart5for selection as the availabilityimage for a product - so justcopy them here./category Contains images for categories/product Co
Shop Part62.2.2. Shop PartWhen the Shop is loaded, one of the first things is to load the file virtuemart_parser.php usingthe require_once command. It
Other importantEnvironment variables7 // Load class definition file require_once( CLASSPATH."$class.php" ); $classname = str_replac
Logging events withthe vmLogger object8These are the example settings for an unregistered, not-logged-in user.ps_session $sess Mainly used to format a
Database Structure9•$vmLogger->warning( 'My warning message to the user' ); // Mainly used to trigger warnings•$vmLogger->notice( &apo
VirtueMart Developer ManualSoeren Eberhardt-BiermannCopyright © 2005-2007 Soeren Eberhardt-BiermannThis document is published under the Open Co
User Integration102.6. User IntegrationVM uses Joomla's user table jos_users for the User Management. Users which are no customers,have just empt
11Chapter 3. Modifying the LayoutThe most important part of the Layout of your Shop is the Joomla template (Joomlahut.com [http://mambohut.com/] is a
Templates12A template is a file holding HTML and PHP code for displaying a page or a part of it. Example: thefile /templates/product_details/flypage.t
Templates13product_url The Product URLproduct_in_stock The Number of Products currently in Stockproduct_available_date The UNIX Timestamp for the Prod
Templates14edit_link The link to the product form of this product (admin only)ask_seller The link to the "Ask a question about this product"
Templates15files The object list of all addtional files this product hasbuttons_header The PDF, Email and Print buttonsbrowsepage_header The heading,
Finding the right File163.2. Finding the right FileWhen you want to modify a part of your Shop (that can't be changed in its layout using the Joo
Basket Templates173.3.4. Basket TemplatesBasket templates control the layout of the basket.The templates can be found in the directory /themes/VM_THEM
19Chapter 4. Creating or modifyingExtensionsBesides core modules, you can also add shipping and payment modules into VM. The concept ofboth - shipping
Quick-Create a new payment method20Figure 4.1. Payment Method Form, Tab 1NoteBe sure that you have NOT selected "credit cart payment" or &qu
Implementation Details21CautionThe code inside this form MUST BE VALID! If you use PHP code, check if you have writtencorrect code that can be parsed!
Installing a Payment Module22returns true if the configuration file for that payment moduleis readable,false if notvoid write_configuration( Array )St
The Shipping API specification23• myShipping.cfg.php (containing all necessary configuration constant definitions)When activated in the Shop configura
Installing a Shipping Module24returns true if the configuration file for that module is writeable,false if notNotePlease always change configuration
25Chapter 5. Developer Guidelines5.1. General5.1.1. Using and updating the ChangelogThe file CHANGELOG.txt contains the Changelog for the recent Major
Accessibility26All SQL queries must be compatible with at least MySQL version 4.0.5.1.2.3. Mambo version compatibilityFuture versions of VirtueMart wi
Order and Spacing27Order and SpacingTo ease long term readability of source code, the text and tags must conform to the order and spacingprovided in t
Required Tags ThatHave Variable Content28 * @copyright 2004-2007 VirtueMart Developer Team * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
SVN Access29Feel free to apply whatever copyrights you desire. When formatting this tag, the year should be in fourdigit format and if a span of years
Documentation Sources30ImportantBefore you run the scripts make sure that 7Zip is installed on your computer.1. Configure the scripts!First you must o
Code315.4.1.3. Using tagsIf in doubt, lay down a tag. Tags are useful for pinning down a particular version of the code,e.g. one that is being run i
Database325.4.3.1. "Whoops! I checked in the wrong thing!"Once a change has been committed you cannot un-commit it. You have to reverse the
33Chapter 6. About the Project6.1. The ProjectVirtueMart is an Open Source E-Commerce solution for Joomla! and Mambo.VirtueMart is released under the
vTable of ContentsPreamble ... ix1.
viiList of Figures4.1. Payment Method Form, Tab 1 ... 204.2. Payment Me
ixPreambleThe content of this document is related to VirtueMart.VirtueMart is free Software, licensed under GNU/GPL; VirtueMart [ http://www.virtuemar
Comments to this Manuals