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


PHP Mage::getStoreConfig方法代码示例

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


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

示例1: getLinksTitle

 /**
  * Return Links Section Title for order item
  *
  * @return string
  */
 public function getLinksTitle()
 {
     if ($this->_purchasedLinks->getLinkSectionTitle()) {
         return $this->_purchasedLinks->getLinkSectionTitle();
     }
     return Mage::getStoreConfig(Mage_Downloadable_Model_Link::XML_PATH_LINKS_TITLE);
 }
开发者ID:ravi2jdesign,项目名称:solvingmagento_1.7.0,代码行数:12,代码来源:Abstract.php

示例2: _toHtml

 protected function _toHtml()
 {
     if (is_link(dirname(Mage::getModuleDir('', 'PostcodeNl_Api'))) && !Mage::getStoreConfig('dev/template/allow_symlink')) {
         throw new Mage_Core_Exception('Postcode.nl API Development: Symlinks not enabled! (set at Admin->System->Configuration->Advanced->Developer->Template Settings)');
     }
     return parent::_toHtml();
 }
开发者ID:technomagegithub,项目名称:olgo.nl,代码行数:7,代码来源:Jsinit.php

示例3: getConfig

 public function getConfig()
 {
     if ($this->getData('config') == null) {
         $this->setConfig(new Varien_Object(Mage::getStoreConfig(self::CONFIG_BASE_PATH . $this->_configKey, $this->getSitemap()->getStoreId())));
     }
     return $this->getData('config');
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:7,代码来源:Abstract.php

示例4: addBlogSection

 public function addBlogSection($observer)
 {
     $sitemapObject = $observer->getSitemapObject();
     if (!$sitemapObject instanceof Mage_Sitemap_Model_Sitemap) {
         throw new Exception(Mage::helper('blog')->__('Error during generation sitemap'));
     }
     $storeId = $sitemapObject->getStoreId();
     $date = Mage::getSingleton('core/date')->gmtDate('Y-m-d');
     $baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
     /**
      * Generate blog pages sitemap
      */
     $changefreq = (string) Mage::getStoreConfig('sitemap/blog/changefreq');
     $priority = (string) Mage::getStoreConfig('sitemap/blog/priority');
     $collection = Mage::getModel('blog/blog')->getCollection()->addStoreFilter($storeId);
     Mage::getSingleton('blog/status')->addEnabledFilterToCollection($collection);
     $route = Mage::getStoreConfig('blog/blog/route');
     if ($route == "") {
         $route = "blog";
     }
     foreach ($collection as $item) {
         $xml = sprintf('<url><loc>%s</loc><lastmod>%s</lastmod><changefreq>%s</changefreq><priority>%.1f</priority></url>', htmlspecialchars($baseUrl . $route . '/' . $item->getIdentifier()), $date, $changefreq, $priority);
         $sitemapObject->sitemapFileAddLine($xml);
     }
     unset($collection);
 }
开发者ID:technomagegithub,项目名称:colb2b,代码行数:26,代码来源:Observer.php

示例5: _prepareForm

 /**
  * Prepare form before rendering HTML
  * Setting Form Fieldsets and fields
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $this->setForm($form);
     $data = Mage::helper('xmlconnect')->getApplication()->getFormData();
     $yesNoValues = Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray();
     $fieldset = $form->addFieldset('flurryAnalytics', array('legend' => $this->__('Flurry Analytics')));
     if (isset($data['conf[native][merchantFlurryTracking][isActive]'])) {
         $isActiveValue = $data['conf[native][merchantFlurryTracking][isActive]'];
     } else {
         $isActiveValue = '0';
     }
     $enabled = $fieldset->addField('conf/native/merchantFlurryTracking/isActive', 'select', array('label' => $this->__('Enable Flurry Analytics'), 'name' => 'conf[native][merchantFlurryTracking][isActive]', 'values' => $yesNoValues, 'note' => $this->__('Enable Flurry Analytics for the merchant.'), 'value' => $isActiveValue));
     $flurryAnalyticsUrl = $this->escapeHtml(Mage::getStoreConfig('xmlconnect/flurry_analytics/statistics_url'));
     $fieldset->addField('flurry_analytics_link', 'link', array('title' => $this->__('Flurry Analytics Site'), 'label' => $this->__('Flurry Analytics Site'), 'value' => $flurryAnalyticsUrl, 'href' => $flurryAnalyticsUrl, 'target' => '__blank', 'note' => $this->__('You can watch statistics here.')));
     if (isset($data['conf[native][merchantFlurryTracking][accountId]'])) {
         $accountIdValue = $data['conf[native][merchantFlurryTracking][accountId]'];
     } else {
         $accountIdValue = '';
     }
     $flurryApiCode = $fieldset->addField('conf/native/merchantFlurryTracking/accountId', 'text', array('label' => $this->__('Flurry API Code'), 'name' => 'conf[native][merchantFlurryTracking][accountId]', 'enabled' => true, 'required' => true, 'value' => $accountIdValue));
     // field dependencies
     $this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence')->addFieldMap($flurryApiCode->getHtmlId(), $flurryApiCode->getName())->addFieldMap($enabled->getHtmlId(), $enabled->getName())->addFieldDependence($flurryApiCode->getName(), $enabled->getName(), 1));
     return parent::_prepareForm();
 }
开发者ID:quyip8818,项目名称:Mag,代码行数:31,代码来源:Flurryanalytics.php

示例6: _toHtml

 protected function _toHtml()
 {
     $rssObj = Mage::getModel('rss/rss');
     $route = Mage::helper('blog')->getRoute();
     $url = $this->getUrl($route);
     $title = Mage::getStoreConfig('blog/blog/title');
     $data = array('title' => $title, 'description' => $title, 'link' => $url, 'charset' => 'UTF-8');
     if (Mage::getStoreConfig('blog/rss/image') != "") {
         $data['image'] = $this->getSkinUrl(Mage::getStoreConfig('blog/rss/image'));
     }
     $rssObj->_addHeader($data);
     $collection = Mage::getModel('blog/blog')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId())->setOrder('created_time ', 'desc');
     $identifier = $this->getRequest()->getParam('identifier');
     $tag = $this->getRequest()->getParam('tag');
     if ($tag) {
         $collection->addTagFilter(urldecode($tag));
     }
     if ($cat_id = Mage::getSingleton('blog/cat')->load($identifier)->getcatId()) {
         Mage::getSingleton('blog/status')->addCatFilterToCollection($collection, $cat_id);
     }
     Mage::getSingleton('blog/status')->addEnabledFilterToCollection($collection);
     $collection->setPageSize((int) Mage::getStoreConfig('blog/rss/posts'));
     $collection->setCurPage(1);
     if ($collection->getSize() > 0) {
         foreach ($collection as $post) {
             $data = array('title' => $post->getTitle(), 'link' => $this->getUrl($route . "/" . $post->getIdentifier()), 'description' => $post->getPostContent(), 'lastUpdate' => strtotime($post->getCreatedTime()));
             $rssObj->_addEntry($data);
         }
     }
     return $rssObj->createRssXml();
 }
开发者ID:votanlean,项目名称:Magento-Pruebas,代码行数:31,代码来源:Rss.php

示例7: sendMailAuthentication

 public function sendMailAuthentication($email, $method)
 {
     //random code
     $account = Mage::getSingleton('affiliateplus/session')->getAccount();
     $length = 6;
     $charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
     $str = '';
     if ($this->getId()) {
         $str = $this->getInfo();
     } else {
         $count = strlen($charset);
         while ($length--) {
             $str .= $charset[mt_rand(0, $count - 1)];
         }
     }
     $sendTo = array('email' => $email, 'name' => $account->getName());
     $store = Mage::app()->getStore();
     /*send authentication code to email*/
     $link = Mage::getUrl('*/*/verifyCode', array('account_id' => $account->getId(), 'payment_method' => $method, 'email' => $email, 'authentication_code' => $str, 'from' => 'email'));
     $translate = Mage::getSingleton('core/translate');
     $translate->setTranslateInline(false);
     $template = Mage::getStoreConfig(self::TEMPLATE_VERIFY_EMAIL, $store->getId());
     $sender = Mage::helper('affiliateplus')->getSenderContact();
     $mailSubject = 'Verify Email Payment';
     $mailTemplate = Mage::getModel('core/email_template');
     try {
         $mailTemplate->setEmailSubject($mailSubject)->sendTransactional($template, $sender, $sendTo['email'], $sendTo['name'], array('store' => $store, 'sender_name' => $sender['name'], 'code' => $str, 'link' => $link, 'name' => $account->getName()), $store->getId());
         return $str;
         $translate->setTranslateInline(true);
     } catch (Exception $e) {
     }
     return;
     /*edit send mail*/
 }
