Reading list Switch to dark mode

    Skip List Action in PrestaShop Render List

    Updated 28 July 2022

    In this blog, we are going to show you how to skip list action in PrestaShop render list using predefined core functionality easily.

    Skip List Action in PrestaShop Render List
    Skip List Action in PrestaShop Render List

    Let’s suppose we are making a render list and we want that some of the rows will not be editable, deletable, viewable and prevented from list bulk action as shown in the above image.

    Firstly you have to add skip row action as below :

            $this->addRowActionSkipList('delete', $not_to_delete);
            $this->addRowActionSkipList('view', $not_to_view);
            $this->addRowActionSkipList('edit', $not_to_edit);

    Add these lines in your render list function and this will prevent row action and hide related buttons.

    Secondly, variables contains row id as given below :

    Searching for an experienced
    Prestashop Company ?
    Find out More
            $not_to_delete = array(1, 2, 3);
            $not_to_view = array(2, 3);
            $not_to_edit = array(3);

    Here variables are an array that contains row id which you want to prevent in row action. In the above example we hide the delete from row 1, 2, 3, hide view from 2, 3 and hide all from id 3.

    Checkboxes for bulk row action are removed from each row in which we skip row action.

    That’s all.

    If you are facing any issues or doubts in the above process, please feel free to contact us through the comment section.

    I would be happy to help.

    Also, you can explore our PrestaShop Development Services and a large range of quality PrestaShop Modules.

    For any doubt contact us at [email protected].

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home