Country field for shipping estimates

Project: 
Ubercart
Category: 
feature request
Priority: 
normal
Status: 
patch (good to go)

Very simple patch, adds a country drop-down to the shipping estimate pane. So long as each shipping module can create quotes when they get a country and postal_code field, they'll be able to use it (Canada Post works with no modifications - I have not tested UPS).

Index: uc_quote.module
===================================================================
--- uc_quote.module     (revision 12)
+++ uc_quote.module     (working copy)
@@ -700,6 +700,7 @@
       $method_choices[$method['id']] = $method['title'];
     }
   }
+  $form['delivery_country'] = uc_country_select(uc_get_field_name('country'), NULL, '', 'name', TRUE);
   $form['delivery_postal_code'] = uc_textfield(uc_get_field_name('postal_code'), '', TRUE, NULL, 10, 10);
   $form['quote_method'] = array('#type' => 'hidden',
     '#value' => key($method_choices),
@@ -747,6 +748,7 @@
function theme_uc_cart_pane_quotes($form){
   $output = '<div class="solid-border">';
   $output .= '<strong>'. t('Estimated shipping cost:') .'</strong>';
+  $output .= drupal_render($form['delivery_country']);
   $output .= drupal_render($form['delivery_postal_code']) . drupal_render($form['get_quote']);
   $output .= drupal_render($form);
   $output .= '</div>';