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


PHP Mage_Core_Model_Store::getConfig方法代码示例

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


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

示例1: testSetGetConfig

 public function testSetGetConfig()
 {
     /* config operations require store to be loaded */
     $this->_model->load('default');
     $value = $this->_model->getConfig(Mage_Core_Model_Store::XML_PATH_STORE_IN_URL);
     $this->_model->setConfig(Mage_Core_Model_Store::XML_PATH_STORE_IN_URL, 'test');
     $this->assertEquals('test', $this->_model->getConfig(Mage_Core_Model_Store::XML_PATH_STORE_IN_URL));
     $this->_model->setConfig(Mage_Core_Model_Store::XML_PATH_STORE_IN_URL, $value);
     /* Call set before get */
     $this->_model->setConfig(Mage_Core_Model_Store::XML_PATH_USE_REWRITES, 1);
     $this->assertEquals(1, $this->_model->getConfig(Mage_Core_Model_Store::XML_PATH_USE_REWRITES));
     $this->_model->setConfig(Mage_Core_Model_Store::XML_PATH_USE_REWRITES, 0);
 }
开发者ID:relue,项目名称:magento2,代码行数:13,代码来源:StoreTest.php

示例2: sendEmail

 /**
  * Send email to invitee
  *
  * @param string $emailAddress
  * @param Mage_Core_Model_Store $store
  * @param Mage_Customer_Model_Customer $customer
  *
  * @return boolean
  */
 public function sendEmail($emailAddress, $store, $customer)
 {
     $mail = Mage::getModel('core/email_template');
     /* Magento 1.3 stub. */
     if (Mage::helper('points')->magentoLess14()) {
         $store->setFrontendName($store->getGroup()->getName());
     }
     /* Magento 1.3 stub ends */
     try {
         $mail->setDesignConfig(array('area' => 'frontend', 'store' => $store->getStoreId()))->sendTransactional($store->getConfig(self::XML_PATH_EMAIL_TEMPLATE), $store->getConfig(self::XML_PATH_EMAIL_IDENTITY), $this->getEmail(), null, array('url' => $this->prepareUrl($customer, $emailAddress, $store), 'message' => $this->getMessage(), 'store' => $store, 'customer' => $customer));
         if ($mail->getSentSuccess()) {
             $this->setStatus(self::INVITATION_SENT)->setUpdateDate(true)->save();
             return true;
         }
     } catch (Exception $exc) {
         Mage::helper('awcore/logger')->log($this, Mage::helper('points')->__('Error on saving invitation data for email: %s', $emailAddress), AW_Core_Model_Logger::LOG_SEVERITY_ERROR, $exc->getTraceAsString());
     }
     return false;
 }
开发者ID:HPTTeam,项目名称:hackathon,代码行数:28,代码来源:Invitation.php

示例3: getConfig

 /**
  * Retrieve store configuration data
  *
  * @param   string $path
  * @param   string $scope
  * @return  string|null
  */
 public function getConfig($path)
 {
     if ($this->_active) {
         if ($this->_config == null) {
             $this->_loadOverrideConfigFile();
         }
         if (isset($this->_config[$path])) {
             return $this->_config[$path];
         }
     }
     return parent::getConfig($path);
 }
开发者ID:beejhuff,项目名称:Magento-Yellowmix_ConfigOverride,代码行数:19,代码来源:Store.php

示例4: processEmailEventsForSingleStore

 public function processEmailEventsForSingleStore(Mage_Core_Model_Store $store)
 {
     if ($store->getConfig('mailgun/events/store')) {
         $data = array('end' => date("r", time() - 86400), 'tags' => $store->getConfig('mailgun/general/tag'));
         $mailgunEvents = $this->mailgunRequest('events', $store->getConfig('mailgun/general/domain'), $store->getConfig('mailgun/general/key'), $data);
         $events = $mailgunEvents->items;
         while (sizeof($mailgunEvents->items) > 0) {
             $mailgunEvents = $this->mailgunRequest('events', $store->getConfig('mailgun/general/domain'), $store->getConfig('mailgun/general/key'), $data, Zend_Http_Client::GET, $mailgunEvents->paging->next);
             $events = array_merge($events, $mailgunEvents->items);
         }
         $this->storeEvents($events);
     }
 }
