? .svn
? uc_attribute_per_role.patch
? translations/.svn
Index: uc_attribute.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ubercart/uc_attribute/uc_attribute.module,v
retrieving revision 1.12.2.38
diff -u -p -r1.12.2.38 uc_attribute.module
--- uc_attribute.module	27 Jan 2010 22:23:31 -0000	1.12.2.38
+++ uc_attribute.module	6 Jan 2011 17:35:17 -0000
@@ -719,7 +719,16 @@ function _uc_attribute_alter_form($produ
     $context['subject']['attribute'] = $attribute;
     // Build the attribute's options array.
     $options = array();
+    // Get role prices for attribute options
+    if (module_exists('uc_price_per_role')) {
+      $role_prices = uc_price_per_role_load_option_prices($nid);
+    }
+
     foreach ($attribute->options as $option) {
+      // Use role price instead of default price
+      if (module_exists('uc_price_per_role')) {
+        $option->price = uc_price_per_role_find_price($role_prices[$option->oid]);
+      }
       $context['subject']['option'] = $option;
       switch (variable_get('uc_attribute_option_price_format', 'adjustment')) {
         case 'total':
