We can't get roles to assign when a product is purchased. It used to work a few UC versions ago. We stopped using UC for roles for a while, upgraded to 2.4 and now want to again have a custom role assigned when a particular product is purchased. But now nothing happens regarding role assignment -- we must do it manually.
Everything we can check indicates it should work. Only ONE role is involved. It exists in Drupal and does what it should if we manually give it to a user.
This role is assigned to the product (shown in Features section). But when we get an order for this product, everything works fine EXCEPT role assignment -- it simply does not happen. We use PayPal Pro, and payment flows, e-mail to customer goes out, etc.
We checked cron and it's running, according to Apache and Drupal logs.
To diagnose, we created a new product, from scratch to avoid any old baggage, gave it the role as a Feature, and did some test purchases of it. But the role doesn't get assigned to the user.
We waited many hours for UC to assign the role, get no errors but no action either.
As an experiment we created a new CA that looks for Order status = Complete OR Order status = Payment received. We used OR, not AND, to have two points in the order flow that would get the role assigned. But nothing happens.
We also left UC's default role "renewal" and all other default CA's in place, hoping at least one of them would do something about the role assignment, but it doesn't happen.
We created new orders to try and trigger the actions, but the test user's roles never change.
We don't know what else to check...
Side question, not the case with our test, but we wonder: UC seems to connect with user's Drupal record via user's e-mail address rather than Username -- is this accurate? If so, it is possible (fairly common) for user to change the e-mail address. When this happens, will it break UC in some way?
Comments
Comment #1
hawkdrupal commentedUpate: We can get role assigned by UC IF order is manually marked Completed. Other actions and status changes do NOT trigger role renewal.
It looks like one of our test CA's -- Order Status = Completed -- is triggering this. UC's built-in role renewal trigger never seems to fire?
Does updating/renewing a role requires multiple conditions at certain points in the process? Or, does it require checking Original order vs. Updated order? Or does it only happen at a certain point, no matter what?
Why doesn't UC's default trigger for this work? Are we misunderstanding?
Please note that UC's docs on order --> role assignment are skimpy, and there are many postings asking for details on how it works, without any solid response/explanation.
Comment #2
Dubber Dan commentedI'm getting something similar in that customers are never assigned the customer role by Ubercart, even when we manually change the status of their orders to completed.
What's going on as this seems to be a key feature that isn't working?
Comment #3
mattcasey commentedI'm having the problem too, using Recurring Subscriptions module and Paypal Pro. Manually changing the Order works for us. We're about to switch to Authorize.net, though
Comment #4
Dubber Dan commented@Matt - are you saying that when you manually change the order status, the customer role is being added by Ubercart?
@ anyone else - this seems to be a bit of an issdue for multiple people. Can anyone, will anyone look into this?
Comment #5
mattcasey commented@Dubber - yes, the only reason the role wasn't being added is because the status said "Pending" - set it to Complete, and the roles get assigned correctly. I'm new to these modules so it may have been a configuration mistake. We switched to Authorize.net, though so I won't be able to help test any further.
Comment #6
Dubber Dan commentedI had a feeling you were going to sday that. When I manually change the status nothing changes wth regards the roles
Comment #7
mattcasey commentedDubber, just two things to check:
1. make sure you have a conditional action set up that is Enabled. I am using recurring payments, but mine is under the trigger "Order status gets updated" and the action is "Renew roles on an order" according to the "Updated order"
2. make sure the product's feature for role assignment is set up with the correct SKU. I upgraded/moved a module once and this got reset somehow.
Comment #8
Dubber Dan commentedThanks for that, it was number 2 that needed correcting. I'd been going round the bend with this one!
Comment #9
end user commentedI believe on http//www.ubercart.org or maybe on here someone explained how they fixed this and it had to do with the SKU. Sorry don't have the link off hand.
Comment #10
tr commentedLooks like this has been solved then.