Project

General

Profile

Plugin system » History » Version 42

Max Milbers, 04/11/2018 07:32 AM

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 37 Max Milbers
the plugins are now available as Joomla install packages, so you should use the AIO installer provided in the download package to install all plugins at once.
10 1 Oscar van Eijk
11 42 Max Milbers
h2. Plugin Development
12
13
Documentation for VirtueMart 2 API is here: http://docs.virtuemart.net/api-vm2
14
15
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.
16
17
h3. [[Payment Plugins]]
18
19
h3. [[Shipper Plugins]]
20
21
h3. [[Extension Plugins]]
22
23
h3. [[Calculation Plugins]]
24
25
h3. [[Product Plugins]]
26
27
h3. The rest of the page is OUTDATED 
28
29 1 Oscar van Eijk
h3. Payment plugins
30
31
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!!
32
33
Use the SQL query below to add the plugins to your database (assuming the table prefix is "jos_"):
34
35 12 Christopher Roussel
J1.5:
36 1 Oscar van Eijk
<pre>
37 4 Devendra Kumar Shukla
INSERT INTO `jos_plugins` (`id`, `name`, `element`, `folder`, `access`, `ordering`
38 1 Oscar van Eijk
  , `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`)
39
VALUES
40 34 Max Milbers
 (NULL, 'VMPayment - Paypal', 'paypal', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '')
41 35 Valérie Isaksen
,(NULL, 'VMPayment - Standard', 'standard', 'vmpayment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00','');
42 1 Oscar van Eijk
</pre>
43 35 Valérie Isaksen
J1.6 or J1.7:
44 12 Christopher Roussel
<pre>
45 39 Valérie Isaksen
INSERT INTO `#__extensions` (`extension_id`,  `type`, `name`, `element`, `folder`, `access`, `ordering`
46 12 Christopher Roussel
  , `enabled`, `protected`, `client_id`, `checked_out`, `checked_out_time`, `params`)
47
VALUES
48 34 Max Milbers
 (NULL, 'plugin', 'plg_vmpayment_paypal', 'paypal', 'vmpayment', 1, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '')
49 35 Valérie Isaksen
,(NULL, 'plugin', 'plg_vmpayment_standard', 'standard', 'vmpayment', 1, 0, 1, 0, 0, 0, '0000-00-00 00:00:00','');
50 1 Oscar van Eijk
</pre>
51
52 37 Max Milbers
For Joomla 1.5, when you use the svn checkout, copy the plugin files for example (paypal.php, paypal.xml), located in the folder /plugins/vmpayment/paypal a directory higher.
53 35 Valérie Isaksen
54 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!
55 1 Oscar van Eijk
56
h3. Shipper plugins
57 3 Oscar van Eijk
58 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.
59
*Note:* Installing the sample data does _NOT_ provide shipping rates anymore!
60
61
Use the SQL query below to add the plugins to your database (assuming the table prefix is "jos_"):
62
63 12 Christopher Roussel
J1.5:
64 1 Oscar van Eijk
<pre>
65
INSERT INTO `jos_plugins` (`id`, `name`, `element`, `folder`, `access`, `ordering`
66
  , `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`)
67 19 Valérie Isaksen
VALUES
68
 (NULL, 'By weight, ZIP and countries', 'weight_countries', 'vmshipment', 0, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '')
69 1 Oscar van Eijk
;
70 5 Oscar van Eijk
</pre>
71 1 Oscar van Eijk
72 41 Valérie Isaksen
J1.6 or J1.7
73
<pre>
74 5 Oscar van Eijk
INSERT INTO `#__extensions` (`extension_id`, `type`, `name`, `element`, `folder`, `access`, `ordering`
75
  , `enabled`, `protected`, `client_id`, `checked_out`, `checked_out_time`, `params`)
76 30 Max Milbers
VALUES
77 5 Oscar van Eijk
 (NULL, 'plugin', 'plg_vmshipment_weight_countries', 'weight_countries', 'vmshipment', 1, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '')
78 30 Max Milbers
;
79 33 Max Milbers
</pre>
80
For Joomla 1.5, when you use the svn checkout, copy the plugin files analog to the paymentplugins.
81
82
83 36 Patrick Kohl
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).
84
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!