本文整理汇总了PHP中Mage_Core_Model_Store::resetConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Store::resetConfig方法的具体用法?PHP Mage_Core_Model_Store::resetConfig怎么用?PHP Mage_Core_Model_Store::resetConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Store
的用法示例。
在下文中一共展示了Mage_Core_Model_Store::resetConfig方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetProductNrRiskCheckAdvanced
public function testGetProductNrRiskCheckAdvanced()
{
$path = 'scoring/buergel/services';
$this->store->resetConfig();
$this->store->setConfig($path, Netresearch_Buergel_Model_System_Source_Service::RISKCHECK_ADVANCED);
$this->config = Mage::getModel('buergel/config');
$this->config->reset();
$this->config->setIsCompanyAddress(false);
$this->assertEquals(Netresearch_Buergel_Model_System_Source_Service::RISKCHECK_ADVANCED, $this->config->getProductNr());
$this->config->setIsCompanyAddress();
$this->assertEquals(Netresearch_Buergel_Model_System_Source_Service::RISKCHECK_ADVANCED, $this->config->getProductNr());
$this->config->reset();
}
示例2: setLastTimeGenerated
/**
* Set last time when files were generated
*
* @param Zend_Date $lastTime
* @param Mage_Core_Model_Store $store
*/
public function setLastTimeGenerated(Zend_Date $lastTime = null, $store)
{
if (!$lastTime) {
$lastTime = Zend_Date::now();
}
$scope = $store ? 'stores' : 'default';
$scopeId = $store ? $store->getId() : 0;
$path = self::XML_PATH_LAST_TIME_GENERATED_DATE;
$configDataCollection = Mage::getModel('core/config_data')->getCollection()->addFieldToFilter('scope', $scope)->addFieldToFilter('scope_id', $scopeId)->addFieldToFilter('path', array('eq' => $path))->load();
if (count($configDataCollection)) {
$configDataCollection->getFirstItem()->setValue($lastTime->toString(Zend_Date::ISO_8601))->save();
} else {
Mage::getModel('core/config_data')->setPath(self::XML_PATH_LAST_TIME_GENERATED_DATE)->setValue($lastTime->toString(Zend_Date::ISO_8601))->setScope($scope)->setScopeId($scopeId)->save();
}
$store->resetConfig();
}