kmitgroup / google-checkout-php-sample-code

Automatically exported from code.google.com/p/google-checkout-php-sample-code
0 stars 0 forks source link

Can't add multiple shipping rates to different countries. #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
$cart->AddItem($item_1);
$cart->AddItem($item_2);

$ship_1 = new GoogleFlatRateShipping("Fedex Standard (3-4 business days)",
0.00);
$restriction_1 = new GoogleShippingFilters();
$restriction_1->SetAllowedCountryArea("CONTINENTAL_48");
$ship_1->AddShippingRestrictions($restriction_1);

$ship_2 = new GoogleFlatRateShipping("Fedex 2nd Day", 15.00);
$restriction_2 = new GoogleShippingFilters();
$restriction_2->SetAllowedCountryArea("CONTINENTAL_48");
$ship_2->AddShippingRestrictions($restriction_2);

$ship_can = new GoogleFlatRateShipping("Priority International", 50.00);
$restriction_can = new GoogleShippingFilters();
$restriction_can->AddAllowedPostalArea("CA");
$ship_can->AddShippingRestrictions($restriction_can);

$ship_int = new GoogleFlatRateShipping("Priority International", 75.00);
$restriction_int = new GoogleShippingFilters();
$restriction_int->AddAllowedPostalArea("GB");
$ship_int->AddShippingRestrictions($restriction_can);

$cart->AddShipping($ship_1);
$cart->AddShipping($ship_2);
$cart->AddShipping($ship_can);
$cart->AddShipping($ship_int);

If either $cart->AddShipping($ship_can) or $cart->AddShipping($ship_int)
are commented out it will work but not both.

What version of the product are you using? On what operating system?
1.2.5c
PHP 5.1.6

Original issue reported on code.google.com by benhersz...@gmail.com on 13 Mar 2008 at 8:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Unfortunately, you can't have 2 shipping options with the same name

Original comment by peng.y...@gmail.com on 16 May 2008 at 12:50