Get vendor id of logged in vendor in plugin controller

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
I am new to nop commerce, How can I get vendorId of the current vendor in my custom plugin controller.
7 years ago
You can use the following code.

EngineContext.Current.Resolve<IWorkContext>().CurrentVendor;

The only condition is that, logged in user should be Customer with vendor role (Vendor Manager). Otherwise the CurrentVendor will be null.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.