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.

CommentFileSizeAuthor
#6 troub002.jpg19.17 KBck9
#6 troub003.jpg4.73 KBck9
#5 troub001.jpg14.85 KBck9
uc_userpoints_product-logic.patch5.1 KBckng

Comments

jrust’s picture

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

ck9’s picture

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

ck9’s picture

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.

ckng’s picture

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."

ck9’s picture

StatusFileSize
new14.85 KB

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

ck9’s picture

StatusFileSize
new4.73 KB
new19.17 KB

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.

ckng’s picture

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.

ck9’s picture

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.

ckng’s picture

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

ck9’s picture

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.

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

morxe’s picture

Priority: Normal » Critical

Same problem,any points will be added...

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

ckng’s picture

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

and the module seems to be abandoned again?

betz’s picture

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.

Anonymous’s picture

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

rfay’s picture

Status: Needs review » Closed (duplicate)