5 replies [Last post]
kerunt's picture
Offline
Bug Finder
Joined: 05/05/2008
Juice: 158
Was this information Helpful?

Heya,

I've got anonymous users purchasing subscriptions on my Drupal 5.7 & Ubercart RC4 site. The problem is that the order/subscription gets called before the user account gets created, which results in a uid of 0 all over the place. Is there a way for me to correct this?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Anonymous orders - create account before placing order?

Sure is: http://www.ubercart.org/faq/4787. The default workflow-ng configurations were not optimized for anonymous purchases of files or downloads. The 1.0 version does better.

kerunt's picture
Offline
Bug Finder
Joined: 05/05/2008
Juice: 158
Re: Re: Anonymous orders - create account before placing order?

Thanks for the reply, Lyle!

I played around with my existing workflow-ng configs and got it working Smiling.

k5nwa's picture
Offline
Joined: 05/25/2008
Juice: 49
Creating accounts

What did you do? I have the same problem.

Thanks

Cecil
k5nwa
Blessed are the cracked, for they shall let the light in.

marco's picture
Offline
Joined: 05/29/2008
Juice: 16
Re: Anonymous orders - create account before placing order?

I had the same problem(s), subscriptions created with uid = 0, and also role not assigned because the user was considered anonymous. I fixed the role problem cloning the 'Update order status on completed checkout' workflow configuration, and removing the condition 'check if an order can be shipped' (I use Ubercart 1.3, upgraded from 1.0)

That doesn't fix subscriptions with uid = 0, so I wrote with this query

update uc_subscriptions set uid = (
select uid
from uc_orders join uc_order_products using (order_id)
where uc_order_products.order_product_id = uc_subscriptions.order_product_id)

which is a dirty but working solution as each subscription is tied to an order which actually has the proper user id.

frost's picture
Offline
Joined: 07/23/2008
Juice: 134
what's the latest?

I just had our first anonymous purchase of a role-based product. This product is shippable as well (because the purchaser is put onto mailing lists, sent membership info etc), so the order didn't get to Complete status, and the user account was created but didn't get the role.

What would I do to ensure they get their role automatically but not move the order to complete?