close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Free Shipping on a specific item

Thread began 1/11/2010 7:28 am by dan377928 | Last modified 1/14/2010 4:25 pm by dan377928 | 1746 views | 8 replies

Eric Mittman

Ok, you can account for this by doing another check within the server behavior when it is looping over the items. You can check the current item to see if it has a weight, if it does not then you can skip that one.

You can just alter the existing code in this server behavior where it is looping like this:

php:
if ((WA_eCart_USPS_IsTrueValue("true")) && ($eCart1->DisplayInfo("TotalWeight") > 0) ) {

$Shipping_PackageArray[] = array();
$Shipping_PackageIndex = sizeof($Shipping_PackageArray)-1;
$Shipping_PackageArray[$Shipping_PackageIndex]["eCart_Quantity"] = (($Shipping_Packaging == 1)?$eCart1->DisplayInfo("Quantity"):1);
$Shipping_PackageArray[$Shipping_PackageIndex]["IsPackage"] = "true";
$Shipping_PackageArray[$Shipping_PackageIndex]["Quantity"] = "1";
$Shipping_PackageArray[$Shipping_PackageIndex]["WeightUnits"] = "oz";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageWeight"] = "".$eCart1->DisplayInfo("TotalWeight") ."";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageType"] = "YOURPACKAGING";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageSize"] = "REGULAR";
$Shipping_PackageArray[$Shipping_PackageIndex]["PackageMachinable"] = "true";
$Shipping_PackageArray[$Shipping_PackageIndex]["IPackageType"] = "Package";
//Special Services
}



This should allow it to just skip the items that do not have a weight if there are any items in the cart that do have a weight. Please test this out with your various scenarios and let us know if this works for you and if not let us know what the result is.

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...