Jump to content

Bug smarty dans un module prestashop


Recommended Posts

Bonjour à tous, 

Voilà j'ai un petit souci, 

je suis en train de développer un module sur Prestashop 1.5.6.2.

J'ai fait une vue smarty pour mon getContent() du module,

tout s'affiche comme il faut je n'ai pas de soucis la dessus.

En revanche quand je veux mettre une variable du genre {$js_dir} 

voila l'erreur que j'ai :

Notice: Undefined index: js_dir in /Users/guillaume/Sites/prestashop_156/cache/smarty/compile/b4/b0/9e/b4b09ee63a01b5e2cd8a73e8f8a5cdcc9a2d141e.file.admin_panel.tpl.php on line 119

Notice: Trying to get property of non-object in /Users/guillaume/Sites/prestashop_156/cache/smarty/compile/b4/b0/9e/b4b09ee63a01b5e2cd8a73e8f8a5cdcc9a2d141e.file.admin_panel.tpl.php on line 119

je pense qu'il doit manquer quelque chose.

Voici ma methode getContent()

if(isset($errors))
            $this->context->smarty->assign('errors', $errors);
        else
            $errors = array();
        $this->context->smarty->assign('request_uri', Tools::safeOutput($_SERVER['REQUEST_URI']));
        $this->context->smarty->assign('path', $this->_path);

        $this->context->smarty->assign('EXAMPLE_CONF', pSQL(Tools::getValue('EXAMPLE_CONF', Configuration::get('EXAMPLE_CONF'))));
        $this->context->smarty->assign('submitName', 'submit'.ucfirst($this->name));
        $this->context->smarty->assign('errors', $errors);
     
      return $this->display(__FILE__, 'admin_panel.tpl'); 

Merci d'avance.

 

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