Post by cubedesign » Sun May 06, 2018 7:27 am

Good evening I have a problem at the level of the result of the payment firstly I am not a developer but I managed to migrate the module from V1.5.6 to V2.3.0.1
the payment is made successfully except that in the dashboard commands I have no new entry I tried a little I found that the script puts all the information in the database "table order" except in the order_status_id it puts 0 instead of 15 and it does not send mail to the user I saw in the others payment modules there is always a line

Code: Select all

$this->model_checkout_order->addOrderHistory($order_id, $this->config->get('paymate_order_status_id'));
that I do not have in my module.
here is my code in the catalog/controller/extension/payment/gpgcheckout.php

https://ufile.io/4v1uq

I would be really happy that someone will solve me problem is urgent one can my site is in production
Thanks
:D

Newbie

Posts

Joined
Wed Nov 08, 2017 3:49 am

Post by cubedesign » Fri May 11, 2018 4:24 pm

Up Please O0

Newbie

Posts

Joined
Wed Nov 08, 2017 3:49 am

Post by kestas » Fri May 11, 2018 4:47 pm

Hi,
I have checked your code.. yes it is missing line

Code: Select all

$this->model_checkout_order->addOrderHistory($order['order_id'], $order_status_id);
or something similar which adds all data to the order history. But even this line not help because your code are wrong.
for example this:

Code: Select all

$data['continue'] = $this->url->link('checkout/success');

        if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/extension/payment/cod.tpl')) {
            $this->template = $this->config->get('config_template') . '/template/extension/payment/cod.tpl';
        } else {
            $this->template = 'default/template/payment/cod.tpl';
        }

        $this->render();
		

        $this->template = '/template/extension/payment/gpgcheckout_failure.tpl';
        $this->response->setOutput($this->render());
if your module name gpgcheckout why i can find this:

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/extension/payment/cod.tpl')) {
$this->template = $this->config->get('config_template') . '/template/extension/payment/cod.tpl';
} else {
$this->template = 'default/template/payment/cod.tpl';
}

and in OC version 2.3 you should use code without
.tpl

so your code is wrong at all.

Sorry this is nothing personal...

Cheers

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am
Who is online

Users browsing this forum: No registered users and 22 guests