Error on payment method submition
Posted: Wed Feb 20, 2019 2:55 am
Hi all,
OC: 2.3.0.2
I am getting jquery error (500) on all payment methods submition on Ajax function call('confirm'). Let`s take as example simple payment method Pay on deliver. On press "Checkout" button i am getting this error https://imgur.com/a/TA5DqZW. Let`s see controller and view
"payment on deliver" controller - COD
Here is ajax form in view:
Error comes from function "addOrderHistory". Even if i restore all order.php file to stock, i am getting same error. Function 'addOrderHistory' is working right and inserting all datas to all required tables. But on 2-nd button click(after first one with error) it works and does redirect. How can I fix it? Wheren could be error? I lost 4 days for that and could not find error.
To see an error website is: https://buket.ideart.az
P.S. on stock also jquere 2.1.1
Thank your for attention and help
OC: 2.3.0.2
I am getting jquery error (500) on all payment methods submition on Ajax function call('confirm'). Let`s take as example simple payment method Pay on deliver. On press "Checkout" button i am getting this error https://imgur.com/a/TA5DqZW. Let`s see controller and view
"payment on deliver" controller - COD
Code: Select all
public function confirm() {
if ($this->session->data['payment_method']['code'] == 'cod') {
$this->load->model('checkout/order');
$this->model_checkout_order->addOrderHistory($this->session->data['order_id'], $this->config->get('cod_order_status_id'));
}
}
Code: Select all
<script type="text/javascript"><!--
$('#button-confirm').on('click', function() {
$.ajax({
type: 'get',
url: 'index.php?route=extension/payment/cod/confirm',
cache: false,
beforeSend: function() {
$('#button-confirm').button('loading');
},
complete: function() {
$('#button-confirm').button('reset');
},
success: function() {
location = '<?php echo $continue; ?>';
}
});
});
//--></script>
To see an error website is: https://buket.ideart.az
P.S. on stock also jquere 2.1.1
Thank your for attention and help