当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Core_Model_Resource_Setup::endSetup方法代码示例

本文整理汇总了PHP中Mage_Core_Model_Resource_Setup::endSetup方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Resource_Setup::endSetup方法的具体用法?PHP Mage_Core_Model_Resource_Setup::endSetup怎么用?PHP Mage_Core_Model_Resource_Setup::endSetup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Core_Model_Resource_Setup的用法示例。


在下文中一共展示了Mage_Core_Model_Resource_Setup::endSetup方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: endSetup

 public function endSetup()
 {
     $cacheKey = Mage::helper('M2ePro/Module')->getName() . '_VERSION_UPDATER';
     Mage::app()->getCache()->remove($cacheKey);
     Mage::helper('M2ePro/Data')->removeAllCacheValues();
     return parent::endSetup();
 }
开发者ID:par-orillonsoft,项目名称:app,代码行数:7,代码来源:MySqlSetup.php

示例2: installSampleDB_

 /**
  * Instal Sample database
  *
  * $data = array(
  *      [db_host]
  *      [db_name]
  *      [db_user]
  *      [db_pass]
  * )
  *
  * @param array $data
  */
 public function installSampleDB_($data)
 {
     $config = array('host' => $data['db_host'], 'username' => $data['db_user'], 'password' => $data['db_pass'], 'dbname' => $data['db_name']);
     $connection = Mage::getSingleton('core/resource')->createConnection('core_setup', $this->_getConnenctionType(), $config);
     $installer = new Mage_Core_Model_Resource_Setup('core_setup');
     $installer->startSetup();
     //Get content from sample data
     //Default sample data
     //$tablePrefix = (string)Mage::getConfig()->getTablePrefix();
     $tablePrefix = $data['db_prefix'];
     $base_url = $data['unsecure_base_url'];
     $base_surl = $base_url;
     if (!empty($data['use_secure'])) {
         $base_surl = $data['secure_base_url'];
     }
     /* Run sample_data.sql if found, by pass default sample data from Magento */
     $file = Mage::getConfig()->getBaseDir() . '/sql/sample_data.sql';
     if (is_file($file) && ($sqls = file_get_contents($file))) {
         $sqls = str_replace('#__', $tablePrefix, $sqls);
         $installer->run($sqls);
     } else {
         $file = Mage::getConfig()->getBaseDir() . '/sql/magento_sample_data_for_1.2.0.sql';
         if (is_file($file) && ($sqls = file_get_contents($file))) {
             $sqls = str_replace('#__', $tablePrefix, $sqls);
             $installer->run($sqls);
         }
     }
     $installer->run("\n\t\t\tUPDATE `{$tablePrefix}core_config_data` SET `value`='{$base_url}' where `path`='web/unsecure/base_url';\n\t\t\tUPDATE `{$tablePrefix}core_config_data` SET `value`='{$base_surl}' where `path`='web/secure/base_url';\n\t\t");
     $installer->endSetup();
 }
开发者ID:xiaoguizhidao,项目名称:autotech_design,代码行数:42,代码来源:Sample.php

示例3: endSetup

 public function endSetup()
 {
     $this->removeConfigDuplicates();
     $this->updateInstallationVersionHistory();
     Mage::helper('M2ePro/Module')->clearCache();
     return parent::endSetup();
 }
开发者ID:xiaoguizhidao,项目名称:ecommerce,代码行数:7,代码来源:MySqlSetup.php

示例4: installQuickstartDB_

    public function installQuickstartDB_ ($data) {
        $config = array(
            'host'      => $data['db_host'],
            'username'  => $data['db_user'],
            'password'  => $data['db_pass'],
            'dbname'    => $data['db_name']
        );
        $connection = Mage::getSingleton('core/resource')->createConnection('core_setup', $this->_getConnenctionType(), $config);

        $installer = new Mage_Core_Model_Resource_Setup('core_setup');
		$installer->startSetup();
		//Get content from quickstart data
		$tablePrefix = $data['db_prefix'];
		$base_url = $data['unsecure_base_url'];
		$base_surl = $base_url;
		if (!empty($data['use_secure'])) $base_surl = $data['secure_base_url'];
		$file = Mage::getConfig()->getBaseDir().'/sql/'.$this->quickstart_db_name;
		if (is_file($file) && ($sqls = file_get_contents ($file))) {
			$sqls = str_replace ('#__', $tablePrefix, $sqls);
			$installer->run ($sqls);
		}
		
		$installer->run ("
			UPDATE `{$tablePrefix}core_config_data` SET `value`='$base_url' where `path`='web/unsecure/base_url';
			UPDATE `{$tablePrefix}core_config_data` SET `value`='$base_surl' where `path`='web/secure/base_url';
		"
		);
		
		$installer->endSetup();
    }
开发者ID:amal-nibaya,项目名称:PB-BEERSHOP,代码行数:30,代码来源:Quickstart.php

示例5: endSetup

 public function endSetup()
 {
     $this->removeConfigDuplicates();
     Mage::helper('M2ePro/Module')->clearCache();
     return parent::endSetup();
 }
开发者ID:ashfaqphplhr,项目名称:artificiallawnsforturf,代码行数:6,代码来源:MySqlSetup.php

