News:

Looking for documentation? Take a look on our wiki

Main Menu

Virtuemart 2 - Joomla 2.5: Plugin development

Started by Biggs_24_7, May 09, 2012, 14:13:53 PM

Previous topic - Next topic

Biggs_24_7

Hi All,
I am new to Virtuemart 2 development in the joomla 2.5 environment and need to know a couple of thinks to get a payment option integrated. I will jump straight into the questions:
1.) What folder structure do we use to setup the plugin development. Is there a tutorial or example of this?
2.) I have read that there are essentially only two files required:
----- a.) A config file - What fields are available [Standard fields should be included], how do we add custom fields and are we supposed to use the joomla XML file layout. Essentially what I am asking is do you have an example of all the file layout with their options. Does virtuemart have an xml manifest and is there an example.
-----b.) A php file - I have come across this link:
http://dev.virtuemart.net/projects/virtuemart/wiki/Payment_Plugins
Does this apply to Virtuemart 2 or have some of the methods been deprecated. Also is there are example I could possible look at?

In a nutshell, given VM2 has just been released and the docs are following shortly is there a good resource i could follow on payment option development?

regards,
Biggs

alatak

Hi

Quote1.) What folder structure do we use to setup the plugin development. Is there a tutorial or example of this?
In Joomla 2.5, the payment plugins must be under the folder plugins/vmpayment

Quote---- a.) A config file - What fields are available [Standard fields should be included], how do we add custom fields and are we supposed to use the joomla XML file layout. Essentially what I am asking is do you have an example of all the file layout with their options. Does virtuemart have an xml manifest and is there an example.
The configuration parameters should be in a XML file. LOok as an exemple to the 3 payments methods that are included in VirtueMart.

Quote-----b.) A php file - I have come across this link:
http://dev.virtuemart.net/projects/virtuemart/wiki/Payment_Plugins
Does this apply to Virtuemart 2 or have some of the methods been deprecated. Also is there are example I could possible look at?
This part of the wiki has not been yet updated.
I think the best is to look at the examples included in VM2 to understand how it works.

Biggs_24_7

Hi Alatak,
Thank you for your response. I have taken a look at the other 3 payment plugins and the XMl files are all in the old joomla 1.5 standard, which is fine. I have managed to alter manifest accordingly.
I have two more questions:
1.) Is the joomla xml file supposed to list the path where the plugin in is supposed to be installed? You mentioned that the plugin is supposed to fall under vmpayments, is this path supposed to be listed in the XML file under "<field addpath="..."/> or is the path where it is to be installed supposed to be included else where?
2.)how do you register the payment method with VM2, is there an example of this some where?

thanks,
Biggs

alatak

Hi,

Quote1.) Is the joomla xml file supposed to list the path where the plugin in is supposed to be installed? You mentioned that the plugin is supposed to fall under vmpayments, is this path supposed to be listed in the XML file under "<field addpath="..."/> or is the path where it is to be installed supposed to be included else where?
the parameter  <params addpath="/administrator/components/com_virtuemart/elements"> is used to tell were Joomla should search for the elements that you define.
Here you can find some infos about it:
http://docs.joomla.org/Creating_custom_template_parameter_types

Quote2.)how do you register the payment method with VM2, is there an example of this some where?
it is done when installing the plugin. This line
<install version="1.5" type="plugin" group="vmpayment" > tells Jomla where to install the plugin.