Post by SuperJuice » Thu Mar 25, 2010 5:57 pm

You can end up in a position where you are in the checkout and there is no postage option, usually due to an unforeseen combination in the shopping cart / destination etc.

I think OpenCart itself (not the shipping modules) needs to handle with some kind of error/message (or fallback.. manual calculation of shipping cost for eg.) when no shipping modules (options) have successfully returned a shipping method.
Last edited by SuperJuice on Fri Mar 26, 2010 10:57 am, edited 2 times in total.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by Qphoria » Fri Mar 26, 2010 11:25 am

Yes, the usual "Error: Shipping Method Required" is a bit lacking. It's technically a store owner issue as they should be sure to supply ample shipping options. This also applies to payment options, not just shipping.

It's a simple fix:

1. EDIT: catalog/model/checkout/shipping.php

2. FIND:

Code: Select all

$sort_order = array();
3. AFTER, ADD:

Code: Select all

if (!$quote_data) {
	$this->load->language('checkout/shipping');
	$this->error['warning'] = $this->language->get('error_not_available');
}
4. EDIT: catalog/language/english/checkout/shipping.php

5. FIND:

Code: Select all

$_['error_shipping']        = 'Error: Shipping method required!';
6. AFTER, ADD:

Code: Select all

$_['error_not_available']   = 'Error: No Shipping options are available. Please <a href="index.php?route=information/contact">contact us</a> for assistance!';
Do the same for payment, but change quote_data to method_data and shipping to payment

Image

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by SuperJuice » Fri Mar 26, 2010 12:16 pm

Yep, looks good. ;D

Now we just need Daniel to add it to 1.4.5 ;)

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by i2Paq » Fri Mar 26, 2010 3:50 pm

SuperJuice wrote:Yep, looks good. ;D

Now we just need Daniel to add it to 1.4.5 ;)
I've send a PM to Daniel in the hope that he can add it to 1.4.5...

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Daniel » Fri Mar 26, 2010 7:23 pm

thx!

added it to both login and guest checkout.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm
Who is online

Users browsing this forum: No registered users and 18 guests