Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Issue with Free Shipping on Orders Over $80 with Foxy Cart 1.1

grapiengrapien Member
in Help edited April 2013
I just noticed that my free shipping javascript code is no long working on Foxy Cart v 1.1. I would like to offer my customers free shipping on all orders over $79.99. The Free Shipping options is no longer appearing when the order value exceeds $80. My code is as follows:
<script type="text/javascript" charset="utf-8" >
var myCustomShipping = function() {
  if (fc_json.total_price < 79.99) {
    // if the requirements *are not* met, then remove the free shipping option.
    jQuery("label[for='shipping_service_60']").remove();
  }
}
 
jQuery(document).ready(function() {
  jQuery(document).ajaxComplete(function(event, request, settings) {
    myCustomShipping();
  });
});
</script>

If you someone could please provide some guidance that would be greatly appreciated.

Tagged:
Comments
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    can you whisper a link to an add-to-cart product your site? It would be helpful to see this.
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    Thanks for the link. Are you sure that you have the Free Shipping turned on in the admin in the shipping section?
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    Thanks for that -- it does look like it is set up okay. I think we'll need to leave it for one of the FoxyCart support staff members to jump on in just a bit. I think you've got all the relevant info posted here, though, so I think they'll be able to troubleshoot thoroughly. Sorry I wasn't able to figure it out.
  • Thanks for trying :) Hopefully one of the support team can help out ! :)
  • fc_adamfc_adam FoxyCart Team
    @grapien

    You have a second code block that is removing the free ground shipping option - in particular this function:
    function checkFreeShip() {
      if (fc_json.custom_fields[FCcode] == "true") {
        jQuery("label[for='shipping_service_60']").show();
        if (FConly) {
          $("#fc_shipping_methods_inner label").not("label[for='shipping_service_60']").hide();
        }
      } else {
        jQuery("label[for='shipping_service_60']").remove();
      }
    }
    

    You'll need to remove that second block of code that includes that function and it should start working again
Sign In or Register to comment.