Jump to content

module values are not assigned to smarty template


Recommended Posts


I am doing a small module. In that I am fetching some data from the database in hook. The code for hook is like this, in this I just want to assign the value of 


public function hookHome($params) {
    $defaultLanguage = (int)(Configuration::get('PS_LANG_DEFAULT'));
    global $cookie, $smarty;
    $sql_select="SELECT * FROM "._DB_PREFIX_."storeinfo WHERE status = '1'";
   // print_r($value);

    return $this->display(__FILE__, 'storeinfo.tpl');


  In view file 


 I want to show the values thats why I just made



 in storeinfo.tpl but it did not showed anything. Now If I am doing print_r($value) in the public function hookHome($params) {} I am getting the array. But the assigned values in smarty is not showing in .tpl file so can someone kindly tell me what is the problem here..Any help and suggestions will be really appreciable. Thanks


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