? .svn
? uc_free_order_settings.php
Index: uc_free_order.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_free_order/uc_free_order.js,v
retrieving revision 1.1.4.4
diff -u -p -r1.1.4.4 uc_free_order.js
--- uc_free_order.js	29 Oct 2009 21:01:26 -0000	1.1.4.4
+++ uc_free_order.js	11 Jan 2010 17:22:45 -0000
@@ -9,7 +9,6 @@ $(document).ready(
     $('#edit-panes-payment-current-total').click(function() { free_order_check_total(this.value); });
   }
 );
-
 /**
  * Checks the current total and updates the available/selected payment methods
  * accordingly.
@@ -32,7 +31,7 @@ function free_order_check_total(total) {
     $("input:radio[value=" + uc_free_order_next_method + "]").attr('checked', 'checked');
 
     // Refresh the payment details section.
-    get_payment_details(Drupal.settings.ucURL.checkoutPaymentDetails + uc_free_order_next_method);
+    get_payment_details(Drupal.settings.basePath + 'cart/checkout/payment_details/' + uc_free_order_next_method);
 
     using_free_order = false;
   }
@@ -44,7 +43,7 @@ function free_order_check_total(total) {
     $("input:radio[value=free_order]").removeAttr('disabled').attr('checked', 'checked').parent().show(0);
 
     // Refresh the payment details section.
-    get_payment_details(Drupal.settings.ucURL.checkoutPaymentDetails + 'free_order');
+    get_payment_details(Drupal.settings.basePath + 'cart/checkout/payment_details/' + 'free_order');
 
     using_free_order = true;
   }
Index: uc_free_order.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_free_order/uc_free_order.module,v
retrieving revision 1.1.4.4
diff -u -p -r1.1.4.4 uc_free_order.module
--- uc_free_order.module	24 Jul 2009 22:42:29 -0000	1.1.4.4
+++ uc_free_order.module	11 Jan 2010 17:22:45 -0000
@@ -6,6 +6,42 @@
  * Adds a payment method to handle free orders.
  */
 
+/** 
+ * Implementation of hook_menu().
+ */
+function uc_free_order_menu() {
+  $items['admin/store/settings/free_order'] = array(
+    'title' => 'Free order messaging',
+    'description' => 'Configure the free order messaging',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('uc_free_order_settings_form'),
+    'access arguments' => array('administer store'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+
+  return $items;
+}
+
+/**
+ * Provides messaging settings for free payment options.
+ */
+function uc_free_order_settings_form($form_state) {
+  $form['uc_free_order_name'] = array(
+    '#type' => 'textfield',
+    '#default_value' => variable_get('uc_free_order_name', 'Free order'),
+    '#title' => t('Name'),
+    '#description' => t('The name used for the payment method radio button.'),    
+  );
+
+  $form['uc_free_order_details'] = array(
+    '#type' => 'textfield',
+    '#default_value' => variable_get('uc_free_order_details', 'Continue with checkout to complete your free order.'),
+    '#title' => t('Details'),
+    '#description' => t('The detailed description of the payment method.'),    
+  );
+  
+  return system_settings_form($form);
+}
 
 /**
  * Implementation of hook_perm().
@@ -47,7 +83,7 @@ function uc_free_order_payment_method() 
   $methods[] = array(
     'id' => 'free_order',
     'name' => t('Free order'),
-    'title' => t('Free order - payment not necessary.'),
+    'title' => t(variable_get('uc_free_order_name', 'Free order - payment not necessary')),
     'desc' => t('Allow customers with $0 order totals to checkout without paying.'),
     'callback' => 'uc_payment_method_free_order',
     'checkout' => TRUE,
@@ -61,7 +97,7 @@ function uc_free_order_payment_method() 
 // Handles the free order payment method.
 function uc_payment_method_free_order($op, &$arg1, $silent = FALSE) {
   if ($op == 'cart-details') {
-    return t('Continue with checkout to complete your free order.');
+    return t(variable_get('uc_free_order_details', 'Continue with checkout to complete your free order.'));
   }
 }
 
