Closed (fixed)
Project:
Ubercart
Version:
6.x-2.7
Component:
Roles
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2011 at 04:57 UTC
Updated:
4 Jan 2012 at 00:50 UTC
Jump to comment: Most recent
The uc_roles module claims that it could be used to grant a role for a particular product purchase. I couldn't find any way to do it - among available actions in Conditional Actions (Ubercart 2.x) there is no action "assign role". In "product features" I selected a number of roles that I want to associate with products, but it doesn't get me anywhere if there is no available actions.
Has anyone done this - assigning (granting) role automatically on a product purchase?
Please help.
Thanks,
Vladimir
Comments
Comment #1
tr commentedRoles are granted directly by uc_roles, not through CA.
Comment #2
longwavehttp://www.ubercart.org/docs/user/10967/selling_site_access_role_assignm... explains how to configure this.
Comment #4
Anonymous (not verified) commentedI changed this to 2.7, because this problem still seems to be present.
When I add a role as a product feature, I get this message:
As calmforce noted above, there doesn't seem to be any conditional action to set a role.
If you view the tutorial in #2, it seems the answer is in the new "Role expiration" settings at: admin/store/settings/products/edit/features. But, in 2.7, the current version of uc_roles, there is no "Order status" box.
So, there's no box to set the order status that will trigger the role, and no CA action to set a role.
What version of uc_roles had the order status box picture in the #2 link, and why was it removed? Why is there no "add a role to a user" action?
All I saw was "renew a role."
So far, I cannot get a role to be assigned as a product purchase. I've tried both anonymous and authenticated users. I don't get any error message. They purchase the product, and yet the role is not assigned to them.
Comment #5
tr commentedIn the list at Grant or renew purchased roles, the CA is called "Grant or renew purchased roles"
Follow the link to configure the CA, or you set the status directly at admin/store/ca/uc_role_renewal/edit/conditions
Comment #6
Anonymous (not verified) commentedThanks for the quick response!
I see what my confusion was. I was adding a custom predicate, and looking at the list of "available actions." That list only includes "Renew the roles on an order."
Now I see what I missed at admin/store/ca: "Grant or renew purchased roles" near the bottom of the list.
Although, when I look at the "Actions" for that predicate, I still only see "Renew the roles on an order" -- nothing about granting them for the first time, but hopefully it still just works.
I will have to look elsewhere for why my roles aren't being granted. I'm not even sure what to post to help debug this. I have a fairly vanilla setup.
I'll look around.
Comment #7
longwaveGrants and renewals are handled in the same operation, the action is correct, but perhaps we should rename it to make this clearer.
(also, please read http://drupal.org/node/45111 to learn how to set the "priority" field in issues)
Comment #8
longwave#1370464: Role Expiration Date Causing Role Assignment Error may be relevant here.