PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Conditional Shipping Fields

  1. As advised in this post: http://www.gravityhelp.com/forums/topic/freight-by-province#post-35314 I would like to use multiple Shipping Fields using conditional logic.

    So if Product A is selected
    Shipping A at $20 is conditionally shown

    if Product B is selected
    Shipping B at $40 is conditionally shown

    I can't seem to get GF to do this as it advises that only one shipping field per form is allowed. Is there a workaround for this? I can easily do this for Product Options, but then it doesn't display the S&H separately at Paypal.

    Thanks for your help,
    Steve

    Posted 12 years ago on Friday February 10, 2012 | Permalink
  2. It was because Shipping is usually something where multiple options aren't presented to the user with separate fields.

    When we pass shipping to a payment gateway, it's a single field that gets passed. When we display Shipping as part of the formatted order data it's a single line item, etc.

    So we locked it down to only one Shipping field per form.

    So if you add multiple Shipping Fields and don't use conditional logic properly so that multiple Shipping Fields are then presented to the user, we'd have to decide how to handle that from both a payment gateway add-on perspective as well as how to present that in the order display in the entry details as shipping is currently (and in most ecommerce applications) a single line item.

    It isn't something i've seen come up before. I see where what is described has value, but we'd have to look at all the scenarios and see how that is handled when a user doesn't properly configure things so that only a single Shipping field is selected.

    We can discuss it further and see how we can enhance the functionality to support something like this, but for now the only solution is to incorporate shipping as a Product Field rather than using the Shipping Field itself.

    Posted 12 years ago on Wednesday February 15, 2012 | Permalink
  3. Thanks for the reply and glad to hear there is some consideration of such a feature down the line.

    In the short term, understanding the complications, I would love an option to disable the one shipping field limitation to try this out with conditional logic. Any thoughts on how to accomplish this, perhaps through some custom code in functions.php, would be appreciated.

    Posted 12 years ago on Wednesday February 15, 2012 | Permalink
  4. +1 on this, definitely would love a way to offer different shipping costs if X or Y are ordered in quantity, over just a flat rate shipping cost.

    Still trying to figure out how to do this with the PayPal Pro addon.

    Posted 12 years ago on Thursday March 29, 2012 | Permalink
  5. We haven't done any enhancements to the Shipping Field but we have noted this use case to see how we can tackle it.

    The easiest solution is going to be to simply handle Shipping using Product Fields. So instead of using the Shipping Field type in your form, simply use Product Fields. Then you can have multiple options and show/hide them using conditional logic, etc.

    Posted 12 years ago on Thursday March 29, 2012 | Permalink
  6. Hmm ok...

    So let's say I'm selling just a single product and I want to offer different shipping rates based on the quantity, how exactly do I do that using just the Product field? Maybe I'm just not understanding how to accomplish it.

    Thanks Carl

    Posted 12 years ago on Thursday March 29, 2012 | Permalink
  7. relish1227
    Member

    I'm also looking for a solution for this -- client is selling a book and wants shipping to be based on quantity. He also, ideally, wants the shipping to be different based on quantity AND state (he's in MN and has to add a tax for MN residents).

    Posted 12 years ago on Thursday March 29, 2012 | Permalink
  8. I've been trying to add shipping options so if order value is over X then it shows one dropdown if its not it shows another, but can't i guess this is why.

    Posted 12 years ago on Friday July 27, 2012 | Permalink
  9. David Peralty

    Create a Product called Shipping. Give it a price. Then you can go into conditional logic and have it set to only show if another field has a certain value. So the shipping price will only show and be added to your total when it meets the conditional logic. You can do the reverse as well and hide the field if the value is over a certain amount, thus removing the shipping cost.

    Posted 12 years ago on Friday July 27, 2012 | Permalink
  10. How do I remove the text right next to the dollar amount in the field then? I am using the single product field with conditional logic to adjust the shipping but there is still text next to the dollar amount and cannot see how to remove this.

    Posted 11 years ago on Thursday April 25, 2013 | Permalink
  11. David Peralty

    Can you link to your form and point out exactly which text you don't want to show up?

    Posted 11 years ago on Thursday April 25, 2013 | Permalink
  12. Here is the link: http://www.themiracleofisrael.com/kj-order-dvd-page/

    Next to the shipping, there is a donation text from the other product I am assuming. Let me know if this makes sense what I am trying to do.

    Posted 11 years ago on Thursday April 25, 2013 | Permalink
  13. Oh, you have to chose a country other than the US to see the shipping.

    Posted 11 years ago on Thursday April 25, 2013 | Permalink
  14. David Peralty

    jvmi - You can control product labels, so you could have it say whatever you want.

    If you want to hide it though, add the following your theme's style.css

    .gfield_product_10_53 .ginput_product_price_label { display: none; }
    Posted 11 years ago on Thursday April 25, 2013 | Permalink
  15. Thank you and I will take a look at this.

    Posted 11 years ago on Thursday April 25, 2013 | Permalink

This topic has been resolved and has been closed to new replies.