示例6: reinstallAction

 public function reinstallAction()
 {
     $installer = new Mage_Core_Model_Resource_Setup('core_setup');
     $installer->startSetup();
     $installer->run("\n\t\t\tDELETE FROM {$installer->getTable('core_resource')} WHERE `{$installer->getTable('core_resource')}`.`code` = 'webpos_setup';\n\t\t");
     $installer->endSetup();
     echo $this->__('Successfully! Please refresh magento cache to get the new version');
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:8,代码来源:ProductController.php

示例7: endSetup

 public function endSetup()
 {
     Mage::helper('M2ePro/Module')->clearCache();
     return parent::endSetup();
 }
开发者ID:xiaoguizhidao,项目名称:beut,代码行数:5,代码来源:MySqlSetup.php

示例8: endSetup

 public function endSetup()
 {
     parent::endSetup();
     $this->afterFileExecution();
     if ($this->isLockFileExists() && @file_get_contents($this->getLockFilePath()) != $this->lockId) {
         exit;
     }
     return $this;
 }
开发者ID:sergoslav,项目名称:magento-extension,代码行数:9,代码来源:MySqlSetup.php

示例9: updatedb23Action


//.........这里部分代码省略.........
         $installer->run(" ALTER TABLE {$installer->getTable('sales/order')} ADD `till_id` int(11) unsigned NOT NULL DEFAULT 0; ");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'location_id')) {
         $installer->run(" ALTER TABLE {$installer->getTable('sales/order')} ADD `location_id` int(11) unsigned NOT NULL DEFAULT 0; ");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/quote_payment'), 'ccforpos_ref_no')) {
         $installer->run(" ALTER TABLE {$installer->getTable('sales/quote_payment')} ADD `ccforpos_ref_no` VARCHAR( 255 ) NOT NULL; ");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order_payment'), 'ccforpos_ref_no')) {
         $installer->run(" ALTER TABLE {$installer->getTable('sales/order_payment')} ADD `ccforpos_ref_no` VARCHAR( 255 ) NOT NULL; ");
     }
     if (!$webposHelper->columnExist($installer->getTable('webpos_order'), 'till_id')) {
         $installer->run(" ALTER TABLE {$installer->getTable('webpos_order')} ADD `till_id` int(11) unsigned NOT NULL DEFAULT 0; ");
     }
     if (!$webposHelper->columnExist($installer->getTable('webpos_order'), 'location_id')) {
         $installer->run(" ALTER TABLE {$installer->getTable('webpos_order')} ADD `location_id` int(11) unsigned NOT NULL DEFAULT 0; ");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'webpos_cash')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/order')} ADD COLUMN `webpos_cash` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'webpos_base_cash')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/order')} ADD COLUMN `webpos_base_cash` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/invoice'), 'webpos_cash')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/invoice')} ADD COLUMN `webpos_cash` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/invoice'), 'webpos_base_cash')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/invoice')} ADD COLUMN `webpos_base_cash` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'webpos_ccforpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/order')} ADD COLUMN `webpos_ccforpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'webpos_base_ccforpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/order')} ADD COLUMN `webpos_base_ccforpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/invoice'), 'webpos_ccforpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/invoice')} ADD COLUMN `webpos_ccforpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/invoice'), 'webpos_base_ccforpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/invoice')} ADD COLUMN `webpos_base_ccforpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'webpos_cp1forpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/order')} ADD COLUMN `webpos_cp1forpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'webpos_base_cp1forpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/order')} ADD COLUMN `webpos_base_cp1forpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/invoice'), 'webpos_cp1forpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/invoice')} ADD COLUMN `webpos_cp1forpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/invoice'), 'webpos_base_cp1forpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/invoice')} ADD COLUMN `webpos_base_cp1forpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'webpos_cp2forpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/order')} ADD COLUMN `webpos_cp2forpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'webpos_base_cp2forpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/order')} ADD COLUMN `webpos_base_cp2forpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/invoice'), 'webpos_cp2forpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/invoice')} ADD COLUMN `webpos_cp2forpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/invoice'), 'webpos_base_cp2forpos')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/invoice')} ADD COLUMN `webpos_base_cp2forpos` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'webpos_change')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/order')} ADD COLUMN `webpos_change` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/order'), 'webpos_base_change')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/order')} ADD COLUMN `webpos_base_change` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/invoice'), 'webpos_change')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/invoice')} ADD COLUMN `webpos_change` decimal(12,4) NOT NULL default '0'");
     }
     if (!$webposHelper->columnExist($installer->getTable('sales/invoice'), 'webpos_base_change')) {
         $installer->run("ALTER TABLE {$installer->getTable('sales/invoice')} ADD COLUMN `webpos_base_change` decimal(12,4) NOT NULL default '0'");
     }
     $installer->endSetup();
     $installer = new Mage_Eav_Model_Entity_Setup();
     $installer->startSetup();
     $fieldList = array('tax_class_id');
     foreach ($fieldList as $field) {
         $applyTo = explode(',', $installer->getAttribute(Mage_Catalog_Model_Product::ENTITY, $field, 'apply_to'));
         if (!in_array('customsale', $applyTo)) {
             $applyTo[] = 'customsale';
             $installer->updateAttribute(Mage_Catalog_Model_Product::ENTITY, $field, 'apply_to', implode(',', $applyTo));
         }
     }
     $installer->endSetup();
     $product = Mage::getModel('catalog/product');
     $product->getIdBySku('webpos-customsale');
     if ($product->getId()) {
         try {
             $product->setData('tax_class_id', 0);
             $product->save();
         } catch (Exception $e) {
             Zend_debug::dump($e->getMessage());
         }
     }
 }
开发者ID:javik223,项目名称:Evron-Magento,代码行数:101,代码来源:ProductController.php


注:本文中的Mage_Core_Model_Resource_Setup::endSetup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。