News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Configuration page for payment plugin

Started by kcyg17, May 23, 2013, 23:54:13 PM

Previous topic - Next topic

kcyg17

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 ?

alatak

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 */


kcyg17

thanks to you @alatak.

No any options for the one page configuration?


kcyg17

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?

kcyg17

how is create a view for payment form?

alatak

Hello
The form is displayed via this trigger
function plgVmDisplayListFEPayment (VirtueMartCart $cart, $selected = 0, &$htmlIn)

kcyg17

#6
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

kcyg17

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?