NeedZoom 0 Posted May 10, 2018 Bonjour, J'ai crée un module avec un hook perso. Il fonctionne bien coté Front. Mais j'ai un soucis au niveau le Backoffice , extement ai niveau de admin controllers. \modules\idsmaperso\controllers\admin : class AdminIdsMapersoController extends ModuleAdminController { public function __construct() { $this->bootstrap = true; $this->table = 'idsmaperso'; $this->className = 'Idsperso'; parent::__construct(); } public function renderList() { $this->addRowAction('edit'); $this->addRowAction('view'); $this->addRowAction('delete'); $this->fields_list = array( 'id_idsmaperso' => array( 'title' => 'ID', 'align' => 'text-center', 'class' => 'fixed-width-xs', 'orderby' => false ), 'id_cart' => array( 'title' => $this->module->l('Commande'), 'callback' => 'printOrderLink' ), 'id_product' => array( 'title' => $this->module->l('Produit'), 'callback' => 'getRefProduit' ), 'id_customer' => array( 'title' => $this->module->l('Client'), 'callback' => 'getCustomerName' ) ); return parent::renderList(); } //Pour PB est ici, lorsque je veux voir la détail : public function renderView() { if (!($idsmaperso = $this->loadObject())) { return;} $this->context->idsmaperso = $idsmaperso; $this->tpl_view_vars = array( 'idsmaperso' => $idsmaperso, 'nom' => $idsmaperso->nom ); $this->base_tpl_view = 'mapersoAdmin.tpl'; //Les données sont présenté //print_r($idsmaperso);exit; return parent::renderView(); } Cordialement, Share this post Link to post Share on other sites
NeedZoom 0 Posted May 11, 2018 il faut mettre le tpl selon ce chemin : modules\idsmaperso\views\templates\admin\ids_maperso\helpers\view\mapersoAdmin.tpl. Share this post Link to post Share on other sites