开发者ID:billadams,项目名称:forever-frame,代码行数:34,代码来源:Verify.php

示例8: getCopyright

 public function getCopyright()
 {
     if (!$this->_copyright) {
         $this->_copyright = '<a href="http://www.magazento.com/">Magento Templates</a> ' . Mage::getStoreConfig('design/footer/copyright');
     }
     return $this->_copyright;
 }
开发者ID:sumanyaligar,项目名称:MyMagento--07-10-2015,代码行数:7,代码来源:Footer.php

示例9: getAnimationSpeed

 public function getAnimationSpeed()
 {
     if (!($speed = Mage::getStoreConfig('onsale/configuration/animation_speed'))) {
         $speed = 1000;
     }
     return $speed;
 }
开发者ID:jokusafet,项目名称:MagentoSource,代码行数:7,代码来源:Onsale.php

示例10: __construct

 /**
  * Initialize Price filter module
  *
  */
 public function __construct()
 {
     parent::__construct();
     if (Mage::getStoreConfig('vc_advancedcategoriesmenu/general/enable')) {
         $this->setTemplate('vc_advancedcategoriesmenu/catalog/layer/category/filter.phtml');
     }
 }
开发者ID:hoadaithieu,项目名称:mage-advancedcategoriesmenu,代码行数:11,代码来源:Category.php

