uc_userpoints_product errors

ckng - June 12, 2009 - 09:11
Project:Ubercart Userpoints
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:duplicate
Description

Getting few errors

Unknown column "fid" in "where clause" query: select pfid from uc_userpoints_products where nid = 113 and fid = 0 in /var/www/drupal/sites/all/modules/userpoints_ubercart/uc_userpoints_product.module on line 107.

Upon checking the code and DB, the code is wrong and all fields are not properly captured, except the point. Delete also failed as the pfid is not captured.

Attached is the patch
- data are captured and deleted properly
- corrected all t() and added to those string missing t()

Has yet to test the order part, as my payment not up yet.

AttachmentSize
uc_userpoints_product-logic.patch5.1 KB

#1

jrust - June 15, 2009 - 21:00

Thanks for the patch. Userpoint Products weren't being assigned upon purchase before the patch and now it works great.

#2

ck9 - June 20, 2009 - 09:04

Thanks, stopped me receiving the same error you described. Good to see the module is being actively developed as it's important for my site =)

#3

ck9 - June 20, 2009 - 10:24

One issue I just noticed, though I'm not sure if it was already there. After going to a product->edit->features and adding Credit value to it, it doesn't show those credits anywhere, and checking out with that product doesn't give the purchaser the credits.

Also, the 'Award' option similarly does not award points for purchases. Basically seems that the module can't increase the user's points, only decrease them.

#4

ckng - June 20, 2009 - 13:01

ck9, once you add the feature to a product, it should be shown under the product feature, the same place you add it.
And having a message e.g. "Product is worth 10 points."

#5

ck9 - June 20, 2009 - 18:01

ckng, If I create a product and give it a price of, say, $50, then it shows the product is worth $50 credits automatically.

AttachmentSize
troub001.jpg 14.85 KB

#6

ck9 - June 20, 2009 - 18:07

I then add 100 Credits to the product, so if a user buys the product they are awarded 100 credits (troub002.jpg).

When I view the product again, it has no credits attached (troub003.jpg). When I try to purchase it, it correctly says "credits can not be purchased with credits, therefore that option has been disabled"; however, it doesn't award any credits on checkout.

AttachmentSize
troub002.jpg 19.17 KB
troub003.jpg 4.73 KB

#7

ckng - June 21, 2009 - 05:32

You are confusing the uc_userpoints_product with uc_userpoints_payment.

uc_userpoints_product is for user to 'buy points'. Take your example, after adding the feature, when user purchase the item with $50 and user will be awarded with 100 points.

"credits can not be purchased with credits", is a feature provided by uc_userpoints_payment, where you can buy or pay for a product using points.

#8

ck9 - June 21, 2009 - 06:48

Ok so if uc_userpoints_product allows a user to buy points, how do I get it working? I added the points to the product as a feature as described.

#9

ckng - June 21, 2009 - 06:57

As I mentioned previously, just add the feature to your product, like what you have done in troub002.jpg. That's all.

#10

ck9 - June 21, 2009 - 11:49

Here is what I did. 1. Add credits to a product (e.g. 100) as a feature, as described above. 2. Purchase the product. At the end of checkout I gain 0 credits.

#11

sabyrodrigues - October 1, 2009 - 13:22

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 to the purchaser

#12

morxe - October 9, 2009 - 04:35
Priority:normal» critical

Same problem,any points will be added...

i have already installed the patch and i have the same problem.. !!!

#13

ckng - October 9, 2009 - 05:16

For #10-12, can't reproduce the problem..
Anyone has success with the patch?

and the module seems to be abandoned again?

#14

betz - October 9, 2009 - 12:21

Please try following patch, it was originally for adding the feature of points categorization per product, but i also stumbled on those bugs mentioned here and the patch also handles this.

Please have a go, and put your comments, so i can commit them.

#15

bara.munchies - October 10, 2009 - 14:16

subscribe (drupal.org needs a bookmark flag system :)

#16

rfay - October 13, 2009 - 01:34
Status:needs review» duplicate

Marking as a duplicate of #595890: category per product in 'userpoints product' module

 
 

Drupal is a registered trademark of Dries Buytaert.