NeedZoom Posted May 10, 2018 Share 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, Link to comment Share on other sites More sharing options...
NeedZoom Posted May 11, 2018 Author Share Posted May 11, 2018 il faut mettre le tpl selon ce chemin : modules\idsmaperso\views\templates\admin\ids_maperso\helpers\view\mapersoAdmin.tpl. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now