Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (!defined('_PS_VERSION_'))
- exit;
- class GameHinter extends Module {
- private $html = '';
- public function __construct() {
- $this->name = 'gamehinter';
- $this->tab = 'smart_shopping';
- $this->version = '0.0.2';
- $this->author = 'Lucas Dyduch';
- $this->need_instance = 0;
- $this->ps_versions_compliancy = [
- 'min' => '1.7',
- 'max' => _PS_VERSION_
- ];
- $this->bootstrap = true;
- parent::__construct();
- $this->displayName = $this->l('Game hinter');
- $this->description = $this->l('It shows what game can handle hardware you are browsing.');
- $this->confirmUninstall = $this->l('Are you sure you want to uninstall?');
- if (!Configuration::get('GAMEHINTER'))
- $this->warning = $this->l('No name provided');
- }
- public function install() {
- return parent::install()
- && $this->registerHook('displayProductAdditionalInfo');
- }
- public function uninstall() {
- if(!parent::uninstall())
- return false;
- return true;
- }
- public function hookDisplayProductAdditionalInfo($params) {
- //$sql = 'SELECT @@version;'
- //$results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
- $this->html .= '<script>alert(1)</script><h1>It works $params</h1>';
- //TODO pobranie z parametów informacji ze jest to karta grafczina
- return $this->html;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement