vahid abdi Posted April 10, 2016 Share Posted April 10, 2016 hello guys i wrote a code which selects some data from database and i want to put them into a column modules for example atsuperblock in thsi module there is a atsuperblock.php which assigns two variables called title and content to the tpl file.. but when i put my own code into this php file and wanna assign another variable to show in tpl it loads just blank page and also i can't put php codes into tpl file so?!!! should i create a new module or i could edit these modules in order i want? thanks Link to comment Share on other sites More sharing options...
presta4you.com Posted April 10, 2016 Share Posted April 10, 2016 You can create your own simple module. This is good tutorial: http://doc.prestashop.com/display/PS16/Creating+a+first+module Link to comment Share on other sites More sharing options...
vahid abdi Posted April 11, 2016 Author Share Posted April 11, 2016 Hi, you have to call the function that will put your code in the right Column called hookRightColumn this way: public function install() { if (!parent::install() || !$this->registerHook('rightColumn') ) return false; return true; } public function hookRightColumn($params){ return "your code here"; } and where should I put this code u wrote for me exactly? tnx for answering Link to comment Share on other sites More sharing options...
vahid abdi Posted April 11, 2016 Author Share Posted April 11, 2016 well i'm not familiar with modules much yet so i put that code in the php file of module that starts with name,tab,version,author..and stuff but still i got blank page. and no matter if i put my own code into the code place("your code here") or not.. it loads blank page 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