Jump to content

Add classes from a module

Recommended Posts



I am adding  a form like "customers->contacts " in prestashop, I copied the contoller file and class file and pasted in my module to achieve the same feature but when listing I got "Fatal error: Class 'Organization' not found in /opt/lampp/htdocs/baps/classes/controller/AdminController.php on line 1625


public function __construct()
        $this->bootstrap = true;
        $this->table = 'organization';
        $this->className = 'Organization';        
        $this->bulk_actions = array(
            'delete' => array(
                'text' => $this->l('Delete selected'),
                'confirm' => $this->l('Delete selected items?'),
                'icon' => 'icon-trash'
        $this->fields_list = array(
            'id_contact' => array('title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs'),
            'org_name' => array('title' => $this->l('Organization Name')),
            'org_level' => array('title' => $this->l('Organization Level')),
            'org_address1' => array('title' => $this->l('Organization Address1')),
            'org_address2' => array('title' => $this->l('Organization Address2')),
            'org_state' => array('title' => $this->l('Organization State')),
            'org_city' => array('title' => $this->l('Organization City')),
            'org_zipcode' => array('title' => $this->l('Organization Zipcode')),
            'admin_level' => array('title' => $this->l('Parent Level')),
In the construct how to add class files from my module?

Share this post

Link to post
Share on other sites

... and if you are going to have several classes maybe with "spl_autoload_register"

That's the way i do

Edited by SmartPlugs (see edit history)

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

  • Create New...

Important Information

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