Developer forum

Forum » Ecommerce - Standard features » Get Users as stock locations

Get Users as stock locations

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Ai am trying to implement a list of Stores and display the available stock in each location.

For this purpose, I have defined a few Stock locations and a specific type of User to use for stores. Each store is connected to a Stock location through the StockLocation property on the user.

Now, I am trying to list all the Store users in a modal window. Is there any method in the API for getting a list of specific User types?

I am using DW 9.9.5 (to be upgraded soon) and an early Rapido version.

Thank you,
Adrian


Replies

 
Nicolai Pedersen
Reply

You know that it is a built in feature in 9.10+?

You can create stock categories, and on stock locations you can choose a store location using a user object:

When you create a shipping you can choose the Click & Collect provider and choose a stock location category:

The user API is not very beautiful, but you can see all the options here:

https://doc.dynamicweb.com/api/html/663534db-968b-9176-afa9-afa529e4f45c.htm

There is no built in method to get users of a specific type. So maybe by SQL?

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I knew I was missing something :)

I was pretty sure I have seen this in a presentation but never used it.

Unfortunately, we are still on the 9.9.x branch and for various reasons, we cannot upgrade just yet.

Can I find a solution to my use case in the meantime?

Thank you,

Adrian

 
Nicolai Pedersen
Reply

User.Get users by SQL where item type = your type kind of solution...

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I will use that for now. Thank you.

Adrian

 

You must be logged in to post in the forum