Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Harsheet 71 posts 302 karma points
    Aug 24, 2017 @ 06:36
    Harsheet
    0

    How to remove an existing button on a tab in uCommerce?

    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

  • David Kelemen 8 posts 99 karma points
    Sep 04, 2017 @ 12:22
    David Kelemen
    0

    This topic has been answered on the Ucommerce open support forum Eureka!

    For others interested in the answer you can find it at: http://eureka.ucommerce.net/#!/question/2288/How-to-remove-an-existing-button-on-a-tab-in-uCommerce

    Regards, David

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies