Jump to content

Create a new database table Class and show it into Prestashop


andrewappleseed

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!

Link to comment
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
×
×
  • Create New...