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.
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
Comment #1
leovarg CreditAttribution: leovarg commentedsame here ! , :(
Comment #2
terrysco CreditAttribution: terrysco commented1.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.
Comment #3
glennnz CreditAttribution: glennnz commentedNope, no joy.
Thanks.
Glenn
Comment #4
betz CreditAttribution: betz commentedsame here
Comment #5
sabyrodrigues CreditAttribution: sabyrodrigues commentedsame 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
Comment #6
betz CreditAttribution: betz commentedSolved now @ #595890.
Comment #7
Bilmar CreditAttribution: Bilmar commentedGetting 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.
Comment #8
betz CreditAttribution: betz commentedSee my reply @ http://drupal.org/node/595890#comment-2193404
Comment #9
jtsnow CreditAttribution: jtsnow commentedFor 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.
Comment #10
jtsnow CreditAttribution: jtsnow commentedNevermind, 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.
Comment #11
betz CreditAttribution: betz commented@jtsnow: commited, thanks
Comment #12
dvid-2 CreditAttribution: dvid-2 commentedThe 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 ;)
Comment #13
betz CreditAttribution: betz commentedSee my reply @ http://drupal.org/node/595890#comment-2193404