Answer the question
In order to leave comments, you need to log in
What is the simplified checkout module for opencart?
Good day to all!
OpenCart version - 2.1.0.1
I already installed the Simple module (simplified checkout) on OpenCart, and also tried to solve this problem manually using the tutorial . (I wrote to the site admin, but he himself does not understand what the error might be)
But, unfortunately , neither the first nor the second methods came up. Option 2 when placing an order at the 2nd step - it gives an error in code 285, and then, in addition, it gives error 17 at the top of the page and in the error window directly:
// Сам код, на который ругается PHP интерпретатор:
if ($this->session->data['guest']['shipping_address']) {
$this->session->data['shipping_address']['firstname'] = $this->request->post['firstname'];
$this->session->data['shipping_address']['lastname'] = $this->request->post['lastname'];
$this->session->data['shipping_address']['address_1'] = $this->request->post['address_1'];
$this->session->data['shipping_address']['city'] = $this->request->post['city'];
if (isset($this->request->post['custom_field']['address'])) {
$this->session->data['shipping_address']['custom_field'] = $this->request->post['custom_field']['address'];
} else {
$this->session->data['shipping_address']['custom_field'] = array();
}
}
Answer the question
In order to leave comments, you need to log in
The system expects you to pass zone_id, country_id, and shipping_address as parameters, but you don't.
Look at the checkout/guest.php controller code to see what parameters it expects and pass in the appropriate ones.
I deleted my previous answer, there already started a srach.
So:
$this->session->data['payment_address']['zone_id']; - There is not enough zone_id in the session (this is necessary for calculating taxes)
I don't know exactly where to get this zone_id.
$this->session->data['payment_address']['country_id']; - the actual country id.
I see you are already there and adding goods to the cart is so broken)
In short, you broke somewhere or did not add country_id and zone_id to the session.
$this->session->data['guest']['shipping_address'] - this is the actual data from your form that needs to be put into the session.
I read the instructions you followed.
There's item number 6, delete lines
$this->session->data['guest']['payment']['country_id'] = $this->request->post['country_id'];
$this->session->data['guest']['payment']['zone_id'] = $this->request->post['zone_id'];
$country_info = $this->model_localisation_country->getCountry($this->request->post['country_id']);
if ($country_info) {
if ($country_info['postcode_required'] && (utf8_strlen($this->request->post['postcode']) < 2) || (utf8_strlen($this->request->post['postcode']) > 10)) {
$json['error']['postcode'] = $this->language->get('error_postcode');
}
// VAT Validation
$this->load->helper('vat');
if ($this->config->get('config_vat') && $this->request->post['tax_id'] && (vat_validation($country_info['iso_code_2'], $this->request->post['tax_id']) == 'invalid')) {
$json['error']['tax_id'] = $this->language->get('error_vat');
}
}
if ($this->request->post['country_id'] == '') {
$json['error']['country'] = $this->language->get('error_country');
}
if ($this->request->post['zone_id'] == '') {
$json['error']['zone'] = $this->language->get('error_zone');
}
There are different modules, not only simple and quite high quality. shop.opencart-russia.ru/rybrikator/rybrika-bistrii...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question