Jump to content

How to refresh .tpl inside of hookDisplayAdminProductsE><tra


Recommended Posts

Hi,

I'm developing a module for prestashop 1.7 to save custom data of products in a custom table.

All works fine: can create new entries, update and delete old ones without problems.

What i can't do is refresh the tpl with the new values, or the edited ones, without refreshing the URL and going back to firsts product tab (then had to modules tab and configure my module and get back to right section).

Is there a way to refresh the TPL inside the  hookDisplayAdminProductsExtra without forcing a url refresh?

public function hookDisplayAdminProductsExtra($params)
{  

        $id_product = (int)$params['id_product'];
        $this->context->smarty->assign('product_id', $id_product);
        $this->context->smarty->assign('product_key', $this->key);
        $this->context->smarty->assign('product_values', mymodulevalues::loadByIdProduct((int)$params['id_product']));    
        $this->context->smarty->assign('product_attributes', mymoduleattributes::loadByIdProduct((int)$params['id_product']));    
      
        return $this->display(__FILE__, 'views/templates/admin/tabs.tpl');

}

 

Thanks!

Share this post


Link to post
Share on other sites

  • 1 year later...

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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More