示例11: getAllOptions

 /**
  * Retrieve all options array
  *
  * @return array
  */
 public function getAllOptions()
 {
     $taxonomyPath = Mage::getBaseDir() . self::TAXONOMY_FILE_PATH;
     $lang = Mage::getStoreConfig('general/locale/code', Mage::app()->getRequest()->getParam('store', 0));
     $taxonomyFile = $taxonomyPath . "taxonomy-with-ids." . $lang . ".txt";
     if (!file_exists($taxonomyFile)) {
         $taxonomyFile = $taxonomyPath . "taxonomy-with-ids.en_US.txt";
     }
     if (is_null($this->_options)) {
         $this->_options = array();
         $this->_options[0] = array('value' => 0, 'label' => "0 Other");
         if (($fh = fopen($taxonomyFile, "r")) !== false) {
             $line = 0;
             while (($category = fgets($fh)) !== false) {
                 $line++;
                 if ($line === 1) {
                     continue;
                 }
                 // skip first line
                 $option = explode(' - ', $category);
                 $this->_options[] = array('value' => $option[0], 'label' => $category);
             }
         }
     }
     return $this->_options;
 }
开发者ID:portchris,项目名称:NaturalRemedyCompany,代码行数:31,代码来源:GoogleShoppingCategories.php

