public function uninstall() { if (!parent::uninstall() or !$this->unregisterHook('actionCarrierUpdate') or !Db::getInstance()->Execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'fraktguide_product_names`')) { return false; } else { $carrier_ids_str = Configuration::get('FRAKTGUIDE_CREATED_CARRIER_IDS'); $carrier_ids = $carrier_ids_str ? explode(';', Configuration::get('FRAKTGUIDE_CREATED_CARRIER_IDS')) : array(); foreach ($carrier_ids as $carrier_id) { $carrier = new Carrier((int) $carrier_id); $carrier->deleted = 1; if (!$carrier->update()) { return false; } } Configuration::deleteByName('FRAKTGUIDE_CREATED_CARRIER_IDS'); Configuration::deleteByName('FRAKTGUIDE_CARRIER_IDS'); Configuration::deleteByName('FRAKTGUIDE_PRODUCTS'); Configuration::deleteByName('FRAKTGUIDE_EDI'); Configuration::deleteByName('FRAKTGUIDE_DEBUG_MODE'); Configuration::deleteByName('FRAKTGUIDE_A_POST_MAX_PRIS'); Configuration::deleteByName('FRAKTGUIDE_FRA_POSTNUMMER'); Configuration::deleteByName('FRAKTGUIDE_FORSIKRING'); Configuration::deleteByName('FRAKTGUIDE_ID_TAX_RULES_GROUP'); return true; } }
public function uninstall() { if (!parent::uninstall()) { return false; } $carrier = new Carrier(Configuration::get('MY_CARRIR_ID')); $carrier->deleted = 1; if (!$carrier->add()) { return false; } if (!Configuration::deleteByName('MY_CARRIER_ID')) { return false; } return true; }
public function uninstall() { // If Dejala is default carrier, try to set another one as default $defaultCarrier = new Carrier((int) Configuration::get('PS_CARRIER_DEFAULT')); if (DejalaCarrierUtils::getCarrierName($defaultCarrier) == $this->name) { $defaultCarrier = DejalaCarrierUtils::getFirstActiveCarrierWithNameNotBeing($this->name); if (Validate::isLoadedObject($defaultCarrier)) { Configuration::updateValue('PS_CARRIER_DEFAULT', $defaultCarrier->id_carrier); } } while (!is_null($carrier = DejalaCarrierUtils::getCarrierByName($this->name, true))) { $carrier->deleted = 1; if (!$carrier->update()) { return false; } } $this->dejalaConfig->uninstall(); if (!parent::uninstall() or !$this->unregisterHook('updateOrderStatus') or !$this->unregisterHook('extraCarrier') or !$this->unregisterHook('processCarrier') or !$this->unregisterHook('orderDetailDisplayed') or !$this->registerHook('PDFInvoice')) { return false; } return true; }
public function uninstall() { Configuration::deleteByName('EGDELIVERY_LIVE_MODE'); return parent::uninstall(); }
public function uninstall() { require_once _DPDPOLAND_CONTROLLERS_DIR_ . 'service.php'; require_once _DPDPOLAND_CONTROLLERS_DIR_ . 'dpd_classic.service.php'; require_once _DPDPOLAND_CONTROLLERS_DIR_ . 'dpd_standard.service.php'; require_once _DPDPOLAND_CONTROLLERS_DIR_ . 'dpd_standard_cod.service.php'; return parent::uninstall() && DpdPolandCarrierClassicService::delete() && DpdPolandCarrierStandardService::delete() && DpdPolandCarrierStandardCODService::delete() && DpdPolandConfiguration::deleteConfiguration() && $this->dropTables() && Configuration::deleteByName(DpdPolandWS::DEBUG_FILENAME); }
/** * * @return boolean */ public function uninstall() { // Uninstall Carriers $result = Db::getInstance()->autoExecute(_DB_PREFIX_ . 'carrier', array('deleted' => 1), 'UPDATE', ' name LIKE "Correios%" '); if (!Configuration::deleteByName('PS_CORREIOS_CEP_ORIG')) { return false; } if (!parent::uninstall() or !$this->unregisterHook('updateCarrier')) { return false; } return true; }
public function uninstall() { if (parent::uninstall()) { foreach ($this->hooks as $hook) { if (!$this->unregisterHook($hook)) { return false; } } // Delete carrier. if (!$this->deleteCarriers()) { return false; } // Remove table. $sql = 'DROP TABLE `PREFIX_send24order_value`'; $sql_query = str_replace('PREFIX_', _DB_PREFIX_, $sql); if (!Db::getInstance()->execute($sql_query)) { return false; } return true; } return false; }
public function uninstall() { require_once _DPDGROUP_CONTROLLERS_DIR_ . 'Service.php'; $services = array(DpdGroupConfiguration::CARRIER_CLASSIC_ID, DpdGroupConfiguration::CARRIER_10_ID, DpdGroupConfiguration::CARRIER_12_ID, DpdGroupConfiguration::CARRIER_SAME_DAY_ID, DpdGroupConfiguration::CARRIER_B2C_ID, DpdGroupConfiguration::CARRIER_INTERNATIONAL_ID, DpdGroupConfiguration::CARRIER_BULGARIA_ID, DpdGroupConfiguration::CARRIER_CLASSIC_COD_ID, DpdGroupConfiguration::CARRIER_10_COD_ID, DpdGroupConfiguration::CARRIER_12_COD_ID, DpdGroupConfiguration::CARRIER_SAME_DAY_COD_ID, DpdGroupConfiguration::CARRIER_B2C_COD_ID, DpdGroupConfiguration::CARRIER_INTERNATIONAL_COD_ID, DpdGroupConfiguration::CARRIER_BULGARIA_COD_ID); foreach ($services as $id_service) { if (!DpdGroupService::deleteCarrier($id_service)) { $this->_errors[] = $this->l('Could not delete DPD carrier'); return false; } } return parent::uninstall() && $this->dropTables() && $this->dropTriggers() && DpdGroupConfiguration::deleteConfiguration(); }
public function uninstall() { $history_table = SeurLib::getSeurCarriers(); if (!empty($history_table)) { foreach ($history_table as $history_carrier) { if (in_array($history_carrier['type'], array('SEN', 'SEP', 'SCN', 'SCE')) == true) { $carrier = new Carrier((int) $history_carrier['id']); if (Validate::isLoadedObject($carrier)) { $carrier->active = 0; $carrier->deleted = 1; @unlink(_PS_SHIP_IMG_DIR_ . (int) $carrier->id . '.jpg'); $carrier->save(); } } } } if (!$this->uninstallTab() || !$this->setCarriersGroups(0, true) || !$this->deleteTables() || !$this->deleteSettings() || !$this->uninstallSeurCashOnDelivery()) { return false; } return parent::uninstall(); }
public function uninstall() { // Uninstall Carriers // 1.5 id_shop !! Db::getInstance()->autoExecute(_DB_PREFIX_ . 'carrier', array('deleted' => 1), 'UPDATE', '`external_module_name` = \'tntcarrier\''); // Uninstall Config foreach ($this->_fieldsList as $keyConfiguration => $name) { Configuration::deleteByName($keyConfiguration); /*if (!Configuration::deleteByName($keyConfiguration)) return false;*/ } // Uninstall SQL include dirname(__FILE__) . '/sql-uninstall.php'; foreach ($sql as $s) { if (!Db::getInstance()->Execute($s)) { return false; } } // Uninstall Module if (!parent::uninstall() or !$this->unregisterHook('updateCarrier')) { return false; } return true; }
public function uninstall() { $so_id = (int) Configuration::get('SOCOLISSIMO_CARRIER_ID'); $so_id_seller = (int) Configuration::get('SOCOLISSIMO_CARRIER_ID_SELLER'); Configuration::deleteByName('SOCOLISSIMO_ID'); Configuration::deleteByName('SOCOLISSIMO_VERSION'); Configuration::deleteByName('SOCOLISSIMO_USE_FANCYBOX'); Configuration::deleteByName('SOCOLISSIMO_USE_IFRAME'); Configuration::deleteByName('SOCOLISSIMO_KEY'); Configuration::deleteByName('SOCOLISSIMO_URL'); Configuration::deleteByName('SOCOLISSIMO_URL_MOBILE'); Configuration::deleteByName('SOCOLISSIMO_OVERCOST'); Configuration::deleteByName('SOCOLISSIMO_COST_SELLER'); Configuration::deleteByName('SOCOLISSIMO_UPG_COUNTRY'); Configuration::deleteByName('SOCOLISSIMO_PREPARATION_TIME'); Configuration::deleteByName('SOCOLISSIMO_CARRIER_ID'); Configuration::deleteByName('SOCOLISSIMO_CARRIER_ID_SELLER'); Configuration::deleteByName('SOCOLISSIMO_SUP'); Configuration::deleteByName('SOCOLISSIMO_EXP_BEL'); Configuration::deleteByName('SOCOLISSIMO_SUP_BELG'); Configuration::deleteByName('SOCOLISSIMO_SUP_URL'); Configuration::deleteByName('SOCOLISSIMO_OVERCOST_TAX'); if (!parent::uninstall() || !Db::getInstance()->execute('DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'socolissimo_delivery_info`') || !$this->unregisterHook('extraCarrier') || !$this->unregisterHook('payment') || !$this->unregisterHook('AdminOrder') || !$this->unregisterHook('newOrder') || !$this->unregisterHook('updateCarrier') || !$this->unregisterHook('paymentTop') || !$this->unregisterHook('backOfficeHeader')) { return false; } // Delete So Carrier $so_carrier = new Carrier($so_id); // If socolissimo carrier is default set other one as default if (Configuration::get('PS_CARRIER_DEFAULT') == (int) $so_carrier->id) { $carriers_d = Carrier::getCarriers($this->context->language->id); foreach ($carriers_d as $carrier_d) { if ($carrier_d['active'] && !$carrier_d['deleted'] && $carrier_d['name'] != $this->config['name']) { Configuration::updateValue('PS_CARRIER_DEFAULT', $carrier_d['id_carrier']); } } } // Save old carrier id Configuration::updateValue('SOCOLISSIMO_CARRIER_ID_HIST', Configuration::get('SOCOLISSIMO_CARRIER_ID_HIST') . '|' . (int) $so_carrier->id); $so_carrier->deleted = 1; if (!$so_carrier->update()) { return false; } // Delete So Carrier Seller $so_carrier = new Carrier($so_id_seller); // If socolissimo carrier is default set other one as default if (Configuration::get('PS_CARRIER_DEFAULT') == (int) $so_carrier->id) { $carriers_d = Carrier::getCarriers($this->context->language->id); foreach ($carriers_d as $carrier_d) { if ($carrier_d['active'] && !$carrier_d['deleted'] && $carrier_d['name'] != $this->config['name']) { Configuration::updateValue('PS_CARRIER_DEFAULT', $carrier_d['id_carrier']); } } } // Save old carrier id Configuration::updateValue('SOCOLISSIMO_CARRIER_ID_HIST', Configuration::get('SOCOLISSIMO_CARRIER_ID_HIST') . '|' . (int) $so_carrier->id); $so_carrier->deleted = 1; if (!$so_carrier->update()) { return false; } return true; }
public function uninstall() { $carriers = array(Configuration::get('CHRONORELAIS_CARRIER_ID'), Configuration::get('CHRONOPOST_CARRIER_ID'), Configuration::get('CHRONOEXPRESS_CARRIER_ID'), Configuration::get('CHRONO10_CARRIER_ID'), Configuration::get('CHRONO18_CARRIER_ID'), Configuration::get('CHRONOCLASSIC_CARRIER_ID')); foreach ($carriers as $cid) { $c = new Carrier($cid); if (Validate::isLoadedObject($c)) { $c->deleted = true; $c->save(); } } $tab = new Tab(Tab::getIdFromClassName('AdminExportChronopost')); if (!$tab->delete()) { return false; } $tab = new Tab(Tab::getIdFromClassName('AdminImportChronopost')); if (!$tab->delete()) { return false; } $tab = new Tab(Tab::getIdFromClassName('AdminBordereauChronopost')); if (!$tab->delete()) { return false; } return parent::uninstall(); }
public function uninstall() { require_once _PS_MODULE_DIR_ . $this->name . '/PrestahostModuleInstall.php'; $install = new PrestahostModuleInstall($this); if (!$install->unistallExternalCarrier((int) Configuration::get($this->uppername . '_CARRIER_ID'))) { return false; } if (!$install->uninstallSql()) { return false; } if (!$install->uninstallModuleTab('AdminOrderUlozenka')) { return false; } $install->removeState('OS_ULOZENKA_DORUCENO'); if (!parent::uninstall() || !Configuration::deleteByName('ULOZENKA_ACCESS_CODE') || !Configuration::deleteByName($this->uppername . '_SHIPPING_FREE') || !Configuration::deleteByName($this->uppername . 'POBOCKY') || !Configuration::deleteByName($this->uppername . 'POBOCKY_ALLOW') || !Configuration::deleteByName('OS_ULOZENKA_DORUCENO') || !Configuration::deleteByName($this->uppername . '_CARRIER_ID') || !Configuration::deleteByName($this->uppername . '_DEFAULT_PRICE') || !Configuration::deleteByName($this->uppername . '_LOGO_TYPE') || !Configuration::deleteByName($this->uppername . '_COD_MODULES') || !Configuration::deleteByName('ULOZENKA_API_KEY') || !$this->unregisterHook('actionCarrierUpdate') || !$this->unregisterHook('displayBeforeCarrier') || !$this->unregisterHook('displayCarrierList') || !$this->unregisterHook('actionCarrierProcess') || !$this->unregisterHook('displayOrderConfirmation') || !$this->unregisterHook('displayHeader')) { return false; } return true; }
public function uninstall() { // Uninstall Carriers $exists = Db::getInstance()->executeS('SHOW TABLES LIKE "' . _DB_PREFIX_ . 'ups_rate_service_code"'); if (count($exists)) { Db::getInstance()->autoExecute(_DB_PREFIX_ . 'carrier', array('deleted' => 1), 'UPDATE', '`external_module_name` = \'upscarrier\' OR `id_carrier` IN (SELECT DISTINCT(`id_carrier`) FROM `' . _DB_PREFIX_ . 'ups_rate_service_code`)'); } // Uninstall Config foreach ($this->_fieldsList as $keyConfiguration => $name) { Configuration::deleteByName($keyConfiguration); } // Uninstall SQL include dirname(__FILE__) . '/sql-uninstall.php'; foreach ($sql as $s) { if (!Db::getInstance()->execute($s)) { return false; } } // Uninstall Module return parent::uninstall(); }
/** * @return bool * * @author Panagiotis Vagenas <*****@*****.**> * @since ${VERSION} */ public function uninstall() { return parent::uninstall() && \acsws\classes\ACSWSOptions::getInstance()->deleteAllOptions(); }
public function uninstall() { // Uninstall Carriers Db::getInstance()->autoExecute(_DB_PREFIX_ . 'carrier', array('deleted' => 1), 'UPDATE', '`external_module_name` = \'fedexcarrier\' OR `id_carrier` IN (SELECT DISTINCT(`id_carrier`) FROM `' . _DB_PREFIX_ . 'fedex_rate_service_code`)'); // Uninstall Config foreach ($this->_fieldsList as $keyConfiguration => $name) { if (!Configuration::deleteByName($keyConfiguration)) { return false; } } // Uninstall SQL include dirname(__FILE__) . '/sql-uninstall.php'; foreach ($sql as $s) { if (!Db::getInstance()->execute($s)) { return false; } } // Uninstall Module if (!parent::uninstall() or !$this->unregisterHook('updateCarrier')) { return false; } return true; }
public function uninstall() { // Uninstall if (!parent::uninstall() || !Configuration::deleteByName('COURIERSERVICE_OVERCOST') || !Configuration::deleteByName('DELIVERYPOINTS_OVERCOST') || !$this->unregisterHook('updateCarrier') || !$this->unregisterHook('displayBackOfficeHeader') || !DpdCarrierOptions::uninstallDb() || !DpdDeliveryPoints::uninstallDb() || !DpdOrderOptions::uninstallDb() || !DpdDeliveryPrice::uninstallDb()) { // || !$this->removeBulkActionButtons() //Using this only if Overwrite using already other model! return false; } // Delete External Carrier $carrier1 = new Carrier((int) Configuration::get('COURIERSERVICE_CARRIER_ID')); $carrier2 = new Carrier((int) Configuration::get('DELIVERYPOINTS_CARRIER_ID')); // If external carrier is default set other one as default if (Configuration::get('PS_CARRIER_DEFAULT') == (int) $carrier1->id || Configuration::get('PS_CARRIER_DEFAULT') == (int) $carrier2->id) { $carriers_d = Carrier::getCarriers(Context::getContext()->cookie->id_lang, true, false, false, null, PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); foreach ($carriers_d as $carrier_d) { if ($carrier_d['active'] && !$carrier_d['deleted'] && $carrier_d['name'] != $this->_config['name']) { Configuration::updateValue('PS_CARRIER_DEFAULT', $carrier_d['id_carrier']); } } } // Then delete Carrier $carrier1->deleted = 1; $carrier2->deleted = 1; if (!$carrier1->update() || !$carrier2->update()) { return false; } $settings = array(self::CONST_PREFIX . 'ENABLED', self::CONST_PREFIX . 'SERVICE_USERNAME', self::CONST_PREFIX . 'SERVICE_USERPASS', self::CONST_PREFIX . 'SERVICE_USERID', self::CONST_PREFIX . 'API_URL', self::CONST_PREFIX . 'BTNSUBMIT', self::CONST_PREFIX . 'TAB', self::CONST_PREFIX . 'USERNAME'); foreach ($settings as $setting) { Configuration::deleteByName($setting); } $tab = new Tab(Tab::getIdFromClassName('AdminCallcarrier')); $tab->delete(); return true; }
public function uninstall() { global $cookie; $so_id = (int) Configuration::get('SOCOLISSIMO_CARRIER_ID'); if (!parent::uninstall() or !Db::getInstance()->Execute('DROP TABLE IF EXISTS`' . _DB_PREFIX_ . 'socolissimo_delivery_info`') or !$this->unregisterHook('extraCarrier') or !$this->unregisterHook('payment') or !$this->unregisterHook('AdminOrder') or !$this->unregisterHook('newOrder') or !$this->unregisterHook('updateCarrier') or !Configuration::deleteByName('SOCOLISSIMO_ID') or !Configuration::deleteByName('SOCOLISSIMO_KEY') or !Configuration::deleteByName('SOCOLISSIMO_URL') or !Configuration::deleteByName('SOCOLISSIMO_OVERCOST') or !Configuration::deleteByName('SOCOLISSIMO_PREPARATION_TIME') or !Configuration::deleteByName('SOCOLISSIMO_CARRIER_ID') or !Configuration::deleteByName('SOCOLISSIMO_SUP') or !Configuration::deleteByName('SOCOLISSIMO_SUP_URL') or !Configuration::deleteByName('SOCOLISSIMO_OVERCOST_TAX')) { return false; } //Delete So Carrier $soCarrier = new Carrier($so_id); //if socolissimo carrier is default set other one as default if (Configuration::get('PS_CARRIER_DEFAULT') == (int) $soCarrier->id) { $carriersD = Carrier::getCarriers((int) $cookie->id_lang); foreach ($carriersD as $carrierD) { if ($carrierD['active'] and !$carrierD['deleted'] and $carrierD['name'] != $this->_config['name']) { Configuration::updateValue('PS_CARRIER_DEFAULT', $carrierD['id_carrier']); } } } //save old carrier id Configuration::updateValue('SOCOLISSIMO_CARRIER_ID_HIST', Configuration::get('SOCOLISSIMO_CARRIER_ID_HIST') . '|' . (int) $soCarrier->id); $soCarrier->deleted = 1; if (!$soCarrier->update()) { return false; } return true; }
public function uninstall() { // If Dejala is default carrier, try to set another one as default $djlCarrier = DejalaCarrierUtils::getCarrierByName($this->name); if (Configuration::get('PS_CARRIER_DEFAULT') == (int) $djlCarrier->id) { $carriers = Carrier::getCarriers($cookie->id_lang, true, false, false, NULL, Carrier::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE); foreach ($carriers as $carrier) { if ($carrier['active'] and !$carrier['deleted'] and $carrier['external_module_name'] != $this->name) { Configuration::updateValue('PS_CARRIER_DEFAULT', (int) $carrier['id_carrier']); break; } } } $djlCarrier->deleted = 1; if (!$djlCarrier->update()) { return false; } $this->dejalaConfig->uninstall(); if (!parent::uninstall() or !$this->unregisterHook('updateOrderStatus') or !$this->unregisterHook('extraCarrier') or !$this->unregisterHook('processCarrier')) { return false; } return true; }
public function uninstall() { $res = true; $res = $this->unregisterHook('ActionCarrierUpdate'); $res = $this->uninstallTab(); //Просто почта России $res = $this->uninstallCarrier($this->carrierId(0)); //Почта России наложенный платеж $res = $this->uninstallCarrier($this->carrierId(1)); $res = $this->RussianPost->dropTable(); Configuration::updateValue('SR_RUSSIAN_POST_TAB_ID', NULL); Configuration::updateValue('SR_RUSSIAN_POST_CARRIER_ID', NULL); Configuration::updateValue('SR_RUSSIAN_POST_CARRIER_COD_ID', NULL); if (!$res || !parent::uninstall()) { return false; } return true; }
public function uninstall() { include dirname(__FILE__) . '/sql/uninstall.php'; return parent::uninstall(); }