You will save a total of $0.00 using 0 points!

faction - July 28, 2008 - 21:10
Project:UC Userpoints Discount
Version:5.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

When visiting the cart page with product in the cart that is using points, the user is always greeted with the following message:

You will save a total of $0.00 using 0 points!

From looking through the code, the problem appears to be that you reset the $saved and $points variables at the beginning of every loop. It appears like the desired effect can be achieved by moving the $saved = 0; and $points = 0; to just above the foreach loop (line 170).

 
 

Drupal is a registered trademark of Dries Buytaert.