Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
On the checkout page, I don't think that it is necessary to display the Points Discount form if the current user has no point.
So I've juste added a small test in the uc_checkout_pane_uc_userpoints_discount function to no return the form
function uc_checkout_pane_uc_userpoints_discount($op, &$arg1, $arg2) {
// get point discounts to apply to this order
global $user;
$curUserId = $user->uid;
switch ($op) {
case 'view':
$curUserPoints = intval(userpoints_get_current_points($uid = $curUserId, $tid = NULL));
if ($curUserPoints <= 0 ) {
return false;
}
$maxdisc = ($curUserPoints / intval(variable_get(USERPOINTS_UC_DISC, 1)));
...
Comments
Comment #1
YK85 CreditAttribution: YK85 commentedsubscribing