close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

USPS config error

Thread began 2/23/2011 1:22 pm by tim.wolak331163 | Last modified 2/24/2011 10:09 am by Jason Byrnes | 731 views | 3 replies |

tim.wolak331163

USPS config error

I noticed in my USPS.php file that its still on the testing address, I've also noticed that shipping from zip was wrong and fixed it, however the weight and the ship to zip are static, what should it be set at to pull the ship to zip and the weight of the cart to calculate the correct shipping costs?

Thanks,
Tim

function WA_eCart_USPS_GetRateQuote($USPS_eCart, $USPS_Parameters, $USPS_PackageArray) {
WA_eCart_USPS_SetSessionDefaults($USPS_eCart);
$USPS_PkCount = 0;
$transSuccess = false;
$USPS_RateType = "RateV3Request";
$USPS_RespType = "RateV3Response";
if (WA_eCart_USPS_IsTrueValue($USPS_Parameters["ShiptoCountry"]) && strtoupper($USPS_Parameters["ShiptoCountry"]) != "UNITED STATES" && strtoupper($USPS_Parameters["ShiptoCountry"]) != "US" && strtoupper($USPS_Parameters["ShiptoCountry"]) != "USA") {
$USPS_RateType = "IntlRateRequest";
$USPS_RespType = "IntlRateResponse";
}
else {
$USPS_Parameters["ShiptoCountry"] = "US";
}
for ($USPS_Counter = 0; $USPS_Counter < sizeof($USPS_PackageArray); $USPS_Counter++) {
if (strpos($USPS_Parameters["USPSServer"],"testing.shippingapis.com") > 0) {
$USPS_PackageArray[$USPS_Counter]["PackageWeight"] = 10.3;
$USPS_Parameters["ShipperZip"]="10022";
$USPS_Parameters["ShiptoZip"]="20008";
$USPS_Counter = sizeof($USPS_PackageArray)-1;

Sign in to reply to this post

Jason ByrnesWebAssist

you do not want to change these settings in the WA_eCart/WA_eCart_USPS_PHP.php file, edit these settings in the USPS Shipping server behavior that is applied to the confirm.php page by the checkout wizard.

next to the ship to zip, click the lightning bolt and select the eCartCheckoutForm_shipping_postcode session variable.

for the weight, click the lightning bolt next to weight and select the total weight column from the ecart section of the bindings panel.

Sign in to reply to this post

tim.wolak331163

Usps

Thanks Jason,

The confirm page looks ok then but when something is added to the cart where does that shipping calculation come from? Does it come from the same function?

Tim

Sign in to reply to this post

Jason ByrnesWebAssist

when the checkout page post to the confirm page, it should trigger the shipping rate lookup behavior on the confirm page.

For the shipping rate to be applied to the cart, there needs to be a shipping rule in the eCart object set to trigger if the USPS rate is greater than 0 and use the USP Rate returned.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...