How to copy a payment plugin?

  • Posts: 7
  • Thank you received: 0
11 years 2 months ago #128668

So, I need 3 additional copies of the western union or bank transfer plugin.

I don´t have much programming knowledge but I tried to edit the plugin many times changing the name, type, class, doing different versions of the plugin, and then trying to install them through the joomla extension path.

Well I give up, there is always some code conflict that appears after instalation, sometimes in the backend, other times on the frontend.

For example, I attached one version of the western union payment plugin edition:

I get an error on the back end:

Fatal error: Call to a member function display() on a non-object in /plugins/hikashoppayment/western2/western2_configuration.php on line 17

Which is:

<td>
<?php echo $this->data->display("data[payment][payment_params][order_status]",@$this->element->payment_params->order_status); ?>
</td>

If I delete that line I can access the backend, but then I get an error on the frontend

Fatal error: Cannot redeclare class plgHikashoppaymentWesternunion in /plugins/hikashoppayment/western2/western2.php on line 118

Which is the last line of:


$information = $method->payment_params->information;
if(preg_match('#^[a-z0-9_]*$#i',$information)){
$information = JText::_($information);
}
$currencyClass = hikashop_get('class.currency');
$amount = $currencyClass->format($order->order_full_price,$order->order_currency_id);
$order_number = $order->order_number;
require($path);

return true;
}
}

Can someone give me some step by step process to have the westernunion or banktransfer plugin copied 3 more times?

Thank you

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
11 years 2 months ago #128669

Hi,

With HikaShop 2.2.x, you do not need to copy a payment plugin (by copying files). You can already create several configurations for a single payment plugin.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: rodrigo8_4

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
11 years 2 months ago #128673

you guys are really awesome!

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum