Jump to content

Capture postProcess and render template


Recommended Posts

Hello Prestashop developer community !


It is I, stuck again !


My module is an extension of the AdminOrdersController.

I have managed to place a link inside the table:


The smart template is simple and tries to open the link in a new window.


Inside the module I capture the postProcess and grab the httplog param. I would then like to render my template in the new window but all that happens is that my modified AdminOrdersController renders it's display instead.


How can I do what I need to do ?


Code below.


Thanks for reading :)

        public function postProcess()

                if (Tools::isSubmit('httpLog') ) {

                $order_id = Tools::getValue('httplog');
                $order = new Order($id_order);
                $order_state = $order->getCurrentOrderState();
                if (!Validate::isLoadedObject($order_state) || !Validate::isLoadedObject($order))
                        return '';

                        'order' => $order,
                        'order_state' => $order_state,

                return $this->createTemplate('../../../../modules/mymodule/views/templates/admin/_send_to_ds_api.tpl')->fetch();


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...