Project

General

Profile

Plugin system » History » Version 35

Valérie Isaksen, 08/31/2011 12:34 PM

1 10 Oscar van Eijk
{{>toc}}
2
3 1 Oscar van Eijk
h1. Plugin system
4
5 5 Oscar van Eijk
Since VirtueMart v2, the Joomla! plugin system is used form payment and shipper plugins.
6 1 Oscar van Eijk
7
h2. Installing plugins
8
9
During development the the VM2 branch, the plugins are not available as Joomla install packages, so for test environments, they must be installed manually.
10
11
h3. Payment plugins
12
13
At the time of writing, only 2 of the former payment plugins have been converted to the new plugin system. Others should follow soon, all help is appreciated!!
14
15
Use the SQL query below to add the plugins to your database (assuming the table prefix is "jos_"):
16
17 12 Christopher Roussel
J1.5:
18 1 Oscar van Eijk
<pre>
19 4 Devendra Kumar Shukla
INSERT INTO `jos_plugins` (`id`, `name`, `element`, `folder`, `access`, `ordering`
20 1 Oscar van Eijk
  , `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`)
21
VALUES
22 34 Max Milbers
 (NULL, 'VMPayment - Paypal', 'paypal', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '')
23 35 Valérie Isaksen
,(NULL, 'VMPayment - Standard', 'standard', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00','');
24 1 Oscar van Eijk
</pre>
25 35 Valérie Isaksen
J1.6 or J1.7:
26 12 Christopher Roussel
<pre>
27
INSERT INTO `jos_extensions` (`extension_id`,  `type`, `name`, `element`, `folder`, `access`, `ordering`
28
  , `enabled`, `protected`, `client_id`, `checked_out`, `checked_out_time`, `params`)
29
VALUES
30 34 Max Milbers
 (NULL, 'plugin', 'plg_vmpayment_paypal', 'paypal', 'vmpayment', 1, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '')
31 35 Valérie Isaksen
,(NULL, 'plugin', 'plg_vmpayment_standard', 'standard', 'vmpayment', 1, 0, 1, 0, 0, 0, '0000-00-00 00:00:00','');
32 1 Oscar van Eijk
</pre>
33
34 35 Valérie Isaksen
For Joomla 1.5, when you did not use the svn checkout, copy the plugin files (paypal.php, paypal.xml, standard.php and standard.xml), located in the folder /plugins/vmpayment, to the Joomla plugin directory. If that doesn't exist, it must be created first.
35 1 Oscar van Eijk
36 35 Valérie Isaksen
For Joomla 1.6 or Joomla 1.7, when you did not use the svn checkout, create the folders paypal and standard in the folder /plugins/vmpayment, and then copy the plugin files (paypal.php, paypal.xml, standard.php and standard.xml) in the respective folder., located , to the Joomla plugin directory. If that doesn't exist, it must be created first.
37
38 19 Valérie Isaksen
Now, in the store maintenance, you can add payment methods based on one of these plugins, then click Apply button to display the appropriate parameters in the configuration tab. Note at this moment it is required to select a vendor!
39 1 Oscar van Eijk
40
h3. Shipper plugins
41 3 Oscar van Eijk
42 1 Oscar van Eijk
This is very similar to the payment plugins. Only 1 plugin has been created (again: all help is appreciated!); 'standard', which provides a basic shipping option for postal services.
43
*Note:* Installing the sample data does _NOT_ provide shipping rates anymore!
44
45
Use the SQL query below to add the plugins to your database (assuming the table prefix is "jos_"):
46
47 12 Christopher Roussel
J1.5:
48 1 Oscar van Eijk
<pre>
49
INSERT INTO `jos_plugins` (`id`, `name`, `element`, `folder`, `access`, `ordering`
50
  , `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`)
51
VALUES
52 17 Valérie Isaksen
 (NULL, 'By weight, ZIP and countries', 'weight_countries', 'vmshipper', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '')
53 14 Valérie Isaksen
;
54 1 Oscar van Eijk
</pre>
55
56 35 Valérie Isaksen
J1.6 or J1.7
57 12 Christopher Roussel
<pre>
58 1 Oscar van Eijk
INSERT INTO `jos_extensions` (`extension_id`, `type`, `name`, `element`, `folder`, `access`, `ordering`
59
  , `enabled`, `protected`, `client_id`, `checked_out`, `checked_out_time`, `params`)
60
VALUES
61
 (NULL, 'plugin', 'plg_vmshipper_weight_countries', 'weight_countries', 'vmshipper', 1, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '')
62
;
63 16 Valérie Isaksen
</pre>
64 35 Valérie Isaksen
For Joomla 1.5, when you did not use the svn checkout, copy the plugin files (weight_countries.php, weight_countries.xml), located in the folder /plugins/vmshipper, to the Joomla plugin directory. If that doesn't exist, it must be created first.
65
66
For Joomla 1.6 or Joomla 1.7, when you did not use the svn checkout, create the folder weight_countries in the folder /plugins/weight_countries, and then copy the plugin files (weight_countries.php, weight_countries.xml) in the respective folder., located , to the Joomla plugin directory. If that doesn't exist, it must be created first.
67 1 Oscar van Eijk
68 19 Valérie Isaksen
Now use the 'Shipping methods' menu item in the backend to add 1 or more shipping methods. Give a shipping method name, select the shipping method,and click Apply button to display the appropriate parameters in the configuration tab. All you need to do here is give the shipper a name and select a vendor (this is optional; when no vendor is selected, this carrier is valid for all vendors).
69
Make sure a there's always a valid shipping rate: the plugin must be able to find a matching rate based on the shipto address!
70 1 Oscar van Eijk
71 5 Oscar van Eijk
h2. Plugin Development
72 1 Oscar van Eijk
73 5 Oscar van Eijk
All plugins for VirtueMart should be developed confirming the Joomla! plugin development methods. Refer to http://docs.joomla.org/Tutorial:Plugins for developers documentation for Joomla! plugins.
74
75 30 Max Milbers
h3. [[Payment Plugins]]
76 5 Oscar van Eijk
77 30 Max Milbers
h3. [[Shipper Plugins]]
78 33 Max Milbers
79
h3. [[Extension Plugins]]
80
81
h3. [[Calculation Plugins]]