开发者ID:reidblomquist,项目名称:mailgun_magento,代码行数:13,代码来源:Mailgun.php

示例5: getAmounts

 /**
  * Get amounts by product and store
  *
  * @param int $product
  * @param Mage_Core_Model_Store $store
  * @return array
  */
 public function getAmounts($product, $store)
 {
     $isGlobal = $store->getConfig(Mage_Core_Model_Store::XML_PATH_PRICE_SCOPE) == Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL;
     if ($isGlobal) {
         $key = $product;
     } else {
         $website = $store->getWebsiteId();
         $key = "{$product}|{$website}";
     }
     $read = $this->_getReadAdapter();
     if (!isset($this->_cache[$key])) {
         $select = $read->select()->from($this->getTable('enterprise_giftcard/amount'), array('value', 'website_id'))->where('entity_id = ?', $product);
         $bind = array('product_id' => $product);
         if ($isGlobal) {
             $select->where('website_id = 0');
         } else {
             $select->where('website_id IN (0, :website_id)');
             $bind['website_id'] = $website;
         }
         $fetched = $read->fetchAll($select, $bind);
         $this->_cache[$key] = $this->_convertPrices($fetched, $store);
     }
     return $this->_cache[$key];
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:31,代码来源:Giftcard.php

示例6: getCookieRestrictionLifetime

 /**
  * Get cookie restriction lifetime (in seconds)
  *
  * @return int
  */
 public function getCookieRestrictionLifetime()
 {
     return (int) $this->_currentStore->getConfig(self::XML_PATH_COOKIE_RESTRICTION_LIFETIME);
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:9,代码来源:Cookie.php

示例7: getFrontendPolicy

 /**
  * Get frontend policy
  *
  * @return string|null
  */
 public function getFrontendPolicy()
 {
     return $this->_getDomainPolicyByCode((int) (string) $this->_store->getConfig(self::XML_DOMAIN_POLICY_FRONTEND));
 }
开发者ID:test3metizsoft,项目名称:test,代码行数:9,代码来源:Domainpolicy.php

示例8: loadData

 /**
  * Loads the meta data for the given store.
  *
  * @param Mage_Core_Model_Store $store the store view to load the data for.
  */
 public function loadData(Mage_Core_Model_Store $store)
 {
     $this->_country = $store->getConfig('general/country/default');
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:9,代码来源:Billing.php

示例9: _getConfigValueWithDefault

 protected function _getConfigValueWithDefault(Mage_Core_Model_Store $store, $path, $default = null)
 {
     $value = $store->getConfig($path);
     if (is_null($value) || '' === $value) {
         $value = $default;
     }
     return $value;
 }
开发者ID:gewaechshaus,项目名称:groupscatalog2,代码行数:8,代码来源:Migration.php

示例10: _isLiveCategoryProductReindexEnabled

 /**
  * Retrieves category/product indexer mode
  *
  * @return boolean
  */
 protected function _isLiveCategoryProductReindexEnabled()
 {
     return (bool) (string) $this->_store->getConfig(self::XML_PATH_LIVE_CATEGORY_PRODUCT_REINDEX_ENABLED);
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:9,代码来源:Product.php

示例11: loadData

 /**
  * Loads the meta data for the given store.
  *
  * @param Mage_Core_Model_Store $store the store view to load the data for.
  */
 public function loadData(Mage_Core_Model_Store $store)
 {
     /** @var Mage_Admin_Model_User $user */
     /** @noinspection PhpUndefinedMethodInspection */
     $user = Mage::getSingleton('admin/session')->getUser();
     /** @var Nosto_Tagging_Helper_Url $urlHelper */
     $urlHelper = Mage::helper('nosto_tagging/url');
     /** @var Nosto_Tagging_Helper_Data $dataHelper */
     $dataHelper = Mage::helper('nosto_tagging/data');
     $this->_firstName = $user->getFirstname();
     $this->_lastName = $user->getLastname();
     $this->_email = $user->getEmail();
     $this->_languageIsoCode = substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);
     $this->_languageIsoCodeShop = substr($store->getConfig('general/locale/code'), 0, 2);
     $this->_uniqueId = $dataHelper->getInstallationId();
     $this->_previewUrlProduct = $urlHelper->getPreviewUrlProduct($store);
     $this->_previewUrlCategory = $urlHelper->getPreviewUrlCategory($store);
     $this->_previewUrlSearch = $urlHelper->getPreviewUrlSearch($store);
     $this->_previewUrlCart = $urlHelper->getPreviewUrlCart($store);
     $this->_previewUrlFront = $urlHelper->getPreviewUrlFront($store);
     $this->_shopName = $store->getName();
 }
开发者ID:nosto,项目名称:nosto-magento-extension,代码行数:27,代码来源:Iframe.php

示例12: getDefaultAdjustment

 public function getDefaultAdjustment(Mage_Core_Model_Store $store)
 {
     return round(floatval($store->getConfig('shipping/lokey_shippingadjustments/default_pisa_amount')), 2);
 }
开发者ID:xxorax,项目名称:Lokey_PerItemShipping,代码行数:4,代码来源:Data.php

示例13: addStoreLog

 /**
  * Add a logger if store configuration allows
  *
  * @param string $loggerKey
  * @param Mage_Core_Model_Store $store
  */
 public function addStoreLog($loggerKey, Mage_Core_Model_Store $store)
 {
     if ($store->getConfig('dev/log/active')) {
         $this->addStreamLog($loggerKey);
     }
 }
开发者ID:,项目名称:,代码行数:12,代码来源:

示例14: loadData

 /**
  * Loads the meta data for the given store.
  *
  * @param Mage_Core_Model_Store $store the store view to load the data for.
  */
 public function loadData(Mage_Core_Model_Store $store)
 {
     $this->_title = $store->getWebsite()->getName() . ' - ' . $store->getGroup()->getName() . ' - ' . $store->getName();
     $this->_name = substr(sha1(rand()), 0, 8);
     $this->_frontPageUrl = NostoHttpRequest::replaceQueryParamInUrl('___store', $store->getCode(), $store->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
     $this->_currencyCode = $store->getBaseCurrencyCode();
     $this->_languageCode = substr($store->getConfig('general/locale/code'), 0, 2);
     $this->_ownerLanguageCode = substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);
     /** @var Nosto_Tagging_Model_Meta_Account_Owner $owner */
     $owner = Mage::getModel('nosto_tagging/meta_account_owner');
     $owner->loadData($store);
     $this->_owner = $owner;
     /** @var Nosto_Tagging_Model_Meta_Account_Billing $billing */
     $billing = Mage::getModel('nosto_tagging/meta_account_billing');
     $billing->loadData($store);
     $this->_billing = $billing;
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:22,代码来源:Account.php

示例15: detectAskAndSetDeveloperIp

 /**
  * Determine if a developer restriction is in place, and if we're enabling something that will use it
  * then notify and ask if it needs to be changed from its current value.
  *
  * @param  \Mage_Core_Model_Store $store
  * @param  bool                   $enabled
  * @return void
  */
 protected function detectAskAndSetDeveloperIp(\Mage_Core_Model_Store $store, $enabled)
 {
     if (!$enabled) {
         // No need to notify about developer IP restrictions if we're disabling template hints etc
         return;
     }
     /** @var OutputInterface $output */
     $output = $this->getHelper('io')->getOutput();
     if (!($devRestriction = $store->getConfig('dev/restrict/allow_ips'))) {
         return;
     }
     $this->askAndSetDeveloperIp($output, $store, $devRestriction);
 }
开发者ID:netz98,项目名称:n98-magerun,代码行数:21,代码来源:AbstractMagentoStoreConfigCommand.php


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