I'm trying to create a Drupal/Ubercart website where users can pay for goods using Userpoints (as per Ubercart Store Credit: Accepting Payment with User Points).
For some reason the first checkout screen shows a much higher Userpoints budget requirement than is actually required.
I just ran a sample order and here's what it showed:
$469.66 - Order total
1723 - budget required (incorrect total, should be 470)
8068 - budget available (correct)
However, when you click "review order" to go to the next screen it shows the correct budget required, and then when I process the order the correct number of userpoints are subtracted from the user's total budget available.
This might be able to be circumvented by using CSS to hide the field that shows the incorrect total "1723" on the first checkout screen, however if the (incorrect) "budget required" is more than the budget available, the system makes the user enter his or her credit card info, which really confuses the user.
I think the error may have something to do with the UPS shipping quote. But that's just a guess.
Modules being used:
ubercart
uc_ajax_cart
uc_coupon
uc_option_image
uc_out_of_stock
uc_store_credit
userpoints
Comments
Comment #1
timhobert commentedHey, I figured out a solution to this issue:
This solution applies to the UC Store Credit module version 6.x-1.x-dev (released 2009-May-28 )
On line 33 of uc_store_credit.js there is the following line:
var new_total = uc_store_credit_cart_total + line_item_total * uc_store_credit_line_item_rate;Change that line to:
var new_total = Math.round(uc_store_credit_cart_total + line_item_total * uc_store_credit_line_item_rate);And on line 43 of uc_store_credit.module there is the following line:
drupal_add_js('uc_store_credit_line_item_rate = '. variable_get('uc_store_credit_conversion_rate', 100) .';', 'inline');Change that line to:
drupal_add_js('uc_store_credit_line_item_rate = '. variable_get('uc_store_credit_conversion_rate', 1) .';', 'inline');And it should work!
Tim