Post by p4m » Mon May 25, 2009 4:09 pm

I have setup and enable shipping by weight method in my store, but when checkout I get this message each time:
Error: Shipping method required!

(local and host)

V 1.2.8

p4m
New member

Posts

Joined
Mon May 04, 2009 7:53 pm

Post by p4m » Tue May 26, 2009 12:43 am

Please,
I would like to get rid of this god damned message that prevent me from using Opencart on my site >:( !!!!

Code: Select all

Error: Shipping method required!
[/color]
Thanks to anyone who can help.

p4m
New member

Posts

Joined
Mon May 04, 2009 7:53 pm

Post by supreme » Tue May 26, 2009 3:34 am

i got this error also once. make sure the products have weight, try to logout and to clear the basket, then try again. the shipping method must appear so you can select it.

Newbie

Posts

Joined
Mon May 25, 2009 3:51 pm

Post by oceanmaster » Thu Jul 16, 2009 2:26 pm

If you are sure the products have weight and you are still getting this error then be sure you have setup the weight billing correctly.

The format of 5:10, 20:100 for example is referring to:

5 = (units of weight)
: = will cost
10 (units of cost).
, = separator between different weight to pricing structures

Once you have set this up empty all shopping baskets and try checking out again.

Newbie

Posts

Joined
Tue Jun 30, 2009 8:20 pm

Post by webfes » Thu Jun 30, 2011 9:38 am

I have found solution for this ..but its not parmanent solution.
/catalog/controller/checkout/shipping.php
1. remove condition on line no 24(if ($this->request->server['REQUEST_METHOD'] == 'POST'))
2. or comment from line 24 (if ($this->request->server['REQUEST_METHOD'] == 'POST') { ) to 44 ( } else { )
and line no 120 ( } )

:-)

New member

Posts

Joined
Thu Jun 30, 2011 9:32 am

Post by bfk » Thu Oct 20, 2011 10:31 pm

Opencart Version 1.5.1
Hi, I also get this message: Error: Shipping method required!
I have weight Based Shipping for Denmark, the products are in grams:
1000:140.00, 2000:290.00, 10000:470.00, 20000:750.00
1000g cost 140 kr
2000 cost 290 kr
10000 cost 470
20000 cost 750
And I have shipping Per Item, 36 kr for Sweden

My shipping.php code is:
<?php

class ControllerCheckoutShipping extends Controller {

public function index() {

$this->language->load('checkout/checkout');



$json = array();



$this->load->model('account/address');



if ($this->customer->isLogged()) {

$shipping_address = $this->model_account_address->getAddress($this->session->data['shipping_address_id']);

} elseif (isset($this->session->data['guest'])) {

$shipping_address = $this->session->data['guest']['shipping'];

}



if (!isset($shipping_address)) {

$json['redirect'] = $this->url->link('checkout/checkout', '', 'SSL');

}



if ((!$this->cart->hasProducts() && (!isset($this->session->data['vouchers']) || !$this->session->data['vouchers'])) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {

$json['redirect'] = $this->url->link('checkout/cart');

}



if ($this->request->server['REQUEST_METHOD'] == 'POST') {

if (!$json) {

if (!isset($this->request->post['shipping_method'])) {

$json['error']['warning'] = $this->language->get('error_shipping');

} else {

$shipping = explode('.', $this->request->post['shipping_method']);



if (!isset($this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]])) {

$json['error']['warning'] = $this->language->get('error_shipping');

}

}

}



if (!$json) {

$shipping = explode('.', $this->request->post['shipping_method']);



$this->session->data['shipping_method'] = $this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]];



$this->session->data['comment'] = strip_tags($this->request->post['comment']);

}

} else {

if (isset($shipping_address)) {

$this->tax->setZone($shipping_address['country_id'], $shipping_address['zone_id']);



if (!isset($this->session->data['shipping_methods'])) {

$quote_data = array();



$this->load->model('setting/extension');



$results = $this->model_setting_extension->getExtensions('shipping');



foreach ($results as $result) {

if ($this->config->get($result['code'] . '_status')) {

$this->load->model('shipping/' . $result['code']);



$quote = $this->{'model_shipping_' . $result['code']}->getQuote($shipping_address);



if ($quote) {

$quote_data[$result['code']] = array(

'title' => $quote['title'],

'quote' => $quote['quote'],

'sort_order' => $quote['sort_order'],

'error' => $quote['error']

);

}

}

}



$sort_order = array();



foreach ($quote_data as $key => $value) {

$sort_order[$key] = $value['sort_order'];

}



array_multisort($sort_order, SORT_ASC, $quote_data);



$this->session->data['shipping_methods'] = $quote_data;

}

}



$this->data['text_shipping_method'] = $this->language->get('text_shipping_method');

$this->data['text_comments'] = $this->language->get('text_comments');



$this->data['button_continue'] = $this->language->get('button_continue');



if (isset($this->session->data['shipping_methods']) && !$this->session->data['shipping_methods']) {

$this->data['error_warning'] = sprintf($this->language->get('error_no_shipping'), $this->url->link('information/contact'));

} else {

$this->data['error_warning'] = '';

}



if (isset($this->session->data['shipping_methods'])) {

$this->data['shipping_methods'] = $this->session->data['shipping_methods'];

} else {

$this->data['shipping_methods'] = array();

}



if (isset($this->session->data['shipping_method']['code'])) {

$this->data['code'] = $this->session->data['shipping_method']['code'];

} else {

$this->data['code'] = '';

}



if (isset($this->session->data['comment'])) {

$this->data['comment'] = $this->session->data['comment'];

} else {

$this->data['comment'] = '';

}



if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/checkout/shipping.tpl')) {

$this->template = $this->config->get('config_template') . '/template/checkout/shipping.tpl';

} else {

$this->template = 'default/template/checkout/shipping.tpl';

}



$json['output'] = $this->render();

}



$this->load->library('json');



$this->response->setOutput(Json::encode($json));

}

}

?>

So, what do I need to do? Can some one help me please?

bfk
Newbie

Posts

Joined
Thu Oct 20, 2011 10:14 pm
Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 17 guests