Files
wyczarujprezent.pl/modules/x13categoryassign/x13categoryassign.php
2024-10-28 22:14:22 +01:00

63 lines
1.6 KiB
PHP

<?php
if (!defined('_PS_VERSION_')) {
exit;
}
if (!defined('X13_ION_VERSION_CA')) {
if (PHP_VERSION_ID >= 70100) {
$x13IonVer = '-71';
} elseif (PHP_VERSION_ID >= 70000) {
$x13IonVer = '-7';
} else {
$x13IonVer = '';
}
define('X13_ION_VERSION_CA', $x13IonVer);
}
require_once dirname(__FILE__) . '/classes/X13CategoryAssignCore' . X13_ION_VERSION_CA . '.php';
require_once dirname(__FILE__) . '/x13categoryassign.core' . X13_ION_VERSION_CA . '.php';
class x13categoryassign extends x13categoryAssignModuleCore
{
public function __construct()
{
$this->name = 'x13categoryassign';
$this->tab = 'quick_bulk_update';
$this->version = '1.0.5';
$this->author = 'x13.pl';
$this->need_instance = 0;
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('Category Assign');
$this->description = $this->l('Move, copy, edit product in category');
$this->ps_versions_compliancy = array('min' => '1.5', 'max' => '1.7.99.9999');
self::$type_lang = array(
self::TYPE_ASSIGN => $this->l('Assign new categories'),
self::TYPE_UNASSIGN => $this->l('Unassign from categories (without default)'),
self::TYPE_REASSIGN => $this->l('Reassign categories')
);
}
public function install()
{
return parent::install();
}
public function uninstall()
{
if (!parent::uninstall()) {
return false;
}
foreach (Tab::getCollectionFromModule($this->name) as $tab) {
$tab->delete();
}
return true;
}
}