orbitasdelamor Posted March 24, 2005 Share Posted March 24, 2005 Okay, so I'm kind of new to this. I've edited the usps module so that flat rate envelopes and boxes do not appear under the shipping options. Here is my code: // Domestic types in request do not match MailService elements in response. There are multiple MailServices to each type. // We query these individually. This should make usps_method integration easier // in the mean time, comment out the unwanted ones $this->types = array( // 'Express' => 'Express Mail', 'First Class' => 'First Class Mail', 'Priority' => 'Priority Mail', // 'Parcel' => 'Parcel Post', // 'BPM' => 'Bound Printed Matter', // 'Library' => 'Library Mail', // 'Media' => 'Media Mail' ); // make queries for these specific package types, as well as none $this->containers = array ( 'Express' => array(''), 'Priority' => array('')); And this is what is showing up at the top of the page: Array ( [0] => ) Array ( [0] => [1] => ) Anyways, does anyone have a solution to this? I have no idea what I did wrong. Link to comment Share on other sites More sharing options...
OceanRanch Posted March 24, 2005 Share Posted March 24, 2005 Try changing 'Priority' => 'Priority Mail', to 'Priority' => 'Priority Mail' Last entry should not have a comma. HTH Tom Link to comment Share on other sites More sharing options...
orbitasdelamor Posted March 24, 2005 Author Share Posted March 24, 2005 Nope, didn't work. It's still saying at the top of the Delivery Information page: Array ( [0] => ) Array ( [0] => [1] => ) Link to comment Share on other sites More sharing options...
OceanRanch Posted March 24, 2005 Share Posted March 24, 2005 The array code looks fine. I wonder if the connection from your site to usps.com is failing and return a null value. The two array values being printed appear null. Sorry can't debug this one remotely. Tom Link to comment Share on other sites More sharing options...
Geotex Posted March 25, 2005 Share Posted March 25, 2005 Okay, so I'm kind of new to this. I've edited the usps module so that flat rate envelopes and boxes do not appear under the shipping options. Here is my code: // Domestic types in request do not match MailService elements in response. There are multiple MailServices to each type. // We query these individually. This should make usps_method integration easier // in the mean time, comment out the unwanted ones $this->types = array( // 'Express' => 'Express Mail', 'First Class' => 'First Class Mail', 'Priority' => 'Priority Mail', // 'Parcel' => 'Parcel Post', // 'BPM' => 'Bound Printed Matter', // 'Library' => 'Library Mail', // 'Media' => 'Media Mail' ); // make queries for these specific package types, as well as none $this->containers = array ( 'Express' => array(''), 'Priority' => array('')); And this is what is showing up at the top of the page: Array ( [0] => ) Array ( [0] => [1] => ) Anyways, does anyone have a solution to this? I have no idea what I did wrong. <{POST_SNAPBACK}> Since you commented out the Express Mail, I think you need the following lines // make queries for these specific package types, as well as none $this->containers = array ( 'Express' => array('Flat Rate Envelope'), 'Priority' => array('Flat Rate Box')); to be // make queries for these specific package types, as well as none $this->containers = array ( 'Priority' => array('Flat Rate Box'); Since you commented out Express Mail, you are calling an invalid pointer in the above array. However, this is just a guess, as I offer Express Mail, and am not going to change my code on the server to test it. HTH GEOTEX from Houston, TX (George) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.