Hide Weight in Cart and Preselect Default Shipping Method?

bushybushy Member
in Bugs & Feature Requests edited March 2008
First off guys...congrats on a fantastic product. Really, no kidding. I'm impressed at the ease of use and that I can use Foxycart without having to structure my site around the cart or my abandon a pretty laboriously built product database.

Just about have everything wired in. There are just a few tweaks I'd like to make to the cart but can't figure out how to do them and didn't see them covered in the docs or forum:

1. Is it possible to hide item weight in the cart? I realize the weight is needed to calculate shipping, but is there a way to make it invisible to customers? The items I sell are so light that the entry just becomes visual clutter.

2. I only offer one shipping method (USPS First Class) but customers still have to select the radio button for it, even though it's the only option. Is there a way to preselect and hide the option. Or failing the hiding part, at least make it selected by default>
Comments
  • brettbrett FoxyCart Team
    Hi bushy. Thx for the compliments!

    1. CSS, at this point, though they'll still show in the receipt emails (unless you want to generate your own receipt emails, which clearly seems a bit overkill for something so simple as hiding the weight). fc_cart_item_weight is the class.

    2. Very good catch. We'll try to work that into our next release. Thanks for letting us know about that.
  • Ok, I know this thread is almost two years old, but I have the same problem as #2. My client is only offering one shipping method, and doesn't want customers to have to "select" the one option. Any solution to that yet? Thanks!
  • lukeluke FoxyCart Team
    Digging up threads from the grave, eh?

    Heheh... not an official solution. The ticket is in our system as #549 but it hasn't been a priority so obviously it didn't make our "next release". Would something like this work for you?
    <script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery("#fc_shipping_methods_inner").ajaxComplete(function(event, request, settings) {
    jQuery("input[name=shipping_service]")[0].checked = true;
    })
    });
    </script>
    
    Just drop that in your checkout template.
  • Worked great! Thank you so much!!!
  • exactly what i needed. works great!
  • Thanks, Luke, very handy for me, too.
  • bushybushy Member
    Hmm, doesn't work for me. Or rather, it works to the extent that the radio button for the sole shipping method (in this case USPS Priority via Live Rates) is selected automatically. But the shipping cost is not actually applied to the order, I'm guessing because it takes an actual clicked event on the button before the fee is applied.

    For those who wrote this is working for them, beyond the radio button being selected by default, is the shipping cost also being factored into the order total?

    store version 5.1
    tested in IE 7, FF 3x, Chrome
  • OK. Added a click event to Luke's script and all's good.
Sign In or Register to comment.