示例12: canShowSoldBy

 public function canShowSoldBy()
 {
     $canShow = Mage::getStoreConfig("marketplace_configuration/presentation/sold_by");
     $customerGroupConfig = Mage::getStoreConfig('supplierfrontendproductuploader_catalog/supplierfrontendproductuploader_supplier_config/supplier_group_id');
     $editorGroupConfig = Mage::getStoreConfig('supplierfrontendproductuploader_catalog/supplierfrontendproductuploader_supplier_config/editor_group_id');
     $allowedGroups = array();
     if ($canShow) {
         $supplier_id = $this->getSupplierId();
         if (!$supplier_id) {
             return false;
         }
         $customer = Mage::getModel('customer/customer')->load($supplier_id);
         if ($customerGroupConfig != NULL) {
             $allowedGroups[] = $customerGroupConfig;
         }
         if ($editorGroupConfig != NULL) {
             $allowedGroups[] = $editorGroupConfig;
         }
         if (!$customer->getId()) {
             return false;
         }
         if (!$customer->getSupplierProfileVisible()) {
             return false;
         }
         if (!$customer->getSupplierProfileApproved()) {
             return false;
         }
     }
     return $canShow;
 }
开发者ID:programmerrahul,项目名称:vastecom,代码行数:30,代码来源:View.php

示例13: getIsPlusoneEnabled

 public function getIsPlusoneEnabled()
 {
     if (empty($this->_data['google_plusone_enabled'])) {
         $this->_data['google_plusone_enabled'] = (int) Mage::getStoreConfig('tebet_socialshare/button_enabled/google_plusone');
     }
     return $this->_data['google_plusone_enabled'];
 }
开发者ID:LukeCarrier,项目名称:magento-tebet_socialshare,代码行数:7,代码来源:Script.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     if (Mage::getStoreConfig('layerednavigationajax/layerfiler_config/enabled')) {
         $this->setTemplate('magentothem/layerednavigationajax/attribute.phtml');
     }
 }
开发者ID:audiblePi,项目名称:lckwdMyMagnto,代码行数:7,代码来源:Decimal.php

示例15: _toHtml

 /**
  * Generate RSS XML with sales rules data
  *
  * @return string
  */
 protected function _toHtml()
 {
     $storeId = $this->_getStoreId();
     $websiteId = Mage::app()->getStore($storeId)->getWebsiteId();
     $customerGroup = $this->_getCustomerGroupId();
     $now = date('Y-m-d');
     $url = Mage::getUrl('');
     $newUrl = Mage::getUrl('rss/catalog/salesrule');
     $lang = Mage::getStoreConfig('general/locale/code');
     $title = Mage::helper('rss')->__('%s - Discounts and Coupons', Mage::app()->getStore($storeId)->getName());
     /** @var $rssObject Mage_Rss_Model_Rss */
     $rssObject = Mage::getModel('rss/rss');
     /** @var $collection Mage_SalesRule_Model_Resource_Rule_Collection */
     $collection = Mage::getModel('salesrule/rule')->getResourceCollection();
     $data = array('title' => $title, 'description' => $title, 'link' => $newUrl, 'charset' => 'UTF-8', 'language' => $lang);
     $rssObject->_addHeader($data);
     $collection->addWebsiteGroupDateFilter($websiteId, $customerGroup, $now)->addFieldToFilter('is_rss', 1)->setOrder('from_date', 'desc');
     $collection->load();
     foreach ($collection as $sr) {
         $description = '<table><tr>' . '<td style="text-decoration:none;">' . $sr->getDescription() . '<br/>Discount Start Date: ' . $this->formatDate($sr->getFromDate(), 'medium') . ($sr->getToDate() ? '<br/>Discount End Date: ' . $this->formatDate($sr->getToDate(), 'medium') : '') . ($sr->getCouponCode() ? '<br/> Coupon Code: ' . $this->escapeHtml($sr->getCouponCode()) . '' : '') . '</td>' . '</tr></table>';
         $data = array('title' => $sr->getName(), 'description' => $description, 'link' => $url);
         $rssObject->_addEntry($data);
     }
     return $rssObject->createRssXml();
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:30,代码来源:Salesrule.php


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