Anonymous orders - create account before placing order?

Posts: 67
Joined: 05/05/2008
Bug Finder

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?

Posts: 2086
Joined: 08/07/2007
AdministratoreLiTe!

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.

Posts: 67
Joined: 05/05/2008
Bug Finder

Thanks for the reply, Lyle!

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

Posts: 23
Joined: 05/25/2008

What did you do? I have the same problem.

Thanks

--

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

Posts: 6
Joined: 05/29/2008

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.