Example #1
0
 /**
  * Additionally imports category description
  * @param boolean $shopSystem If is true, we import from xtc
  */
 public function importCategories($shopSystem)
 {
     $sOcmDb = $this->_sOcmDb;
     $iLangCount = $this->_iLangCount;
     $sShopId = $this->_sShopId;
     parent::importCategories($shopSystem);
     //Importing category description
     for ($i = 1; $i <= $iLangCount; $i++) {
         $sLangSuffix = getLangSuffix($i);
         $sQ = "\r\n              UPDATE oxcategories, (SELECT categories_id, categories_heading_title, categories_description FROM {$sOcmDb}.categories_description WHERE language_id = {$i}) AS src S\r\n                ET oxlongdesc{$sLangSuffix} = src.categories_description, oxdesc{$sLangSuffix} = src.categories_heading_title WHERE  src.categories_id = oxid";
         oxDb::getDb(true)->Execute($sQ);
     }
 }
Example #2
0
 public function DoMigrate()
 {
     set_time_limit(0);
     $set = $_SESSION['xtc2oxidui'];
     $oxiddir = $set['oxid-install-dir'];
     $this->InitOxid($oxiddir);
     global $myConfig;
     $myConfig = oxRegistry::getConfig();
     $xtc = (bool) ($set['oxid-xtc-shoptype'] == 'xtc');
     global $iLangCount;
     //some magic value from xtc2oxid.php
     $iLangCount = 4;
     global $sOcmDb;
     $sOcmDb = $set['oxid-xtc-db'];
     global $sOscImageDir;
     $sOscImageDir = $set['oxid-xtc-imgdir'];
     global $sXtcLangId;
     global $payment_types;
     $payment_types = array('banktransfer' => 'oxiddebitnote', 'cash' => 'oxcash', 'cc' => 'oxidcreditcard', 'cod' => 'oxidcashondel', 'eustandardtransfer' => 'oxidinvoice', 'invoice' => 'oxidinvoice', 'ipayment' => 'oxidcreditcard', 'moneyorder' => 'oxidinvoice', 'paypal' => 'oxpaypal', 'uos_kreditkarte_modul' => 'oxidcreditcard', 'uos_lastschrift_at_modul' => 'oxiddebitnote', 'uos_lastschrift_de_modul' => 'oxiddebitnote', 'uos_vorkasse_modul' => 'oxidpayadvance');
     if (true === $xtc) {
         $oIHandler = new XtImportHandler($myConfig->getBaseShopId());
     } else {
         $oIHandler = new ImportHandler($myConfig->getBaseShopId());
     }
     if (true == $set['oxid-xtc-dbcleanup']) {
     }
     $oIHandler->setLanguages();
     $html = '';
     //db cleanup
     if (true == $this->GetSettingFromRequest('oxid-xtc-dbcleanup', true)) {
         $html .= '<b>Cleanup Database:</b> done<br/>';
         $oIHandler->cleanUpBeforeImport();
     }
     //customers
     if (true == $this->GetSettingFromRequest('oxid-import-customers', true)) {
         $html .= '<b>Migrate Customers:</b> done<br/>';
         $html .= $this->MigrateCustomers($oIHandler, $xtc);
         $html .= '<br/>';
     }
     //manu
     if (true == $this->GetSettingFromRequest('oxid-import-manufacturers', true)) {
         $html .= '<b>Migrate Manufacturers:</b> done<br/>';
         $html .= $this->MigrateManufacturers($oIHandler);
         $html .= '<br/>';
     }
     if (true == $this->GetSettingFromRequest('oxid-import-categories', true)) {
         $html .= '<b>Migrate Categories:</b> done<br/>';
         $html .= $this->MigrateCategories($oIHandler, $xtc);
         $html .= '<br/>';
     }
     if (true == $this->GetSettingFromRequest('oxid-import-products', true)) {
         $html .= '<b>Migrate Products:</b> done<br/>';
         $html .= $this->MigrateProducts($oIHandler, $xtc);
         $html .= '<br/>';
         if (true == $this->GetSettingFromRequest('oxid-import-products-reviews', true)) {
             $html .= '<b>Migrate Products Review:</b> done<br/>';
             $html .= $this->MigrateProductsReviews($oIHandler);
             $html .= '<br/>';
         }
         if (true == $this->GetSettingFromRequest('oxid-import-products-variants', true)) {
             $html .= '<b>Migrate Products Variants:</b> done<br/>';
             $manu = $this->MigrateProductsVariants($oIHandler);
             $html .= '<br/>';
         }
         if (true == $this->GetSettingFromRequest('oxid-import-products-extended', true)) {
             $html .= '<b>Migrate Products Extended Info:</b> done<br/>';
             $manu = $this->MigrateProductsExtendedInfo($oIHandler);
             $html .= '<br/>';
         }
     }
     if (true == $this->GetSettingFromRequest('oxid-import-orders', true)) {
         $html .= '<b>Migrate Orders:</b> done<br/>';
         $manu = $this->MigrateOrders($oIHandler);
         $html .= '<br/>';
     }
     if (true == $this->GetSettingFromRequest('oxid-import-images', true)) {
         $html .= '<b>Migrate Images:</b> done<br/>';
         $manu = $this->MigrateImages($oIHandler);
         $html .= '<br/>';
     }
     $tmpl = new XTC2OXIDUI_Template(XTC2OXIDUI_BASEDIR . '/tmpl/step4.html');
     $tmpl->Set('{RESULT}', $html);
     echo $tmpl->Render();
 }