Change shipping options depending on overall order price

alanalan Member
in Help edited May 1
Hi,

On our checkout page, we currently have a shipping option for "free usps standard (~3-8 days)". We want to make it so this option is only available if the total order price is over $20. Is custom JavaScript the easiest way to do this? Or would you recommend the "custom shipping endpoint"? Or maybe there is an even easier way?

We are using V2.0.

Thanks,

Alan
Comments
  • fc_adamfc_adam FoxyCart Team
    @alan,

    Thanks for the overview. Looking at your store - the "free usps standard" option you're referring to there is the free ground shipping option set on the shipping page in the admin. We don't currently have a native option for dictating when that rate should be shown, but you can use the custom live shipping javascript snippet to remove that option if the customer doesn't have enough in their cart yet.

    You can see details of adding the snippet to your store here: https://wiki.foxycart.com/v/2.0/snippets/live_rate_shipping_modification. For the custom shipping logic for the snippet, you can include the following:
    FC.customLiveShipping.hide(60);
    if(FC.json.total_item_price >= 20) {
    FC.customLiveShipping.show(60);
    }
    That will only show the free shipping rate if the customer has $20 or more in their cart at the time.
Sign In or Register to comment.