Jump to content

eibrahimov

Members
  • Posts

    8
  • Joined

  • Last visited

About eibrahimov

  • Birthday 07/02/1985

Contact Methods

Profile Information

  • Location
    Azerbaijan, Baku
  • Activity
    Freelancer

Recent Profile Visitors

2,763,618 profile views

eibrahimov's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Hi guys, In some times my customers wrote me that module helper tables not created in database. Because, all privileges Granted. How do you think about this? Thank for all. module install code: public function install() { // Prepare tab $tab = new Tab(); $tab->active = 1; $tab->class_name = 'AdminMigrationPro'; $tab->name = array(); foreach (Language::getLanguages(true) as $lang) { $tab->name[$lang['id_lang']] = 'MigrationPro'; } $tab->id_parent = -1; $tab->module = $this->name; include(dirname(__FILE__) . '/sql/install.php'); if (!$tab->add() || !parent::install() || !$this->registerHook('header') || !$this->registerHook('backOfficeHeader') ) { return false; } return true; } install.php $sql = array(); $sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'migrationpro_data`; CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'migrationpro_data` ( `id_data` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(3) NOT NULL, `source_id` int(11) NOT NULL, `local_id` int(11) NOT NULL, PRIMARY KEY (`id_data`), UNIQUE KEY `type_source_id` (`type`,`source_id`), KEY `type` (`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;'; $sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'migrationpro_mapping`; CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'migrationpro_mapping` ( `id_mapping` int(255) NOT NULL AUTO_INCREMENT, `type` varchar(255) NOT NULL, `source_id` int(11) NOT NULL, `source_name` varchar(255) NOT NULL, `local_id` int(11) DEFAULT NULL, PRIMARY KEY (`id_mapping`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;'; $sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'migrationpro_process`; CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'migrationpro_process` ( `id_process` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(100) NOT NULL, `total` int(11) NOT NULL, `imported` int(11) NOT NULL, `id_source` int(11) NOT NULL, `error` int(11) NOT NULL, `point` int(11) NOT NULL, `time_start` timestamp NOT NULL, `finish` tinyint(1) NOT NULL, PRIMARY KEY (`id_process`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;'; foreach ($sql as $query) { if (Db::getInstance()->execute($query) == false) { return false; } }
  2. Hey There, Baybe this tools can help migrate. This module can help migrate from all version to other PrestaShop. http://addons.prestashop.com/en/8934-migrationpro-migration-prestashop-to-prestashop.html
  3. From the ObjectModel class has attribute "force_id". I love PrestaShop. /** @var bool Enables to define an ID before adding object. */ public $force_id = false;
  4. I want check if ID reserved in DB, delete it and add new record with this ID. It's for if not (for example) ID 2 in database create record with ID 2. It's need to our current task. Thank you. have any ideas? $model = new TaxRulesGroup(2); $model->delete(); $model->id = 2; $model->id_tax_rules_group = 2; $model->name = 'new name'; $model->active = 1; $model->add();
  5. All data migration to 1.5, 1.6 CSV import/export Module This module can help you. Export/Import all favorite data from prestashop from 1.4 to 1.5/1.6 & 1.5 to 1.6 This module allows you to export any size all data(Categories, Products, Combinations, Customers, Addresses, Manufacturers, Suppliers) from PrestaShop 1.4.X to PrestaShop 1.5.X and 1.6.X. Also from 1.5.X to 1.6.X without data lose. Usage of this module doesn’t require any special technical skills, it is easy to use. It help you to save your time from routine work of manual data migration. http://addons.prestashop.com/en/export-modules/8934-all-data-migration-to-15-16-csv-import-export.html This module can help you. Export/Import all favorite data from prestashop from 1.4 to 1.5/1.6 & 1.5 to 1.6
  6. Hi there. This module can help. Export/Import all favorite data from prestashop 1.4.x to 1.5.x
×
×
  • Create New...