The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Delivery Zones

dasharddashard Member
in Help edited October 2010
In an effort to work around the 150lb weight limitation of the live-rate system, my client moved to a flat-rate based on weight scenario, basing his rates on shipping Xlbs to Los Angeles, all the way across the country from Brooklyn, NY where he's located. Using these rates and applying them to each product in the cart, the shipping costs have become prohibitive as well as unrealistic. They are often in the 40-50% of the total cart cost range.

When speaking with the supplier (who will be doing the drop-shipping) I was informed that local (East coast) deliveries tend towards 20% of the cart total, central states 25% and western states about 30%. These would reflect a much more reasonable charge in the cart.

I know that I can implement the shipping categories for these flat rates based on cart total, but how can I apply them on the fly based on delivery address? I thought I'd read a question about this here in the forums, but I'm not finding anything. Would like to essentially create a zone1, zone2, etc., and apply those categories on the fly at checkout.

Any ideas?
Comments
  • OK. Looking at the json_cart object a bit more closely I find that I can get the total cart weight (presuming the weights I pass are accurate) but I do not know how to grab the shipping zip code, which would be one way to create my own "Live rates" system, using a complex array of zips=>zones=>prices per weight.

    Presuming I could get all that to work, am I right in assuming that I would need to add my javascript to the checkout template, and then quick do the math based on destination and weight and costs provided from the UPS "Daily" Rates for 2010?

    Does that make sense?
  • fc_adamfc_adam FoxyCart Team
    edited October 2010
    @dashard, yep to do tiered flat rate shipping you'll need to add some javascript to the checkout page. You grab the zip code by getting the value of the postcode input on the checkout using jQuery. Note that you'll need to check which is the shipping address (ie. has the customer checked "ship to a different address" or not). The following should give you the right post code, but note that you'll need to check it whenever the post code box or the "ship to different address" checkbox changes.
    var pc = (jQuery("#use_different_addresses").is(":checked") ? $("#shipping_postal_code").val() : $("#customer_postal_code").val());
    

    There's a couple threads linked to from http://wiki.foxycart.com/v/0.6.0/docs/advanced/forum that should get you started, if not pretty close to where you want to be for the tiered flat rate shipping .
Sign In or Register to comment.