Page 1 of 1

Missing order after payement

Posted: Sun May 06, 2018 7:27 am
by cubedesign
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

Re: Missing order after payement

Posted: Fri May 11, 2018 4:24 pm
by cubedesign
Up Please O0

Re: Missing order after payement

Posted: Fri May 11, 2018 4:47 pm
by kestas
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