Jump to content

frojha

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • First Name
    Sebastian
  • Last Name
    Wunderlich

Recent Profile Visitors

252 profile views

frojha's Achievements

Newbie

Newbie (1/14)

5

Reputation

  1. Does someone know why are the columns class_name, is_module and module_name in the table webservice_account? Can use them somehow with core functions?
  2. And that is the problem: I want to submit the module on the addon store...
  3. Hello, I want to extend some core classes and controllers via a module but I don't know how. I can do it with overrides but according to the developers this isn't a good way: But how can I extend it? Is there any code example? Best regards
  4. How can I do it without an override? Or is it impossible in PrestaShop 1.7? I can't find a hook in the near of the core code.
  5. Hello, how can I use my own controllers in PrestaShop 1.7? For example I want to add an extra (HTTP) header in PageNotFoundController. So I have to modify the public function initContent() in the file /controllers/front/PageNotFoundController.php. How can I do this with a module?
  6. Of course it was just a test. Finally I do something like this: require_once(_PS_MODULE_DIR_.'mymodule/classes/customClass.php'); require_once(_PS_MODULE_DIR_.'mymodule/classes/extraClass.php'); class MyModule extends Module { public function __construct() { // Basic module stuff here... } public function install() { return parent::install() && $this->registerHook('addWebserviceResources'); } public function hookAddWebserviceResources() { return array( 'custom' => array( 'description' => 'My Custom Resource', 'class' => 'custom' ), 'extra' => array( 'description' => 'My Extra Resource', 'class' => 'extra' ) ); } } mymodule/classes/customClass.php looks like: class custom extends CMS { // extend or adjust CMS stuff here }
  7. After inserting some "debug" output in WebserviceRequest.php it seems this is the correct syntax: public function hookAddWebserviceResources() { return array('mypageresource' => array('description' => 'Manage My Pages', 'class' => 'CMS')); }
  8. Trying this ends in an semi white page: public function hookAddWebserviceResources($extra_resources) { $extra_resources['resources']['mypageresource'] = array('description' => 'Manage My Pages', 'class' => 'CMS'); return $extra_resources; }
  9. Hello, is there a code example available of the hook addWebserviceResources? I want to add a custom webservice resource, but all tutorials are outdated and are based on class override (which isn't possible in PrestaShop 1.7). Best regards
×
×
  • Create New...