Project

General

Profile

Setting up a Development Environment » History » Revision 10

Revision 9 (Max Milbers, 09/08/2010 03:16 PM) → Revision 10/48 (Max Milbers, 09/08/2010 03:26 PM)

h1. Setting up a Development Environment 

 h2. Introduction 

 If you start developing for the project or just with VirtueMart you may have already set up a development environment with an IDE and a SVN program.  

 If you haven't done so or if you want to know what to do better, you can follow the instructions given on this page.  

 The following programs are recommended for working with VirtueMart and synchronizing the working directory with the local SVN repository:  

 * SmartSVN or TortoiseSVN 
 * Total Commander (perfect for sync'ing the contents of two directories)   
 * Zend Studio (the state of the art when it comes to a PHP IDE, costs!)  
 * or PHP Development Tools for Eclipse (very good PHP IDE and free!)  

 Of course there are other programs that can do the same as the ones mentioned above, but remember: these are just recommendations.  

 h2. Setup an IDE and SVN 

 If you want to join the project it is important that you have a similar environment like the other devs, so it makes it easier for everyone to help each other.  

 First setup up an IDE, I suggest you follow the explanations here: http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development  

 Then install jdump for debugging. You need it to prevent errors. 

 h3. SVN-Basics:  

 For pure installation information look at the chapter "Installation of virtuemart into your IDE". The SVN folder structure is setup with 3 root folders; trunk, tags and branches. The trunk folder is used for curent active development. The tags folder is used for public releases. The branches folder can be used for code branches.  

 The structure found under these root folders mimic the structure in a typical Joomla installation, however, only contain the VirtueMart code. This gives us the ability to easily commit and checkout directly from a Joomla installation as described above.  

 There are 3 different folders for backend, frontend and modules  

 * trunk/administrator/components/com_virtuemart ;pure vm 
 * trunk/administrator/language                    ;mixed 
 * trunk/components/com_virtuemart ;               ;pure vm 
 * trunk/language                                  ;mixed 
 * trunk/plugins                                   ;mixed 
 * trunk/plugins/vmpayment                         ;pure vm 
 * trunk/modules/(..not ready, we are pleased if you want to write a module)  

 The /trunk is your joomla base root = jRoot.  

 At best is if you have a joomla installation and make 1 checkout for back and frontend. Use for checkout on the joomla base root:  

 svn co https://dev.virtuemart.net/svn/virtuemart/trunk/virtuemart  

 After updating you should have the newest version of VirtueMart  

 If you want to check the mails you may want to use hamster as mailserver 

 h2. Installation of virtuemart into your IDE 

 Now there are two ways. Be aware that the joomla installation should work. 

 h3. Use the virtuemart installer to set the right entries for using virtuemart.  

 This step just needs that you manually delete the virtuemart files after the installation to be able to perform the checkout (most svn clients dont overwrite existing files).  
 # This means download or create the installer of virtuemart and install it in joomla [[Create virtuemart installer]].  
 # Download also the all-in-one payment plugin installer at http://dev.virtuemart.net/redmine/issues/73 
 # Before you can checkout the svn you should delete the files that are installed by the vm installer. Just delete this directories  
 * administrator/components/com_virtuemart  
 * components/com_virtuemart  
 and to prevent warnings the language files named en-GB.com_virtuemart.ini in  
 * administrator\language  
 * language  
 
 # AFTER that configure the SVN, directly into your joomla base directory. 

 h3. Use the right sql to inform joomla that virtuemart exists. 

 # Just make a checkout directly into your joomla base directory.  
 # Then execute the following sql commands with phpmyadmin. Be aware that these sql assume that you use the prefix jos for your tables. 

 * This is for virtuemart: 
 INSERT INTO `jos_components` (`id`, `name`, `link`, `menuid`, `parent`, `admin_menu_link`, `admin_menu_alt`, `option`, `ordering`, `admin_menu_img`, `iscore`, `params`, `enabled`) VALUES 
 (NULL, 'VirtueMart', 'option=com_virtuemart', 0, 0, 'option=com_virtuemart', 'VirtueMart', 'com_virtuemart', 0, '../components/com_virtuemart/shop_image/ps_image/menu_icon.png', 0, '', 1); 

 * This is for the paymentplugins: 
 INSERT INTO `jos_plugins` (`id`, `name`, `element`, `folder`, `access`, `ordering`, `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`) VALUES 
 (NULL, 'VMPayment - Authorize', 'authorize', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - Cash on delivery', 'cashondel', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00',''), 
 (NULL, 'VMPayment - echeck', 'echeck', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - epay', 'epay', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - eProcessingNetwork.com', 'epn', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - eWay - Australian Payment Gateway', 'eway', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - linkpot.net - youpay.com', 'linkpoint', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - Montrada.de', 'montrada', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - Nochex', 'nochex', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - Payflow Pro', 'payflow_pro', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - Paymate', 'paymate', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - Paymenow', 'paymenow', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - PayPal', 'paypal', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - 2Checkout', 'twocheckout', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''), 
 (NULL, 'VMPayment - Worldpay', 'worldpay', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '');