Jump to content

Create a new database table Class and show it into Prestashop


andrewappleseed
 Share

Recommended Posts

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

<?php
include(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!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More