Developer forum

Forum » CMS - Standard features » Company and Users

Company and Users

Nuno Aguiar
Reply

Hi,

 

We have an issue with 2 projects we are working on:

  • Have a company as a "user"
  • Have employees as "sub-users"
  • Employees place orders in the name of the company
  • Employees see all company orders (in the order history)

 

We start to see this more and more with integrations. What would be the best way to do this?

 

Here's the current limitation and conclusions we got:

  • We can't use impersonation, because we need that to work as it is
  • Company and User share the same Customer Number and we would create a checkbox to set the "Company" user and/or set them to a specific group (Companies)
  • We would have to develop a Cart Notification and update the AccessUserID in the Order (assign to the Company's AccessUserID)
  • We would have to develop/change the order history to pull company's order history instead of their own

 

Best Regards,

Nuno Aguiar


Replies

 
Nuno Aguiar
Reply

Hi guys,

 

Since a few people are on vacation, maybe this fell through the cracks. Let's see if I peek anybody's interest :)

 
Nicolai Høeg Pedersen
Reply

Hi Nuno

We do not support this behavior currently. But when a user has a customer number, that customer number is added to the orders table ([OrderCustomerNumber] field) - so if 2 different users share the same customer number, the order will be stamped withe the same customer number but different user ids.

You would like an option to display orders in the customer center based on the customer number and not the userid?

BR Nicolai

 
Nuno Aguiar
Reply

Hi NIcolai,

 

Yes very much, that would do the trick. How easily can it be done?

 

Best Regards,

Nuno Aguiar

 
Nicolai Høeg Pedersen
Reply

I've added to the whish list for 8.8 - TFS#17946.

 
Nuno Aguiar
Reply

Ok, thanks.

 

In the meanwhile, what would be my options to get this to work? Is there a Method we can use or should we just build our own SQL query?

 

Best Regards,

Nuno Aguiar

 
Nicolai Høeg Pedersen
Reply

select * from ecomorders where ordercustomernumber = '<CustomerNumberFromSession>'

 
Nuno Aguiar
Reply

Hi Nicolai,

 

Thanks, SQL it is :)

 
Kristian Kirkholt
Reply

Hi Nuno

The feature Use customer number to list orders and not userid has now been implemented in Dynamicweb version 8.8.0.0

You are able to find this build in the download section:

http://developer.dynamicweb-cms.com/downloads/dynamicweb-8.aspx

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 
Nuno Aguiar
Reply

Hi Kristian,

 

Thank you for the note. We'll upgrade and test it.

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum