Project

General

Profile

Setting up a Development Environment » History » Version 7

Max Milbers, 09/08/2010 03:12 PM

1 1 Rick Glunt
h1. Setting up a Development Environment
2
3
h2. Introduction
4
5
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. 
6
7
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. 
8
9
The following programs are recommended for working with VirtueMart and synchronizing the working directory with the local SVN repository: 
10
11 3 Max Milbers
* SmartSVN or TortoiseSVN
12
* Total Commander (perfect for sync'ing the contents of two directories)  
13 2 Rick Glunt
* Zend Studio (the state of the art when it comes to a PHP IDE, costs!) 
14
* or PHP Development Tools for Eclipse (very good PHP IDE and free!) 
15 1 Rick Glunt
16
Of course there are other programs that can do the same as the ones mentioned above, but remember: these are just recommendations. 
17
18
h2. Setup an IDE and SVN
19
20
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. 
21
22
First setup up an IDE, I suggest you follow the explanations here: http://docs.joomla.org/Setting_up_your_workstation_for_Joomla!_development 
23
24 6 Max Milbers
Then install jdump for debugging. You need it to prevent errors.
25 1 Rick Glunt
26 6 Max Milbers
h3. SVN-Basics: 
27 1 Rick Glunt
28 6 Max Milbers
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. 
29
30 1 Rick Glunt
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. 
31
32
There are 3 different folders for backend, frontend and modules 
33
34 7 Max Milbers
* trunk/administrator/components/com_virtuemart ;pure vm
35
* trunk/administrator/language                  ;mixed
36
* trunk/components/com_virtuemart ;             ;pure vm
37
* trunk/language                                ;mixed
38
* trunk/plugins                                 ;mixed
39
* trunk/plugins/vmpayment                       ;pure vm
40 1 Rick Glunt
* trunk/modules/(..not ready, we are pleased if you want to write a module) 
41
42
The /trunk is your joomla base root = jRoot. 
43
44 6 Max Milbers
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: 
45 1 Rick Glunt
46 2 Rick Glunt
svn co https://dev.virtuemart.net/svn/virtuemart/trunk/virtuemart 
47 1 Rick Glunt
48
After updating you should have the newest version of VirtueMart 
49
50
If you want to check the mails you may want to use hamster as mailserver
51
52 6 Max Milbers
h2. Installation of virtuemart into your IDE
53 1 Rick Glunt
54 6 Max Milbers
Now there are two ways.
55
56
h3. Use the virtuemart installer to set the right entries for using virtuemart. 
57
58
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). 
59 1 Rick Glunt
# This means download or create the installer of virtuemart and install it in joomla [[Create virtuemart installer]]. 
60 6 Max Milbers
# Before you can checkout the svn you should delete the files that are installed by the vm installer. Just delete this directories 
61
* administrator/components/com_virtuemart 
62
* components/com_virtuemart 
63
and to prevent warnings the language files named en-GB.com_virtuemart.ini in 
64
* administrator\language 
65
* language 
66
 
67 5 Max Milbers
# AFTER that configure the SVN, directly into your joomla base directory.
68
69 6 Max Milbers
h3. Use the right sql to inform joomla that virtuemart exists.
70
71
# Just make a checkout directly into your joomla base directory. 
72 5 Max Milbers
# Then execute the following sql commands with phpmyadmin. Be aware that these sql assume that you use the prefix jos for your tables.
73 1 Rick Glunt
74
* This is for virtuemart:
75
INSERT INTO `jos_components` (`id`, `name`, `link`, `menuid`, `parent`, `admin_menu_link`, `admin_menu_alt`, `option`, `ordering`, `admin_menu_img`, `iscore`, `params`, `enabled`) VALUES
76 7 Max Milbers
(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);
77 6 Max Milbers
78 5 Max Milbers
* This is for the paymentplugins:
79
INSERT INTO `jos_plugins` (`id`, `name`, `element`, `folder`, `access`, `ordering`, `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`) VALUES
80 7 Max Milbers
(NULL, 'VMPayment - Authorize', 'authorize', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', 'pType=Y\nDEBUG=0\nCHECK_CARD_CODE=1\nAN_RECURRING=0\nAN_TYPE=AUTH_CAPTURE\nAN_SHOW_ERROR_CODE=0\nAN_EMAIL_MERCHANT=1\nAN_EMAIL_CUSTOMER=1\nAN_LOGIN=username\n\n'),
81
(NULL, 'VMPayment - Cash on delivery', 'cashondel', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', 'pType=N\nCASH_ON_DEL_5000=230\nCASH_ON_DEL_10000=340\nCASH_ON_DEL_20000=560\nCASH_ON_DEL_30000=640\nCASH_ON_DEL_40000=750\nCASH_ON_DEL_50000=860\nCASH_ON_DEL_100000=1130\n\n'),
82
(NULL, 'VMPayment - echeck', 'echeck', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
83
(NULL, 'VMPayment - epay', 'epay', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
84
(NULL, 'VMPayment - eProcessingNetwork.com', 'epn', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
85
(NULL, 'VMPayment - eWay - Australian Payment Gateway', 'eway', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
86
(NULL, 'VMPayment - linkpot.net - youpay.com', 'linkpoint', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
87
(NULL, 'VMPayment - Montrada.de', 'montrada', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
88
(NULL, 'VMPayment - Nochex', 'nochex', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
89
(NULL, 'VMPayment - Payflow Pro', 'payflow_pro', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
90
(NULL, 'VMPayment - Paymate', 'paymate', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
91
(NULL, 'VMPayment - Paymenow', 'paymenow', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
92
(NULL, 'VMPayment - PayPal', 'paypal', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
93
(NULL, 'VMPayment - 2Checkout', 'twocheckout', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', ''),
94
(NULL, 'VMPayment - Worldpay', 'worldpay', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '');