What I wanted to do was give my users the ability to pay with points and with Paypal combined.
So I installed the discount module.

Problem: At checkout I'm getting "You cannot discount an order for more than the order total."

****

My settings in admin/points settings/ubercart discount options are as follows:
Points used in discount (for every CAD): 1
Enter the maximum percentage of the order total that can be discounted using points. Please do not include a % sign: 100
Enable points as a discount method: yes
-- guess the rest doesn't matter.

****

At checkout, I have a $12 item and 21 points balance.
In the Points Discounts section of the checkout window I can see this:

Enter the amount to discount this order with points by. This field will be ignored if paying with points.
Discountable total from this order: $12.00
Maximum you can discount the order by: $12.00
Your points available to use: $21.00

I enter 12 or 12.00 in the field and I get the message: You cannot discount an order for more than the order total.

I'm not a big math head but I do know that 12 is smaller than 21. :((
Did I forget to set up something?
Help!

Comments

juankvillegas’s picture

Same thing here ;)

hershel’s picture

I would guess that this is a duplicate of this issue: http://drupal.org/node/732224

juankvillegas’s picture

No it's different, but I already found a solution.

I'll search the code and post it here.

bmagistro’s picture

Component: Miscellaneous » Discount
Status: Active » Fixed

This should be fixed in the latest dev release.

piebuo’s picture

i still have the problem after the dev release, how can i fix it?

bmagistro’s picture

How long ago did you pull the dev version? The patches/changes were commited about two days ago. One possible way to check is to see if you .module files match (can use a checksum or diff on the file you have the current one).

piebuo’s picture

i downloaded it yesterday in the afternoon

piebuo’s picture

the beta is more recent than the dev, i have to download it, or the dev?

bmagistro’s picture

The beta shows as newer due to when the tag was created on the dev and when I clicked something on the web I forgot about. The code in the two should be identical. I'll need more info if this still exists.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

spyderpie’s picture

Status: Closed (fixed) » Active

Hello,

I am sorry if re-opening was not appropriate - I did not want to duplicate this issue ... I have the same error with both the dev and beta versions currently posted.

I add a product to the cart that costs $3.00, below it states:

Discountable total from this order: $3.00
Maximum you can discount the order by: $3.00
Your point dollars available to use: $3.00

When I enter 3.00 in the Discount Amount field, and press 'Review Order' I get the following error:

"You cannot discount an order for more than the order total."

I have allowed 100 % discount- without the percent sign) -- I am not sure how to allow a user to use points to discount their entire order otherwise. If I missed a fix, I apologize.

Julie

____
Also, other note - the other problem is that you have to select a payment method. I use both uc coupon and the uc free order module. If the points portion of checkout were on the page before (Same place you can enter a coupon code initially) then the payment option could then integrate with the free order module and having a zero total would not be an issue... just a thought.

Peace, Julie

athanor’s picture

Component: Discount » Code
Issue summary: View changes

if anyone still needs to fix this then change line 231 in uc_userpoints_discount.module to:

<?php
if ((!empty($ptamt) || $ptamt != '') && $ptamt <= $orderamt && $ptdisc <= min($curUserPoints, $ptmaxdPoints)) {
?>

and line 237 to:

<?php
elseif ($ptdisc < $orderamt && (!empty($ptamt) || $ptamt != '')) {
?>