Post by average_joe » Mon Oct 24, 2011 5:05 am

Hello,

I need some help.

I am working through the checkout stage.
Once I get past the shipping prices I click continue, and it does not go to payment method.
I get this error code..

Code: Select all

PHP Notice:  Undefined offset:  1 in .../store/catalog/controller/checkout/shipping.php on line 31
What reads along that 31 line is..

Code: Select all

if (!isset($this->session->data['shipping_methods'][$shipping[0]]['quote'][$shipping[1]])) [
$json['error']['warning'] = $this->language->get('error_shipping');
               }
Does anyone know what is wrong?

I'm using version 1.5.1

thank you

New member

Posts

Joined
Sat Sep 03, 2011 1:47 pm

Post by uksitebuilder » Mon Oct 24, 2011 5:32 am

Its most definitely a bug in the shipping module you are using

ImageImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by average_joe » Tue Oct 25, 2011 12:44 am

i'm using Qphoria's USPS shipping module, but if I were to change it to any other shipping module the same thing happens..

Is there anything I can do to fix it?

New member

Posts

Joined
Sat Sep 03, 2011 1:47 pm

Post by Qphoria » Wed Oct 26, 2011 2:16 am

I don't have a USPS shipping module for 1.5.x
There is only the one in the core and I've never seen this.
Try updating to the latest version of opencart or at least the latest version of the USPS module from the 1.5.1.3.1 zip (catalog/model/shipping/usps.php)

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by average_joe » Thu Oct 27, 2011 4:41 am

i've tried the updated USPS module from the newest opencart version, and it still has the same results..

each time I change the module, it does the same thing.
I've even tried to update to an entirely new opencart version.

I'm not sure what happened

New member

Posts

Joined
Sat Sep 03, 2011 1:47 pm

Post by 24-7-open » Tue Dec 13, 2011 6:24 pm

Problem lies most likely in the interpunction or formatting of your shipping rates. Check all .,:

New member

Posts

Joined
Tue Feb 23, 2010 6:45 pm

Post by frenzy111 » Thu Dec 15, 2011 7:07 pm

i'm not using opencart, but after spending several hours with the same bug incorporating the usps api on my site I figured i'd share my thoughts.

I have 3 different pages that im using to call the rates check, all with the same variables. 2 of them are bare bones, the 3rd (which is getting the undefined offset 1 error) is the actual page for my site. The only differences i can tell is that on the 3rd page, im calling a function to return the rates. I've also changed it to just echo it out, but in either case, I get the rates fine, it's just the damn error won't go away. Venture any guesses? i'll check back tomorrow

Newbie

Posts

Joined
Thu Dec 15, 2011 7:00 pm

Post by frenzy111 » Sat Dec 17, 2011 10:57 am

I discovered a solution to my particular problem. Hope it helps someone. In my code here, there is a value of $extra which is never defined. I commented out this part, and then printed out the array being returned.

Code: Select all

	if (array_key_exists('attributes',$xml_elem)) {
			list($level[$xml_elem['level']],$extra) = array_values($xml_elem['attributes']);
		} else {
After seeing what values were being printed out,
i returned the the following

Code: Select all

return $params['RATEV4RESPONSE']['PACKAGE']['POSTAGE']['RATE'];
So it would seem to me it has something to do with the array values. I'm just going with what works. going to test out the rest of the shipping methods and hope all goes well.

Newbie

Posts

Joined
Thu Dec 15, 2011 7:00 pm
Who is online

Users browsing this forum: No registered users and 3 guests