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.

Free Shipping Unless A Coupon is Used

marketing_guymarketing_guy Member
in Help edited July 2013

I've put in Free Shipping on a client's site for orders over $100. However, the client doesn't want to offer free shipping if the order is over $100 and the person has entered any coupons (there are two currently).

Is it possible to turn off the free shipping in that case? (example product coupon page:

  • fc_adamfc_adam FoxyCart Team

    You can use this in your if statement to find out if any coupons are attached:

    That code will return true if there are any coupons in the cart, false if not.
  • Thanks! Now, being javascript challenged...where does that get placed?
    <script type="text/javascript" charset="utf-8" >
    var myCustomShipping = function() {
      if (fc_json.total_price < 100) {
        // if the requirements *are not* met, then remove the free shipping option.
    jQuery(document).ready(function() {
      jQuery(document).ajaxComplete(function(event, request, settings) {
  • fc_adamfc_adam FoxyCart Team
    Within your if statement like this:
    if (fc_json.total_price < 100 || fc_json.hasOwnProperty('coupons')) {

    That says if the total price is less than 100 or if the order has coupons, remove the shipping rate.
Sign In or Register to comment.