Is there a way to skip "Click to Calculate Shipping"

Posts: 76
Joined: 09/19/2007
Bug FinderGetting busy with the Ubercode.

The shipping cost on all products in this will always be the same (free). For usability, it would be nice to skip the shipping quote. I've done a search on UC for 'free shipping', and there are some patches that allow free shipping, but I was wondering if there was a configuration option to skip shipping cost, but still require users to supply a shipping address?

Thanks!
Chris

Posts: 4700
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Do you even need to enable the shipping quote checkout pane then?

Posts: 60
Joined: 09/07/2007
Bug Finder

I think that should work for this case.

I've tried it on my site, but I'm using a fixed fee for shipping and when you disable the shipping quote checkout pane you also lose the shipping charge in the order preview. That shouldn't matter in this case. I'm still trying to figure out the best way to handle it for my case...

Posts: 76
Joined: 09/19/2007
Bug FinderGetting busy with the Ubercode.

I just wanted to post that disabling the pane was the solution I was looking for. I love that flexibility! Thanks!

Posts: 15
Joined: 01/26/2008

I've actually got fixed rates, but I don't want my users to have to click the "calculate shipping" button; I'd rather it automatically calculate the shipping on page load. I know it's supposed to do that when you enter your shipping address, but I'm not asking for the shipping address on my site; I'm letting PayPal collect that information. Is there a way I can make UC automatically click the "calculate shipping" button?

Posts: 2086
Joined: 08/07/2007
AdministratoreLiTe!

You can make a tiny module that loads a javascript file on the checkout page. It doesn't even have to be a separate file, just this snippet of code:

<?php
  drupal_add_js
('$(document).ready(function(){
    $("input[@id*=quote-button]").click();
  });'
, 'inline');
?>

Posts: 15
Joined: 01/26/2008

Sorry to be dense, but where do I put this snippet? In my template.php? Somewhere in the UC modules? Sorry, I'm pretty JS-deficient. Any way I could trouble you for more detail? Thanks so much!

Posts: 2086
Joined: 08/07/2007
AdministratoreLiTe!

Eh, I think it's better for me to make a contrib module anyway. So here it is: http://www.ubercart.org/contrib/3633.