Jump to content

Module with admin controllers

Recommended Posts


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';
    public function renderList()
	{   $this->addRowAction('edit');
		$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é
		return parent::renderView();


Share this post

Link to post
Share on other sites

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

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...

Important Information

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