Developer forum

Forum » Development » Identify level of group in notification

Identify level of group in notification

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have to build some logic based on a notification when saving a ProductGroup.

I am using Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.AfterSave

The problem I have is that I need to do different things depending on the Level of the Group. If it's TopLevel (directly in the root of the shop) I need to trigger an action while if it's a secondary level, I need to trigger another action.

After a while of digging around the options, I could not find a way to separate the 2. Can anybody suggest a way to identify the level of the Group? or at least if it's a top level group or not?

Thank you,
Adrian


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Anybody?

My DW version is 9.10.13.

Thank you,
Adrian

 
Nicolai Pedersen
Reply

Have to look at grouprelations and groupshoprelations. The same group can be in different levels because it can belong several places in the tree...

 

You must be logged in to post in the forum