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.

Only Charge Shipping to International Customers

jodycollierjodycollier Member
in Help edited January 2013

I'm looking for a way to make certain items' shipping free for domestic customers, while charging international customers.

Is there a code snippet [exception] sort of tag that that I could use on the item? I'd just be hard coding it into a few items on a page-by-page basis.


  • fc_adamfc_adam FoxyCart Team
    Hey Jody,

    So with your store you're set up to use live rates. To achieve conditional free shipping for some products only domestically, you'll need to add some javascript to your checkout which works out what shouldn't be charged for shipping and allowing for that.

    With live rates, if you have a product that is exempt from shipping you basically need to remove it's weight from the total weight of the cart that is send to the live shipping endpoint. That then removes it's weight from being factored into the shipping costs. You also need to have a check that if only free shipping items are in the cart, that you just offer free shipping as a rate for the customer to check.

    I've actually written something similar previously - this should get you over the line if I'm understanding you correctly:

    Follow the instructions here:

    And when it comes time for the custom logic, use this:

    And paste this right before the snippet detailed in the steps on that wiki page:

    That should get you there. Note I haven't tested this, so make sure you test it thoroughly. Also, note that this script relies on a product option called 'freedomestic' being set to 'true'. You can change 'freedomestic' to something else at the start of the first pastie I linked to.
  • @fc_adam ,

    This looks perfect. Thank you so much. I'll test it and let you know how it works.


Sign In or Register to comment.