I am working on SXC 9.2
and writing custom plugin
. I need to pick Category information so I have written the below code to get the category information.
public class CustomCategoryCommand : CommerceCommand
{
private GetCategoryCommand _getCategoryCommand;
public async Task<Category> Process(CommerceContext commerceContext, string categoryID)
{
//Category category = null;
Category category = await this._getCategoryCommand.Process(commerceContext, categoryID);
return category;
}
public CustomCategoryCommand(
GetCategoryCommand getCategoryCommand
)
{
this._getCategoryCommand = getCategoryCommand;
}
}
It is always returning null. While debugging I could not find any exception. It is simply returning null.
Parameter- CategoryId: Entity-Category-Habitat_Master-Departments (Existing habitat categoryId)
Please, can somebody indicate what mistake am I doing here !!!!
Thanks.
Environment: HabitatAuthoring