rare Posted August 10, 2015 Share Posted August 10, 2015 Hi all i've been struggeling with this issue for some days now and i cant seem to figure it out. hope there is someone with a solution here... what i want is to "simply" move my category description to the sidebar right under the category block i figured the best way to do this is to create a module that can print: {$category->description} however im not good with smarty so this simple task turns out to be very hard lol Am i doing this right ? can someone point me in the right direction ? any help will be much appreciated greetings Link to comment Share on other sites More sharing options...
gabdara Posted August 10, 2015 Share Posted August 10, 2015 (edited) Creating a module for this is the right way to do it. In your module install() function add $this->registerHook('displayRightColumn'); to transplant the module on the right sidebar. Create the function that will run on that hook: public function hookDisplayRightColumn($params) { $this->context->smarty->assign('category_description', $this->context->controller->getCategory()->description); return $this->display(__FILE__, 'displayRightColumn.tpl'); } This function assigns the smarty variable $category_description and displays file displayRightColumn.tpl. In YOUR_MODULE/views/templates/hook create file displayRightColumn.tpl and add the smarty variable: {$category_description} Edited August 10, 2015 by gabdara (see edit history) 1 Link to comment Share on other sites More sharing options...
rare Posted August 10, 2015 Author Share Posted August 10, 2015 Damn.. wish i made this post sooner Module is up and running THANKS SO MUCH gabdara ! Link to comment Share on other sites More sharing options...
fredecs Posted October 31, 2022 Share Posted October 31, 2022 I've made a module: https://github.com/fredec/prestashop-leftcategorydescription 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