NewbieSVK Posted August 4, 2014 Share Posted August 4, 2014 Hi everyone. I´m newbie in Prestashop and I´m trying to disable category hyperlink (not clickable), i don´t want to show category page with content of category (it looks bad) Pls help, thx Sorry for my English Link to comment Share on other sites More sharing options...
lucasaad Posted August 4, 2014 Share Posted August 4, 2014 Hello, same problem here. Link to comment Share on other sites More sharing options...
vekia Posted August 4, 2014 Share Posted August 4, 2014 it's not possible to share "universal" solution in this case, it's because categories ID numbers are different for each shop. if we want to remove these links (href="") we need to know ID of category and modify module php file. sadly, this is the only one module where contents are generated inside the .php file - so we need to alter php file there is also some workaround, to remove href="" param with jquery, but in this case it will remove href from EACH first level menu item Link to comment Share on other sites More sharing options...
NewbieSVK Posted August 6, 2014 Author Share Posted August 6, 2014 I´m trying to change blocktopmenu.php, but no success when I add # to a href" " it si not works Can you help me with this, please? Thx Link to comment Share on other sites More sharing options...
vekia Posted August 6, 2014 Share Posted August 6, 2014 sure, can you show an example of code that you modified? Link to comment Share on other sites More sharing options...
ghoose Posted August 11, 2014 Share Posted August 11, 2014 Hi, I modify blocktopmenu.php from : case 'CMS_CAT': $category = new CMSCategory((int)$id, (int)$id_lang); if (count($category)) { $this->_menu .= '<li><a href="'.Tools::HtmlEntitiesUTF8($category->getLink()).'" title="'.$category->name.'">'.$category->name.'</a>'; $this->getCMSMenuItems($category->id); $this->_menu .= '</li>'.PHP_EOL; } break; TO: case 'CMS_CAT': $category = new CMSCategory((int)$id, (int)$id_lang); if (count($category)) { $this->_menu .= '<li><a href="#" title="'.$category->name.'">'.$category->name.'</a>'; $this->getCMSMenuItems($category->id); $this->_menu .= '</li>'.PHP_EOL; } break; On PS 1.6 and It looks to run OK. Can you, please, confirm this is the right way ??? Link to comment Share on other sites More sharing options...
vekia Posted August 11, 2014 Share Posted August 11, 2014 after modifications you regenerated module code with shop cache clear ? Link to comment Share on other sites More sharing options...
ghoose Posted August 12, 2014 Share Posted August 12, 2014 mmmm I´m not sure, think not...but anyways, It´s looks like works fine! WIP --> http://rsxracingsolutions.com/shop/en/ the item "Asi es RSX" Link to comment Share on other sites More sharing options...
vekia Posted August 12, 2014 Share Posted August 12, 2014 so if it works fine now it was a cache related problem :-) Link to comment Share on other sites More sharing options...
Recommended Posts