It should at least write a timestamp to the log even if the data is empty and I do not see that.
these are from the post data (the first log write) basically stating which shipping method you selected so that is fine.
2019-04-25 8:47:11 - flat.flat
2019-04-25 8:49:43 - total_based.total_based_0
2019-04-25 8:51:41 - free.free
but I see nothing from
$this->log->write(print_r($this->session->data['shipping_methods'],true));
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
In JSON headers … ?so add some error_logs (or use echo) in there to see what is (not) happening.

Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
This the code from controller/checkout/shipping_method.php:letxobnav wrote: ↑Fri Apr 26, 2019 8:03 pmcan you show me the code you are using now?
It should at least write a timestamp to the log even if the data is empty and I do not see that.
these are from the post data (the first log write) basically stating which shipping method you selected so that is fine.
2019-04-25 8:47:11 - flat.flat
2019-04-25 8:49:43 - total_based.total_based_0
2019-04-25 8:51:41 - free.free
but I see nothing from
$this->log->write(print_r($this->session->data['shipping_methods'],true));
$this->log->write(print_r($this->request->post['shipping_method'], true));
if (!isset($this->request->post['shipping_method'])) {
$json['error']['warning'] = $this->language->get('error_shipping');
} else {
$shipping = explode('.', $this->request->post['shipping_method']);
$this->log->write(print_r($this->request->post['shipping_method'], true));
if (!isset($shipping[0]) || !isset($shipping[1]) || !isset($this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]])) {
$json['error']['warning'] = $this->language->get('error_shipping');
}
}
Code: Select all
$this->log->write(print_r($this->request->post['shipping_method'], true));
if (!isset($this->request->post['shipping_method'])) {
$json['error']['warning'] = $this->language->get('error_shipping');
} else {
$shipping = explode('.', $this->request->post['shipping_method']);
$this->log->write(print_r($this->request->post['shipping_method'], true));
if (!isset($shipping[0]) || !isset($shipping[1]) || !isset($this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]])) {
$json['error']['warning'] = $this->language->get('error_shipping');
}
}
Code: Select all
if (!isset($this->request->post['shipping_method'])) {
$json['error']['warning'] = $this->language->get('error_shipping');
} else {
$shipping = explode('.', trim($this->request->post['shipping_method']));
if (!isset($shipping[0]) || !isset($shipping[1]) || !isset($this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]])) {
$json['error']['warning'] = $this->language->get('error_shipping');
$this->log->write(print_r($this->request->post['shipping_method'], true));
}
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
That's done the job, I can now progress through the checkout without any errors! Thank you so much for your help guysstraightlight wrote: ↑Sat Apr 27, 2019 12:34 amReplace:
with:Code: Select all
$this->log->write(print_r($this->request->post['shipping_method'], true)); if (!isset($this->request->post['shipping_method'])) { $json['error']['warning'] = $this->language->get('error_shipping'); } else { $shipping = explode('.', $this->request->post['shipping_method']); $this->log->write(print_r($this->request->post['shipping_method'], true)); if (!isset($shipping[0]) || !isset($shipping[1]) || !isset($this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]])) { $json['error']['warning'] = $this->language->get('error_shipping'); } }
Code: Select all
if (!isset($this->request->post['shipping_method'])) { $json['error']['warning'] = $this->language->get('error_shipping'); } else { $shipping = explode('.', trim($this->request->post['shipping_method'])); if (!isset($shipping[0]) || !isset($shipping[1]) || !isset($this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]])) { $json['error']['warning'] = $this->language->get('error_shipping'); $this->log->write(print_r($this->request->post['shipping_method'], true)); } }

Code: Select all
$this->log->write(print_r($this->request->post['shipping_method'], true));
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Users browsing this forum: Semrush [Bot] and 33 guests