Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

USPS shipping - NEW PROBLEM FOUND


2 replies to this topic

#1 albalo

  • Community Member
  • 22 posts
  • Real Name:shar dara
  • Gender:Male
  • Location:USA

Posted 20 July 2007, 05:56

Hello everyone,

i am using USPS for my shipping, but i have found a problem which is:
USPS International Priority Mail Flate Rate Envalope can hold till 4 Pounds and all of our products which are more than 1 pound have to be USPS International Priority Mail Flate Rate Box.

but USPS will give the customer both options while they have something over 1 pound in their shopping cart.
i believe there are couple of different people having the same problem.

now the Answer is, we need to write the code that says if the shipping is > than 1 pound, then we eliminate the USPS International Priority Mail Flate Rate Envalope.
i tried the code and i can't really fix it.

so if anyone knows how to write such a code, please help .

thank you guys so much for all your help.

#2 Monika in Germany

  • Community Member
  • 4,860 posts
  • Real Name:Monika
  • Gender:Female
  • Location:Frankfurt, Germany

Posted 20 July 2007, 08:38

View Postalbalo, on Jul 20 2007, 07:56 AM, said:

Hello everyone,

i am using USPS for my shipping, but i have found a problem which is:
USPS International Priority Mail Flate Rate Envalope can hold till 4 Pounds and all of our products which are more than 1 pound have to be USPS International Priority Mail Flate Rate Box.

but USPS will give the customer both options while they have something over 1 pound in their shopping cart.
i believe there are couple of different people having the same problem.

now the Answer is, we need to write the code that says if the shipping is > than 1 pound, then we eliminate the USPS International Priority Mail Flate Rate Envalope.
i tried the code and i can't really fix it.

so if anyone knows how to write such a code, please help .

thank you guys so much for all your help.

use this and fill each with the method you want to allow:

Quote

if (is_object($order)) {
global $cart;
if ($cart->show_weight() < 1) {
$this->intl_types = array(...);
} elseif ($cart->show_weight() <= 4) {
$this->intl_types = array(...);

} else {
$this->intl_types = array(...);
}

}

:-)
Monika

addicted to writing code ... can't get enough of databases either, LOL!

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

Interactive Media Award July 2007 ~ category E-Commerce
my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

#3 albalo

  • Community Member
  • 22 posts
  • Real Name:shar dara
  • Gender:Male
  • Location:USA

Posted 20 July 2007, 18:23

View PostMonika in Germany, on Jul 20 2007, 04:38 AM, said:

use this and fill each with the method you want to allow:

Thank you sooo much Monika. You are the best. you fixed my problem.

everyone, if you have the international problem for flatrate envelope and flate rate box, here is the code which (Thanks to Monika) wrote it.
you need to add this code somewhere about line 68 in includes/modules/shipping/usps.php

if (is_object($order)) {
		global $cart;
	if ($cart->show_weight() < 1) { 
		$this->intl_types = array('Priority Mail Int Flat Rate Env' => 'Priority Mail International Flat Rate Envelope');
	} elseif ($cart->show_weight() >= 1) { 
		$this->intl_types = array('Priority Mail Int' => 'Priority Mail International');
	}
	}