Menu Close
    Start a Project Request quote Reading list Switch to dark mode

    Adding a custom grid column type in PrestaShop admin symfony controller with module

    PrestaShop provide these defult type of column which we can use when we add a new column in PrestaShop admin controller list.

    Refer to this blog to see how to create new column in admin symfony controller

    Now the requirement is how we can create our custom column type in our module according to our requirement. For example: Prestashop does not provide HTML type column type. Let see how you create this.

    In your module create folder like this and create a class file


    In this HtmlTypeColumn.php file the code is,

    You can use this class now in ‘actionCustomerGridDefinitionModifier‘ hook to create column in prestashop controller OR in your own new controller

    Now add your html code to create this HTMLType with folder


    make sure the twig file name should match with getType().

    Done. Now you can see the button in the list where you add this HTMLType. Like here we added on the customer list page.

    Note: As we have created class in src/ folder so make sure you have autoload this with this command:

    $ composer dumpautoload

    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again