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

Comments

leovarg’s picture

same here ! , :(

terrysco’s picture

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.

glennnz’s picture

Nope, no joy.

Thanks.

Glenn

betz’s picture

same here

sabyrodrigues’s picture

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

betz’s picture

Status: Active » Fixed

Solved now @ #595890.

Bilmar’s picture

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.

betz’s picture

jtsnow’s picture

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.

jtsnow’s picture

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.

betz’s picture

@jtsnow: commited, thanks

dvid-2’s picture

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 ;)

betz’s picture

Status: Fixed » Closed (fixed)

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