VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: rvbgnu on November 24, 2014, 16:51:02 PM

Title: [SOLVED] Recommendation for dual installer VM2 / 3 for plugin
Post by: rvbgnu on November 24, 2014, 16:51:02 PM
Hi,

Delighted to have VM3 released, well done guys (and girls ;-) !!
What would you recommend for a plugin installer, supporting both with VM2 and VM3?

There are only a few differences between the two versions, but for the params, we need one .xml file. I found the regular way with an install.php script, but usually more for a component, and there is maybe a lighter way for plugins (and modules).
@VM dev: What would you prefer to implement, to have only one archive file (.zip) to contain both versions to download for the user?

Kind regards,
Hervé
Title: Re: Recommendation for dual installer VM2 / 3 for plugin
Post by: reinhold on November 24, 2014, 17:32:34 PM
You can usually manage to make one version of the plugin that works with both VM2 and VM3 (and J2 and J3).

See:
http://docs.virtuemart.net/tutorials/development/175-code-adjustments-for-virtuemart-3.html

I also wrote down all changes/updates that are needed to make my plugins work with VM2 and VM3:
http://kainhofer.com/software/tutorial-vm2-plugin-vm3.html

Regarding the <params> vs. <fields>: You can have both in the xml file. VM2 will use the <params>, while VM3 will use the <vmconfig> section with the <fields>.
(For an example, you can check out any of my free plugins that have already been updated for VM3: e.g. http://open-tools.net/virtuemart-2-extensions/vm2-shipping-by-rules-plugin.html)

Best regards,
Reinhold
Title: Re: Recommendation for dual installer VM2 / 3 for plugin
Post by: rvbgnu on November 24, 2014, 23:15:46 PM
Thank you very much Reinhold! It is working fine now!!

I found your page why googling, but did not get that we could keep the two versions <params> and <vmconfig> in the same file... too much debugging today probably !!

I'm glad that my plugins (public and private) are all working now with VM2/3 and Joomla 2.5/3.3. I really appreciate your help, and as a mark of appreciation, I would like to offer you my Stripe payment plugin, If you are interested, just ping and I will send you a coupon code in return.

I wish you a nice day and week!!|
Best regards, Hervé