Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer Discount Not quite right....


Guest

Recommended Posts

Posted

Hi

I just installed the Customer_Discount_V1.1, and it seems to be working great..

Until you add a 100% discount on something with a value of $9.95

This is what happens on checkout confirmation..

------------------------

 

Sub-Total: $9.95

Customer Discount: $10.00

Total: $-0.05

-----------------------

 

I have no clue why it is doing this..

Decimal places is set to 2

 

Can't think what else to check

 

Any suggestions?

 

Thanks much

Tracy

Posted

Hmmm... Maybe this is a more difficult problem than first anticipated judging by the lack of interest...

 

 

I'm still crossing my fingers

 

 

Thank you

 

Tracy

Posted

Perhaps emailing the actual author of the contribution or posting it in the correct forum (Contributions) would make sense? :wink:

Posted

There is a "rounding" function built into the order total or discount...it's rounding up to the $10.00....

  • 1 month later...
Posted

Try making the discount 99.99999% - I think you'll find this works.

  • 1 month later...
Posted

Nope...doesn't work.

 

It is still rounding either UP or DOWN.

 

First I set the discount at 100% and it said the amount due was $.04

The I set the amount to 99.99999% (as suggested) and the new amount due is $.05

 

Total is $18.94 but the discount shows as $18.90 so in this case it rounded down.

 

:cry:

 

-priest-

Posted

Ok, I got it to WORK!! (for me. And maybe this will solve everyone elses problem too.

 

Around line 52 find this:

$od_amount = (round($amount*10)/10)*($query_result['customer_discount']/100);

 

And change it to this:

$od_amount = ($amount*10)/10*($query_result['customer_discount']/100);

 

It works perfectly fine for me now, as the problem was it rounding up or down. Now it doesn't round, it just cuts it down by whatever percentage you've chosen.

 

Good luck. And watch closely what order your Order Total modules are in.

 

~Priest~

Posted

New problem...

 

When you give a 100% discount, and the total is $0.00 it DOES NOT redirect to skip past the payment module.

 

Now, I have checked this using my GV and Discount module and all others with $0.00 work fine.... so it is something with this Discount By Customer module.

 

Will let you know what I find... unless someone else finds it first (PLEASE!).

 

-p-

Posted

I haven't been able to find it yet why it's not skipping past Payment Checkout when the total is $0.00. I do know that it must be in this code as both my Discount Coupons and Gift Vouchers work fine.

 

As long as you change the code above as I posted, you can use this script fine for anything except a 100% Discount. :(

 

I hope someone can offer a fix for this.

 

~Priest~

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...