Hi,
Our main warehouse is located in Canada and the majority of shipping to US/Can is done through Fedex. When an international orders comes in, it is much cheaper to send the product down to our US distributor, the using USPS, have it shipped to the oversea location. This saves our customer roughly 30% on shipping costs.
Anyone have suggestions on how we can integrate a shipping calculator that will return the cost to ship from Canada warehouse to US Distributor with Fedex, then US Distributor to Oversea Customer with USPS. This would all be done in the same transaction and returned to the system as one shipping number to be charged on the Credit card.
Thanks
Unique shipping requirements for International Customers
I'm new to the internals of AC, but I'd imagine this could be done. Take a peek at the GoogleCheckoutButton class and download the UPS shipping provider classes (they're a sticky in one of the forums). Each shipping gateway should implement a GetShipRateQuote method. You could create a default object to represent the shipment from your Canada warehouse to the US location. This default shipment could be estimated by a call to the FedEx provider's GetShipRateQuote method. You could then calculate the USPS shipment amount like you are probably doing today ... add the two together, and you should have a pretty good approximation.
Again, I've never done this, and I've only briefly looked at the code. I'd like to say that a developer will chime in shortly to clear things up, but I haven't had much in the way of developer response to my technical posts, so I'm not sure how frequently they lurk here.
Good luck!
private ShipRateQuote GetShipRateQuote(Basket basket, ShipMethod shipMethod)
{
GoogleBasketShipment shipment = new GoogleBasketShipment(basket, shipMethod);
return shipMethod.GetShipRateQuote(shipment);
}
Again, I've never done this, and I've only briefly looked at the code. I'd like to say that a developer will chime in shortly to clear things up, but I haven't had much in the way of developer response to my technical posts, so I'm not sure how frequently they lurk here.
Good luck!
private ShipRateQuote GetShipRateQuote(Basket basket, ShipMethod shipMethod)
{
GoogleBasketShipment shipment = new GoogleBasketShipment(basket, shipMethod);
return shipMethod.GetShipRateQuote(shipment);
}
This is certainly possible as outlined by keats76.
There can be two ways to handle this.
1. You create your own Shipping Provider Implementation that calculates shipping rates separately and then adds them up. You can then put this new implementation in Website/Bin and it could be used from in AC just like any other Provider implementation.
2. You handle your unique logic somewhere in the aspx Code-Behind files by manually getting rate quotes from FedEx and UPS adding them up and showing them to the user as desired.
In any case you need to do customization.
If you want to get rates using existing shipping providers then GetShipRateQuote method implemented by each shipping provider can be used.
You can get the list of service codes for each implementation using the GetServiceListItems method
There can be two ways to handle this.
1. You create your own Shipping Provider Implementation that calculates shipping rates separately and then adds them up. You can then put this new implementation in Website/Bin and it could be used from in AC just like any other Provider implementation.
2. You handle your unique logic somewhere in the aspx Code-Behind files by manually getting rate quotes from FedEx and UPS adding them up and showing them to the user as desired.
In any case you need to do customization.
If you want to get rates using existing shipping providers then GetShipRateQuote method implemented by each shipping provider can be used.
Code: Select all
ShipRateQuote GetShipRateQuote(Warehouse origin, Address destination, BasketItemCollection contents, string serviceCode);
and
ShipRateQuote GetShipRateQuote(IShipment shipment, string serviceCode);
Code: Select all
ListItem[] GetServiceListItems();