HERE IS HOW YOU FIX MULTIPLE SHIPMENTS

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
adminsuperatv
Ensign (ENS)
Ensign (ENS)
Posts: 4
Joined: Tue May 10, 2011 1:26 pm

HERE IS HOW YOU FIX MULTIPLE SHIPMENTS

Post by adminsuperatv » Thu May 12, 2011 7:44 am

I have been all over these forums looking for a solution to the following problem of which it seems many people have:

Scenario:
I currently ship via UPS. Shipping to Canada with UPS is outrageous and not economical. However shipping to Canada using USPS Flat Rate Box is awesome. AbleCommerce is restricted because it does not send dimensions to USPS, it only sends weight. The ShipSeparate function is useless and I am still not sure why dimensions even exist. So we needed a way to ship via USPS and UPS. The only solution AbleCommerce has is to put items in separate warehouses however when you do that it creates a multiple shipment scenario at checkout for the customer which is confusing and drives customers away. It would drive me away if I saw two different shipments at a checkout.

Solution:
The proper solution is to keep all products in one warehouse and still allow shipping via USPS Flat Rate and UPS internationally. The main challenge is the dimensions. Since AbleCommerce only sends weight USPS does not determines the packages based on that. For example, I have several 15 pound packages that USPS thinks can go into USPS Medium Flat Rate Box Shipping however the box dimensions are so far out it would never work. Below is code placed in the OnePageCheckout.aspx.cs file in the ShipmentList_ItemDataBound method. This accomplishes all that you will need. Here is the code:

//IF USPS INTERNATIONAL RATES ARE RETURNED AND THE PRODUCT IS IN THE NO USPS SHIPPING RANGE THEN DON'T ADD THIS QUOTE
if (quote.ShipMethodId == 80 || quote.ShipMethodId == 81 || quote.ShipMethodId == 82)
{
bool addshipmentquote = true;
for (int i = 0; i < shipment.Items.Count; i++)
{
if (addshipmentquote)
{
if (shipment.Items.ProductId == 701)
{
addshipmentquote = false;
continue;
}
}
}
if (addshipmentquote)
{
localQuotes.Add(new LocalShipRateQuote(quote.ShipMethodId, methodName, formattedRate));
}
}
else
{
localQuotes.Add(new LocalShipRateQuote(quote.ShipMethodId, methodName, formattedRate));
}

What this code does is this: If the quote returned is for one of the USPS methods (80,81,82) AND for every item in the basket if a product exists that cannot go via USPS then do NOT return a USPS quote into the ShipmentList drop down list. So this restricts it showing USPS quotes if a person has placed an item in the basket that cannot go USPS. And if all items in the basket can go USPS and UPS as well it will show all those quotes together and the customer can choose what they want.

This has been a nightmare for us and is finally fixed! I hope someone else can use this too.

Thanks,
Adam Jones
Director of Systems Engineering
http://www.superatv.com

User avatar
Mizmo67
Commander (CMDR)
Commander (CMDR)
Posts: 155
Joined: Wed Mar 16, 2005 5:35 pm
Location: NJ
Contact:

Re: HERE IS HOW YOU FIX MULTIPLE SHIPMENTS

Post by Mizmo67 » Sun Jun 05, 2011 8:12 am

Hello Adam,

This is a helpful solution, but I need to request a little assistance, please.

Where exactly should the code be placed? I've made 4 attempts (changed only the shipmethod (67) to be referenced and entered one productid from our catalog to test) but it generates error messages.

Once I know where to put the code and see that it works....I'm on to the next problem:
How would I set it up if there are multiple items to block? Like this?

Code: Select all

if (addshipmentquote)
{
if (shipment.Items[i].ProductId == 701 )
{
{
if (shipment.Items[i].ProductId == 702 )
{
{
if (shipment.Items[i].ProductId == 703 )
{
....etc
It seems cumbersome, especially as I believe we have around 200+ items to exclude from 8900 parts online.

Any help would be appreciated!
Thanks,
~Mo
~Mo

Maureen Albertson
Scott's Bait & Tackle / Mystic Reel Parts LLC
Contact Me Via Store Website
Image
Ablecommerce Gold R11 Catalog LIVE

Post Reply