Post by orik3ll0 » 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

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'));
	}
}
Here is ajax form in view:

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>
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

Newbie

Posts

Joined
Sat Apr 14, 2018 6:37 am

Post by thekrotek » Wed Feb 20, 2019 3:59 am

Error 500 is just a generic error. You need to find out actual error message and copy it here.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by paid1234 » Wed Feb 20, 2019 5:30 am

Check your error log for more infomation and post the log here for more help.

Thanks

User avatar
Newbie

Posts

Joined
Thu Aug 01, 2013 8:37 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 43 guests