Abh Posted February 25, 2010 Share Posted February 25, 2010 Hello,Is there any way to activate a module by clicking a button? I want to make a button and link it to Categories on Home Page Module, but i get an error PHP Fatal error: Class ‘Module’ not found in [...]I have no idea what to modify for the module to load only when the link is called. Link to comment Share on other sites More sharing options...
GhoHan Posted February 26, 2010 Share Posted February 26, 2010 Hello sir,I'm Ghohan try to help you.before you are try to use that modul checking first you are prestashop version compatibility with that modul hope this information can help you cheers Link to comment Share on other sites More sharing options...
Abh Posted February 26, 2010 Author Share Posted February 26, 2010 Thank you for trying, GhoHan.I didn't manage to link directly to the module, but i made a separate file with the folowing content, and i linked the button to it: <?php include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../header.php'); include(dirname(__FILE__).'/homecategories.php'); $homecategories = new homecategories(); echo $homecategories->hookHome(); include(dirname(__FILE__).'/../../footer.php'); ?> And it works like a charm. Link to comment Share on other sites More sharing options...
GhoHan Posted February 26, 2010 Share Posted February 26, 2010 Thank you for trying, GhoHan.I didn't manage to link directly to the module, but i made a separate file with the folowing content, and i linked the button to it:<?php include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../header.php'); include(dirname(__FILE__).'/homecategories.php'); $homecategories = new homecategories(); echo $homecategories->hookHome(); include(dirname(__FILE__).'/../../footer.php'); ?> And it works like a charm. Yes i'm try also your code that and i get blank screen because you are use /.../../below the code i'm tested working and no blank screen sir. <?php include(dirname(__FILE__).'/config/config.inc.php'); include(dirname(__FILE__).'/header.php'); include(dirname(__FILE__).'/homecategories.php'); $homecategories = &new;homecategories(); echo $homecategories->hookHome(); include(dirname(__FILE__).'/footer.php'); ?> Hope this help you Link to comment Share on other sites More sharing options...
Recommended Posts