Answer the question
In order to leave comments, you need to log in
Opencart 3 - "You must select a shipping method" error?
Opencart 3.0.3.3
When placing an order, the error "You must select a delivery method" appears (the methods themselves are displayed on the page in the video radio-button and are selected by the user). But when submitting Ajax , this wicked error appears.
HOWEVER
1) The price of the products is NOT 0 ,
2) Delivery is required in the product is "yes"
3) Delivery modules are enabled 100%
4) Ajax sends exactly the checked delivery method
5) "All regions" is selected in (native) delivery modules
6) Regions , countries, geo-zones did not delete (only renamed Russia to Russia, its region and city, that is, transliteration)
in the file catalog/controller/shipping-methodthere is an error text that is returned by json-"om" - this is " error_shipping " But error_shipping is returned twice in different checks,
in my case:
if (!isset($this->request->post['shipping_method'])) {
$json['error']['warning'] = $this->language->get('error_shipping') . '222'; //добавил 222 для проверки здесь ли ошибка, выяснилось что не здесь
} else {
$shipping = explode('.', $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') . '111'; // ошибка здесь
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question