Jump to content

Add own resources and ObjectModel


Martin

Recommended Posts

Hello. 

I have a problem to create ObjectModel to my own module. I successfuly created resource and added permission to this but my class is not see from request to Webservice.

When i install module, my override WebserviceRequest class is copy to overide to prestashop directory: override/classes/webservice/WebserviceRequest.php

It's work good. 

But my class to create model: is not copy from /mymodule/classes/CategoryEcommerce.php

Also when I copy by my hand to /classes in Prestashop its working good. 

What i doing bad ? 

Please answer.

 

<?php

class CategoryEcommerce extends ObjectModel {
    
    public $category_id;
    public $category_core_id;
    
    public static $definition = array(
        'table' => "category_ecommerce",
        'primary' => 'category_id',
        'fields' => array(
            'category_core_id' => array('type' => self::TYPE_INT),
        )
    );
      
    protected $webserviceParameters = array();

}

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...