andrewappleseed Posted January 7, 2011 Share Posted January 7, 2011 Hi,Im developing a Charity module.In my first steps, i just add a new table to the DB.Then i create the class: Charity.php.In this class, i use one simple method: public function getCharities(), that will give me all the active charities (name, description, image, etc).Im trying to understand the MVC of prestashop (like in supplier.php). but i dont know how to call the method. Example:prestashop/charity-list.php<?phpinclude(dirname(__FILE__).'/config/config.inc.php');include(dirname(__FILE__).'/init.php');//get a list of charities$charities = $charity->getCharities(); (does not work).echo "list of charities.....";Thanks! Link to comment Share on other sites More sharing options...
otzy Posted January 7, 2011 Share Posted January 7, 2011 what about include Charity.php?and create object before use it if class has no static methods Link to comment Share on other sites More sharing options...
andrewappleseed Posted January 7, 2011 Author Share Posted January 7, 2011 i´ll try..are not all the class included in init.php? 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