B
B
Bloggo1232015-12-14 17:59:54
CMS
Bloggo123, 2015-12-14 17:59:54

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:
341ba88617d644a9bea172794f54701a.png

// Сам код, на который ругается 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();
        }
      }

You can check yourself. Link .
Maybe someone met with this error and solved it, I will be glad if you help. Also, maybe someone knows an alternative to the Simple module.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Immortal_pony, 2015-12-14
@Immortal_pony

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.

R
Rikcon, 2015-12-14
@Rikcon

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'];

So you removed them, and from the insides of the opencart itself, perhaps by inattention, you forgot to cut this out: (this is point 5 in your guide)
$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');
      }

I have 2 versions:
1 - you did not follow the instructions carefully and did not delete something.
2- Maybe a guide for 1 version of opencart, but you have 2?
By the way, the instruction is extremely doubtful, there in the comments the author points out a bunch of errors.
Return the files to their original state and install the Simple plugin after all;
Let's deal with it better than with random cuts of lines anywhere.

O
opencart-russia, 2015-12-17
@opencart-russia

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 question

Ask a Question

731 491 924 answers to any question