VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: kcyg17 on May 23, 2013, 23:54:13 PM

Title: Configuration page for payment plugin
Post by: kcyg17 on May 23, 2013, 23:54:13 PM
Hi, i'm developing an payment method. But configuration only running with XML file. I must add some configuration with PHP codes.

How is adding some html form to the payment configuration tab ?
Title: Re: Configuration page for payment plugin
Post by: alatak on May 24, 2013, 10:43:03 AM
Hello
You can create elements.
Look for example in the klarna payment to see how is done.

Sometimes elements are not enough because you need even more advanced functions. In this case you can you the trigger plgVmOnSelfCallBE

Unfortunatly we do not have any example on how to use it in the plugins we provide in VirtueMart.

But you do this for example, if you want to insert a link



$link = 'index.php?option=com_virtuemart&view=plugin&type=vmpayment&name=' . $this->_name;
echo '<a href="' .$link.'" >'."My link" .'</a>';


This will call the trigger if you are on the backend

function plgVmOnSelfCallBE($type, $name, &$render) {
/* you must start the function with that code */
if ($name != $this->_name || $type != 'vmpayment') {
vmdebug('plgVmOnSelfCallBE ' . $name . ' ' . $this->_name);
return FALSE;
}
/* your code here */

Title: Re: Configuration page for payment plugin
Post by: kcyg17 on May 25, 2013, 13:48:28 PM
thanks to you @alatak.

No any options for the one page configuration?

Title: Re: Configuration page for payment plugin
Post by: kcyg17 on May 25, 2013, 17:19:34 PM
Okay I'm gracefully fixed that problem. Too thanks to you. And second problem is payment form. how is jump to another clean HTML payment form ? at this

index.php?option=com_virtuemart&view=' . $this->name;

I want to my customer at the select of that payment method is redirect to index.php?option=com_virtuemart&view=' . $this->name; that page ? how is do this?
Title: Re: Configuration page for payment plugin
Post by: kcyg17 on May 28, 2013, 17:42:40 PM
how is create a view for payment form?
Title: Re: Configuration page for payment plugin
Post by: alatak on May 28, 2013, 18:23:47 PM
Hello
The form is displayed via this trigger
function plgVmDisplayListFEPayment (VirtueMartCart $cart, $selected = 0, &$htmlIn)
Title: Re: Configuration page for payment plugin
Post by: kcyg17 on May 28, 2013, 19:19:00 PM
yes but I want to create a another CLEAR/NEW html Form page.

Mod edit:  bump message removed.  http://forum.virtuemart.net/index.php?board=114.0   Maybe after the J and Beyond conference in the Netherlands
Title: Re: Configuration page for payment plugin
Post by: kcyg17 on June 02, 2013, 10:30:24 AM
Hi,

I'm createde a new page with vmview main class.

And I'm created a HTML form. But I dont change order status.

How functions validate the order ?

AND/OR how is get orders class with session variables?