opencart 2.3 install() method not working

527 views Asked by At

I have a payment plugin which is working fine on opencart 2.0 , I tried to install it on opencart 2.3 everything works fine but there is piece of code written in the install() method .. but its not working on opencart 2.3.

I tried to dump in it, but nothing happen, it seems opencart2.3 is not calling my install() method at all.

Additional Information : The plugin name is Payfort and its on github https://github.com/payfort/opencart2.0-payfort The plugin is working on both versions 2.0 & 2.3

2

There are 2 answers

2
basson On

Opencart 2.3 folder structure is different from 2.0 for example your payment folders are catalog/controller/extension/payment in 2.3 and in 2.0 it is catalog/controller/payment. The "extension" is added on later versions. $this->load->language('extension/payment/????') will also be different as the folder structure changed. So it most probably not calling the correct public function. Contact the author of the plugin to change/update the plugin. If it the payment is directed to a Payment Gateway for instance paypal or payfast. If you have written the plugin your self. You can use the PP_Standard module to duplicate and rewrite a custom plugin. https://forum.opencart.com/viewtopic.php?f=136&t=30653

Hopes this helps.

0
Adam Mester On

In OpenCart 2.3.0.2 the install method of class ControllerExtensionExtensionPayment (placed in: admin/controller/extension/extension/payment.php) is called when a payment extension is installed.

In this method the install method of the payment's controller is called:

// Call install method if it exsits
$this->load->controller('extension/payment/' . $this->request->get['extension'] . '/install');