Author Topic: Documentation for plugin development  (Read 37037 times)

_oscar_

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 51
Documentation for plugin development
« on: February 07, 2011, 16:32:49 pm »
Hey all,

There's a new page in our Wiki that describes the new plugin system for VirtueMart 2.
As you've probably seen before, it now uses the Joomla! plugin structure; there are some base classes for creating shipper- and payment plugins available.

If you wanna help VM by creating new plugins or converting VM1.1.x plugins to VM2; I'll buy you a beer (and even drink it for you :) )

For documentation, please have a look at http://dev.virtuemart.net/projects/virtuemart/wiki/Plugin_system
Any comments, just drop'm here!

stAn99

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 64
    • One Page Checkout for Virtuemart 2
Re: Documentation for plugin development
« Reply #1 on: March 06, 2011, 13:50:03 pm »
Hello Everybody,
 i analyzed VM2 (beta2, quick look at beta3) plugin system, and i would like to recommend to use own JInstall adapter for installing plugins with type="vm_ext". The advantage of own adapter is that we could use two sql inclusion files in manifest XML one for joomla 1.5 and the other for joomla 1.6. Also if the plugins would be saved as type adapter's type, they would not have to be in JPATH_PLUGINS directory where we don't really want to store them.

 Also many VM extensions for VM 1.1.x are based on modifing ps_checkout->add( ps_checkout->process( functions of checkout processing. These are usually various coupon systems and payment systems. Will there be any possibility how can one particular function of VM2 can be overriden with 2 different plugins? 
----
RuposTel.com
www.rupostel.com
Your customized checkout solution for Virtuemart

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 8788
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Documentation for plugin development
« Reply #2 on: March 06, 2011, 20:03:11 pm »
they would not have to be in JPATH_PLUGINS directory where we don't really want to store them.
Why we do not really want to store them there? I am confident with using the general joomla plugin directory.

Also many VM extensions for VM 1.1.x are based on modifing ps_checkout->add( ps_checkout->process( functions of checkout processing.
This function does not longer exist. All this extensions must be rewritten using joomla event hooks.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Minh BlackRed

  • 3rd party VirtueMart Developer
  • Beginner
  • *
  • Posts: 22
  • VirtueMart Version: 2
Re: Documentation for plugin development
« Reply #3 on: March 21, 2011, 04:17:16 am »
@_oscar_:
http://dev.virtuemart.net/projects/virtuemart/wiki/Plugin_system
"Since VirtueMart v2, the Joomla! plugin system is used form payment and shipper plugins"
---
There has no plugin to control display of product on front-end?
VM Responsive
shop.littledevil-tuning.com

_oscar_

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 51
Re: Documentation for plugin development
« Reply #4 on: March 21, 2011, 09:51:11 am »
There has no plugin to control display of product on front-end?

Not yet. There will be more events supporting more plugin types. There are a few undocumented ones already in the backend, but no plugins have been written for those events and therefore they can't be tested.
It's not planned to add more events for 2.0; after that release the plugin system will be expanded.

Dade

  • Beginner
  • *
  • Posts: 2
Re: Documentation for plugin development
« Reply #5 on: July 16, 2011, 17:10:18 pm »
Oscar, you mean that if I try to create a plugin (for payment in my case) it won't be showed on the payment check on the front-end?

I'm asking because I'm trying to do a plugin for payments with AUP but since I activated it it gives me an error on the edit payment page (task=editpayment). It's because what you mentioned or simply because it's not written properly (I mean my plugin :P).

Thanks for your time!

_oscar_

  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 51
Re: Documentation for plugin development
« Reply #6 on: July 16, 2011, 19:22:01 pm »
I answer this because you direct your question to me, but I left the VM project team about 3 months ago.
I'm not sure what happened with the plugin system since then, but from what I understand from your question.... it's not properly written ;)

Payment plugins should appear in the frontend on checkout, unless anything changed there over the last few months, but then there might be simply a bug that I'm sure someone in the team will pick up

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 8788
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Documentation for plugin development
« Reply #7 on: July 17, 2011, 00:02:59 am »
Haha oscar, what your writing?

You know very good, that this part was "done" as you left, and that you continued my work and was the last one who wrote on it before you left the team. On of the first things I added to the vmpayment plugin is the selfdisplaying on the frontend.

But to get the paypal plugin working we had to add some important stuff and rewrite some code, thats true. I suggest Dade should take a look on the wiki, the cash on del and the paypal plugin to understand how it is working.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 1999
    • alatak.net
Re: Documentation for plugin development
« Reply #8 on: July 19, 2011, 16:04:20 pm »
Hi,

Quote
you mean that if I try to create a plugin (for payment in my case) it won't be showed on the payment check on the front-end?

They do appear on the frontend. When you create a payment method, by default it is not published. Could this be the problem?

cmarkell

  • Beginner
  • *
  • Posts: 2
Re: Documentation for plugin development
« Reply #9 on: October 18, 2011, 09:18:17 am »
Is the wiki accurate still? In the current svn version the plgVmOnSelectPayment has become xxxplgVmOnSelectPayment and doesn't appear to be being used to output the select option during checkout... I'm trying to add credit card form fields, is this still the way?

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 1999
    • alatak.net
Re: Documentation for plugin development
« Reply #10 on: October 18, 2011, 09:21:03 am »
Hi,

No, i am actually doing it.

The xxxplgVmOnSelectPayment is an obsolete function. I will remove it now .

f.janssen

  • Beginner
  • *
  • Posts: 6
Re: Documentation for plugin development
« Reply #11 on: November 30, 2011, 22:12:55 pm »
If plgVmOnSelectPayment  is obsolete, how can I then add extra parameters which are needed for my payment plugin ?

Also, I do think these changes are kinda big if, VM2 is production ready.
I think I should wait some months for actually using this software or am I mistaken ?

Kind regards,
Fred
Kind Regards,
Fred

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 1999
    • alatak.net
Re: Documentation for plugin development
« Reply #12 on: November 30, 2011, 22:54:13 pm »
Hi,

The function plgVmOnSelectPayment() is not obsolete.
It is the one which i had in the code xxxplgVmOnSelectPayment() which should not have been on the code.

tlahtine

  • Beginner
  • *
  • Posts: 9
Re: Documentation for plugin development
« Reply #13 on: December 27, 2011, 15:29:40 pm »

alatak

  • Contributing Developer
  • Full Member
  • *
  • Posts: 1999
    • alatak.net
Re: Documentation for plugin development
« Reply #14 on: December 27, 2011, 15:30:43 pm »
Hi

Yes it is down.
We are trying to fix the problem.