Developer forum

Forum » Ecommerce - Standard features » Assortments for Current User

Assortments for Current User

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

Is there any way to list the assortments that apply for the current user?

I have a situation where a user is seeing thing is not supposed to and I suspect an incorrect assortment allocation.

I don't have an easy access to database (Firehose) and that's why I would rather list the Assortment ID's in the template somewhere so  can debug.

Thanks,

Adrian

 


Replies

 
Nicolai Pedersen
Reply

If you have a new enough DW, you can write out the macro used for indexed searches using a Razor template. Dynamicweb.UserManagement.Context.AssortmentIDs is an array you can iterate.

Hope this can help you.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,lease define new enough".

My solution is 8.8.0.1.

If it's not "new enough", what options do I have?

Can I list the assortment from the ProductGroups loop? Or from the ProductList?

Thanks,

Adrian

 
Nicolai Pedersen
Reply

Hi Adrian.

The Macro is 8.9 something.

But try Dynamicweb.eCommerce.Assortments.AssortmentPermission.GetAssortmentIDsForCurrentUser() - will give you a list of assortments a user is member of.

BR Nicolai

 

You must be logged in to post in the forum