Points not being added on purchase

glennnz - July 9, 2009 - 10:57
Project:Ubercart Userpoints
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi

Fantastic module!

Currently points are not being added when a product i purchased. Buying with and discounting with points works great, but users are not earning any.

Thanks

Glenn

#1

leovarg - July 18, 2009 - 01:58

same here ! , :(

#2

terrysco - August 4, 2009 - 09:58

1.function uc_userpoints_product_feature_form()
$form['nid'] = array(
'#type' => 'value',
'#value' => $nid, // not $node->nid
);

2. function uc_userpoints_product_feature_form_submit()
select pfid from {uc_product_features} where nid = %d and fid = %d",$data['nid'],$data['fid']
// table name is not 'uc_userpoints_products'

try it again.

#3

glennnz - August 7, 2009 - 09:23

Nope, no joy.

Thanks.

Glenn

#4

betz - September 8, 2009 - 15:31

same here

#5

sabyrodrigues - October 1, 2009 - 11:12

same here .... I am looking out to sell points to users ..... like 1 Product ... $1 .... 1Point ... In Product features :: On product purchase give 1 point ..... Tested the same by checking out ..... no points added

#6

betz - October 20, 2009 - 08:58
Status:active» fixed

Solved now @ #595890.

#7

trupal218 - October 26, 2009 - 19:02

Getting this error message when saving edit at product => features => operations , put points to 3 and set category as above commit link.
I have run cron.php / update.php / flushed cache but no fix. Also tested on fresh install of Drupal and same error.

Anyone else experiencing this issue?

user warning: Unknown column 'tid' in 'field list' query: UPDATE uc_userpoints_products SET points = 3, tid= 0 WHERE nid = 16 AND pfid = 1 in /home/example/public_html/drupal/sites/all/modules/userpoints_ubercart/uc_userpoints_product.module on line 137.

#8

betz - October 26, 2009 - 21:36

#9

jtsnow - October 30, 2009 - 13:41
Status:fixed» active

For me, points are still not being added upon purchase of a product. I'm using the latest dev version and have done a complete re-install of the module. No luck. Using Ubercart 6.x-2.0 and Userpoints 6.x-1.1.

#10

jtsnow - October 30, 2009 - 14:54
Status:active» fixed

Nevermind, I got this to work. But, after looking at the code, there are several problems. The most obvious is the improper usage of the t() function.

For example, this line:
'description' => t('A user purchased \''. l($product->title, drupal_get_path_alias('node/' . $product->nid)) .'\' containing ' .$productPoints.' '. variable_get(USERPOINTS_TRANS_LCPOINTS, 'points')),

should be:

'description' => t('A user purchased !product containing !amount !points.', array('!product' => l($product->title, 'node/' . $product->nid), '!amount' => $productPoints, '!points' => userpoints_translation())),

Note that you don't have to call drupal_get_path_alias(). The alias will be used automatically. Also, tabs should not be used. Use 2 spaces instead. Anyway, these are separate issues.

#11

betz - October 30, 2009 - 21:50

@jtsnow: commited, thanks

#12

dvid - November 4, 2009 - 21:06

The problem i now have, is the problem that i can say that a product is worth 10 points .
but if i look back after saving the points are 0 again. in the DB the SQL table stays empty.
What is the problem with this ;)

#13

betz - November 6, 2009 - 06:59

#14

System Message - November 20, 2009 - 07:00
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.