category per product in 'userpoints product' module
betz - October 4, 2009 - 23:07
| Project: | Ubercart Userpoints |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Hey!
I wanted to ask a feature that will be very useful for many people.
In the 'userpoints product' module you can choose to which category the bought userpoints has to be assigned.
Wouldn't it be nice that this setting is the standard category, and you can override the category on a per product basis?
If i have time, i will have a look at this, but it would be kind if someone starts out or give's me some handy information ro get me going.
Kind regards,
Tom

#1
ok, build it and its working.
Going to sleep now, i'll post the patch tomorrow.
#2
Here you go.
There were a few bugs that i solved in the same time.
Let me know what you think...
PS: HAVE A LOOK @ THE PATCH AT COMMENT #4, THIS ONE ISN'T WORKING.
#3
Sorry, had a few more problems.
Now it's working like a charm ;)
#4
forgot to upload the patch :s
Man, wake up!! :)
#5
following
#6
Not good... problem with the apply !!!
#7
@morxe: what did you try?
What is the problem? Can you give some more info please?
#8
@morxe: Did you try with patch at comment #2?
This patch is not working, i know, but try patch
I know the first patch wasn't working, but normally this one does.
#9
Marked #489624: uc_userpoints_product errors as a duplicate of this one, as this patch seems to resolve all.
I used this patch and it resolved all the issues I was having with ubercart_product. I think we should still add a README.txt to this module explaining how to set it.
Thanks for the good work on this, betz.
Let's see if we can get to an official release for 6.x.
#10
commited
#11
Getting this error message when saving edit at product => features => operations , put points to 3 and set category as above commit.
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.
#12
This is weird, when you look at the patch you see that it adds the tid field in uc_userpoints_product.install.
Anyway, this patch has been commited, so please download the dev version from the project page and be sure to uninstall your module, not just disabling it. This way it will do the installation again, and the tid field will be there.
Just checked again, and the tid field is there...
#13
I did as you recommended and disabled/removed/re-installed the module and not getting the error message anymore. Nice!
However, at product => features => operations : I see that the product has 3 points attached to it, but when I click 'Edit' it is set to 0.
Is this by design? Should it be automatically set to 0 everytime I hit the edit link for the product feature?
Thanks!
#14
Just try to set the userpoints again. and see if it stays.
#15
Automatically closed -- issue fixed for 2 weeks with no activity.