Create Orders - Roles

Posts: 60
Joined: 09/04/2007

Hi.
I want to configure the access control in order to allow someone to create an order from scratch.

I first created the role 'Affiliate' and then I gave a person an account. So this new user has the permissions I defined under 'Affiliate'. The most important thing, is that this user should be allowed just to create new orders -not to edit or delete other orders placed by any customer. That's why I checked 'create orders' and unchecked 'edit orders' under 'uc_order module' (admin/user/access).
Anyway, unless I check 'edit orders', this user given the 'Affiliate' role won't be able to create any new order. Maybe it sounds confusing, but I don't mean placing an order like any anonymous or authenticated user would do, but to create an order like an admin would be able to (only that this 'Affiliate' user has less permissions).

I hope someone can figure out how to proceed.

Thanks in advance.

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Hmm... yeah, once an order is created it goes into edit mode, so the titles are somewhat misleading. Problem is orders don't have ownership, so I don't have any good way of making sure people only edit orders they've created. Not saying it couldn't be done, but I'm interested in getting some ideas.

Posts: 4
Joined: 08/28/2008

I'm looking for similar functionality I think. Need Anonymous users to be able to create an order from scratch with shipping/billing info and multiple items (add another line)with predefined fields. Authenticated users should have their info fields prepopulated. The Create Order functionality seems to be all there. The "create orders" permission in Access Control led me to think this was possible. Seems like its not. Anyone have any idea if this can realistically be achieved in a reasonable time/$ frame? Is there something that I'm missing that makes this impossible or undesirable?

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

It sounds like you'd then be duplicating the whole checkout process... why can't you just use that?

Posts: 4
Joined: 08/28/2008

What I'm looking for is that anonymous and registered users can create their own orders but NOT to have access to other peoples orders. When I give those roles the "create order" permission without the "edit order" permission, the "create order" option in the user's navigation menu doesn't show up. In my scenario an admin role would be responsible for administering and confirming orders. So everything is there already, just there are too many admin-type permissions given to users because the 'create order' permission is tied to the ability to edit and manage other peoples orders. I guess the stumbling block is the linking the uid to the order. Although, the system would still work for my needs even if the order wasn't associated with a particular user, since all I need is their ship-to, billing and contact info, which will be confirmed after the order is created. If you would like to take this further I'd be happy to help you with mapping out the process and requirements and testing. Unfortunately my Drupal dev skills (or lack thereof) won't allow much more than that.

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Aye, what you're looking for is beyond the scope of core Ubercart. It might be possible through the uc_marketplace contribution, but I haven't tested that myself.

Posts: 4
Joined: 08/28/2008

Ok, I'll check that out and if I have any success with it will post back here. Will be using Ubercart either way. Thanks for a great module!