display cost in points

agilpwc - January 10, 2008 - 23:23
Project:Ubercart Userpoints
Version:5.x-1.5
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I'm using a 5 to 1 point ratio and I think it would be great for customers if on the checkout screens it told them how many points they will use if they pay with points.

Same with the view order pages and emails. Right now it only tells them it cost x dollars and they payment method was with points. But it doesn't tell them how many points they used.

#1

storbaek - February 17, 2008 - 15:17

+1 to see how much points is would cost!

#2

bmagistro - May 22, 2008 - 20:14
Status:active» needs work

I am not on my computer with patch tools but I have updated the cvs copy with this code. It should be placed at the end of the .module file. It will show price in points on a product page where the sell price shows up, but does not affect the display price. In other words if you are not viewing the product directly it will not show the price in points at this time.

function userpoints_ubercart_nodeapi(&$node, $op, $arg3, $arg4) {
  if ($node->type=='product') {
$pointExchange = (int)variable_get(USERPOINTS_UC_SPEND, 1);
$pointCost = (int)(round($node->sell_price) * $pointExchange);
$node->content['sell_price']['#value']    .= 'Points Cost: ' . $pointCost;
  }
}

#3

bmagistro - June 15, 2008 - 00:37
Status:needs work» fixed

Marking as fixed as there is support for this (in the dev version). It is configurable via the userpoints settings. At present it only works on the product page I am waiting for some input from the ubercart developers on how to do the catalog pages. I should have the catalog pages supported in the next week or so....

#4

Anonymous (not verified) - June 29, 2008 - 00:43
Status:fixed» closed

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

#5

SocialNicheGuru - August 6, 2009 - 22:53

does this work in D6?

 
 

Drupal is a registered trademark of Dries Buytaert.