I am working with uCommerce and I want to remove one of the add buttons on an existing tab.
I followed this Removing a button section on this article
Everything is working fine but I dont know what is imageButtom inside the RemoveMenuButtion() method.
Here is the code I have -
public PipelineExecutionResult Execute(SectionGroup subject)
{
if (subject.GetViewName() != Constants.UI.Pages.Orders.Order)
return PipelineExecutionResult.Success;
var section = subject.Sections.FirstOrDefault(s => s.OriginalName == Constants.UI.Sections.Orders.Order.Shipping);
if (section == null) return PipelineExecutionResult.Success;
var imageButton = new ImageButton { ImageUrl = $"{_pathService.GetPath()}/images/ui/add.png"};
section.Menu.RemoveMenuButtion(imageButton);
return PipelineExecutionResult.Success;
}
I think the problem is here-
var imageButton = new ImageButton { ImageUrl = $"{_pathService.GetPath()}/images/ui/add.png"};
But not sure, as there is nothing specific on the documentation though.
Any help is highly appreciated.
Thanks