Plugin system » History » Version 37
Max Milbers, 01/16/2012 12:06 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 | 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 | 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. |
35 | 35 | Valérie Isaksen | |
36 | 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! |
37 | 1 | Oscar van Eijk | |
38 | h3. Shipper plugins |
||
39 | 3 | Oscar van Eijk | |
40 | 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. |
41 | *Note:* Installing the sample data does _NOT_ provide shipping rates anymore! |
||
42 | |||
43 | Use the SQL query below to add the plugins to your database (assuming the table prefix is "jos_"): |
||
44 | |||
45 | 12 | Christopher Roussel | J1.5: |
46 | 1 | Oscar van Eijk | <pre> |
47 | INSERT INTO `jos_plugins` (`id`, `name`, `element`, `folder`, `access`, `ordering` |
||
48 | , `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`) |
||
49 | VALUES |
||
50 | 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', '') |
51 | 14 | Valérie Isaksen | ; |
52 | 1 | Oscar van Eijk | </pre> |
53 | |||
54 | 35 | Valérie Isaksen | J1.6 or J1.7 |
55 | 12 | Christopher Roussel | <pre> |
56 | 1 | Oscar van Eijk | INSERT INTO `jos_extensions` (`extension_id`, `type`, `name`, `element`, `folder`, `access`, `ordering` |
57 | , `enabled`, `protected`, `client_id`, `checked_out`, `checked_out_time`, `params`) |
||
58 | VALUES |
||
59 | (NULL, 'plugin', 'plg_vmshipper_weight_countries', 'weight_countries', 'vmshipper', 1, 0, 1, 0, 0, 0, '0000-00-00 00:00:00', '') |
||
60 | ; |
||
61 | 16 | Valérie Isaksen | </pre> |
62 | 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. |
63 | |||
64 | 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. |
||
65 | 1 | Oscar van Eijk | |
66 | 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). |
67 | 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! |
||
68 | 1 | Oscar van Eijk | |
69 | 5 | Oscar van Eijk | h2. Plugin Development |
70 | 1 | Oscar van Eijk | |
71 | 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. |
72 | |||
73 | 30 | Max Milbers | h3. [[Payment Plugins]] |
74 | 5 | Oscar van Eijk | |
75 | 30 | Max Milbers | h3. [[Shipper Plugins]] |
76 | 33 | Max Milbers | |
77 | h3. [[Extension Plugins]] |
||
78 | |||
79 | h3. [[Calculation Plugins]] |
||
80 | 36 | Patrick Kohl | |
81 | h3. [[Product Plugins]] |