Advertisement
Guest User

Untitled

a guest
Jan 6th, 2014
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.26 KB | None | 0 0
  1. <?php
  2.  
  3. if (!defined('_PS_VERSION_'))
  4.     exit;
  5.  
  6. class Sfdsync extends Module
  7. {
  8.     public function __construct()
  9.     {
  10.         $this->name = 'sfdsync';
  11.         $this->tab = 'front_office_features';
  12.         $this->version = '0.1';
  13.         $this->author = 'Mateusz _matiit_ Tracz';
  14.  
  15.         parent::__construct();
  16.  
  17.         $this->displayName = $this->l('Moduł synchronizacji zamówień z SFD.pl');
  18.         $this->description = $this->l('Wysyłanie informacji o zamówieniach.');
  19.  
  20.         $this->confirmUninstall = $this->l('Czy napewno odinstalować moduł?');
  21.  
  22.         $this->_checkContent();
  23.  
  24.         $this->context->smarty->assign('module_name', $this->name);
  25.     }
  26.  
  27.     public function install()
  28.     {
  29.         if (!parent::install() ||
  30.             !$this->registerHook('actionValidateOrder') ||
  31.             !$this->_createContent())
  32.             return false;
  33.         return true;
  34.     }
  35.  
  36.     public function uninstall()
  37.     {
  38.         if (!parent::uninstall() ||
  39.             !$this->_deleteContent())
  40.             return false;
  41.         return true;
  42.     }
  43.  
  44.  
  45.     /**
  46.      * Actually Module :)
  47.      */
  48.     public function hookActionValidateOrder($params)
  49.     {
  50.         ob_start();
  51.         var_dump($params);
  52.  
  53.         $result = ob_get_clean();
  54.         $logger = new FileLogger();
  55.         $logger->setFilename(_PS_ROOT_DIR_.'/log/'.date('Ymd').'_exception.log');
  56.         //$logger->logError($result);
  57.         return "tet";
  58.     }
  59. }
  60.  
  61. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement