/**
  * 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);
 }
Example #2
0
 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();
 }
Example #3
0
 public function isStatusNotificationAllow()
 {
     if (Mage::getStoreConfig('rss/order/status_notified')) {
         return true;
     }
     return false;
 }
Example #4
0
 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');
 }
Example #5
0
 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);
 }
Example #6
0
 protected function _toHtml()
 {
     $storeId = $this->_getStoreId();
     $newurl = Mage::getUrl('rss/catalog/new/store_id/' . $storeId);
     $title = Mage::helper('rss')->__('New Products from %s', Mage::app()->getStore()->getGroup()->getName());
     $lang = Mage::getStoreConfig('general/locale/code');
     $rssObj = Mage::getModel('rss/rss');
     $data = array('title' => $title, 'description' => $title, 'link' => $newurl, 'charset' => 'UTF-8', 'language' => $lang);
     $rssObj->_addHeader($data);
     /*
     oringinal price - getPrice() - inputed in admin
     special price - getSpecialPrice()
     getFinalPrice() - used in shopping cart calculations
     */
     $product = Mage::getModel('catalog/product');
     $todayDate = $product->getResource()->formatDate(time());
     $products = $product->getCollection()->setStoreId($storeId)->addStoreFilter()->addAttributeToFilter('news_from_date', array('date' => true, 'to' => $todayDate))->addAttributeToFilter(array(array('attribute' => 'news_to_date', 'date' => true, 'from' => $todayDate), array('attribute' => 'news_to_date', 'is' => new Zend_Db_Expr('null'))), '', 'left')->addAttributeToSort('news_from_date', 'desc')->addAttributeToSelect(array('name', 'short_description', 'description', 'thumbnail'), 'inner')->addAttributeToSelect(array('price', 'special_price', 'special_from_date', 'special_to_date', 'msrp_enabled', 'msrp_display_actual_price_type', 'msrp'), 'left')->applyFrontendPriceLimitations();
     $products->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());
     /*
     using resource iterator to load the data one by one
     instead of loading all at the same time. loading all data at the same time can cause the big memory allocation.
     */
     Mage::getSingleton('core/resource_iterator')->walk($products->getSelect(), array(array($this, 'addNewItemXmlCallback')), array('rssObj' => $rssObj, 'product' => $product));
     return $rssObj->createRssXml();
 }
Example #7
0
 /**
  * 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();
 }
Example #8
0
 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();
 }
Example #9
0
 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*/
 }
 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;
 }
Example #11
0
 public function getAnimationSpeed()
 {
     if (!($speed = Mage::getStoreConfig('onsale/configuration/animation_speed'))) {
         $speed = 1000;
     }
     return $speed;
 }
 /**
  * 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');
     }
 }
 /**
  * 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;
 }
Example #14
0
 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;
 }
 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'];
 }
Example #16
0
 public function __construct()
 {
     parent::__construct();
     if (Mage::getStoreConfig('layerednavigationajax/layerfiler_config/enabled')) {
         $this->setTemplate('magentothem/layerednavigationajax/attribute.phtml');
     }
 }
Example #17
0
 /**
  * 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();
 }
Example #18
0
 public function _construct()
 {
     parent::_construct();
     $this->enabled = intval(Mage::getStoreConfig('payment/ipcpaygate/invipay_widgets_footericon')) && intval(Mage::getStoreConfig('payment/ipcpaygate/active'));
     $this->text = Mage::getStoreConfig('payment/ipcpaygate/title');
     $this->setTemplate('ipcpaygate/widgets/footericon.phtml');
 }
Example #19
0
 /**
  * Return title of samples section
  *
  * @return string
  */
 public function getSamplesTitle()
 {
     if ($this->getProduct()->getSamplesTitle()) {
         return $this->getProduct()->getSamplesTitle();
     }
     return Mage::getStoreConfig(Mage_Downloadable_Model_Sample::XML_PATH_SAMPLES_TITLE);
 }
Example #20
0
 public function getModuleName()
 {
     if (Mage::getStoreConfig('advanced/modules_disable_output/Ess_M2ePro')) {
         return 'Mage_Adminhtml';
     }
     return parent::getModuleName();
 }
Example #21
0
 public function isShow()
 {
     if (!Mage::getStoreConfig('catalog/productalert/allow_price')) {
         return false;
     }
     return true;
 }
Example #22
0
 public function forOrder($orderIncrementId)
 {
     if (!$orderIncrementId) {
         throw new InvalidArgumentException('Order Increment ID not valid');
     }
     $response = $this->_call('search.json', array('query' => 'type:ticket ' . $orderIncrementId, 'sort_order' => 'desc', 'sort_by' => 'updated_at'));
     // Now check through the tickets to make sure the appropriate field has been filled out with the order number
     $tickets = array();
     $fieldId = Mage::getStoreConfig('zendesk/features/order_field_id');
     if (!$fieldId) {
         return false;
     }
     foreach ($response['results'] as $ticket) {
         foreach ($ticket['fields'] as $field) {
             if ($field['id'] == $fieldId) {
                 // Check if the value matches our order number
                 if ($field['value'] == $orderIncrementId) {
                     $tickets[] = $ticket;
                 }
                 // Regardless of whether the value matches, this is the correct field, so move to the next ticket
                 continue;
             }
         }
     }
     if (count($tickets)) {
         return $tickets;
     } else {
         return false;
     }
 }
Example #23
0
 /**
  * Assign page to store views
  *
  * @param Mage_Core_Model_Abstract $object
  */
 protected function _afterSave(Mage_Core_Model_Abstract $object)
 {
     $condition = $this->_getWriteAdapter()->quoteInto('post_id = ?', $object->getId());
     // process faq item to store relation
     $this->_getWriteAdapter()->delete($this->getTable('ves_blog/post_store'), $condition);
     $stores = $object->getData('stores');
     if ($stores) {
         foreach ((array) $object->getData('stores') as $store) {
             $storeArray = array();
             $storeArray['post_id'] = $object->getId();
             $storeArray['store_id'] = $store;
             $this->_getWriteAdapter()->insert($this->getTable('ves_blog/post_store'), $storeArray);
         }
     } else {
         $stores = $object->getStoreId();
         if ($stores) {
             foreach ((array) $stores as $store) {
                 $storeArray = array();
                 $storeArray['post_id'] = $object->getId();
                 $storeArray['store_id'] = $store;
                 $this->_getWriteAdapter()->insert($this->getTable('ves_blog/post_store'), $storeArray);
             }
         }
     }
     //Rewrite blog url
     $resroute = Mage::getStoreConfig('ves_blog/general_setting/route');
     $extension = ".html";
     Mage::getModel('core/url_rewrite')->loadByIdPath('venusblog/post/' . $object->getId())->setIdPath('venusblog/post/' . $object->getId())->setRequestPath($resroute . '/' . $object->getIdentifier() . $extension)->setTargetPath('venusblog/post/view/id/' . $object->getId())->save();
     return parent::_afterSave($object);
 }
Example #24
0
 /**
  * Create Backup
  *
  * @return Mage_Log_Model_Cron
  */
 public function scheduledBackup()
 {
     if (!Mage::getStoreConfigFlag(self::XML_PATH_BACKUP_ENABLED)) {
         return $this;
     }
     if (Mage::getStoreConfigFlag(self::XML_PATH_BACKUP_MAINTENANCE_MODE)) {
         Mage::helper('backup')->turnOnMaintenanceMode();
     }
     $type = Mage::getStoreConfig(self::XML_PATH_BACKUP_TYPE);
     $this->_errors = array();
     try {
         $backupManager = Mage_Backup::getBackupInstance($type)->setBackupExtension(Mage::helper('backup')->getExtensionByType($type))->setTime(time())->setBackupsDir(Mage::helper('backup')->getBackupsDir());
         Mage::register('backup_manager', $backupManager);
         if ($type != Mage_Backup_Helper_Data::TYPE_DB) {
             $backupManager->setRootDir(Mage::getBaseDir())->addIgnorePaths(Mage::helper('backup')->getBackupIgnorePaths());
         }
         $backupManager->create();
         Mage::log(Mage::helper('backup')->getCreateSuccessMessageByType($type));
     } catch (Exception $e) {
         $this->_errors[] = $e->getMessage();
         $this->_errors[] = $e->getTrace();
         Mage::log($e->getMessage(), Zend_Log::ERR);
         Mage::logException($e);
     }
     if (Mage::getStoreConfigFlag(self::XML_PATH_BACKUP_MAINTENANCE_MODE)) {
         Mage::helper('backup')->turnOffMaintenanceMode();
     }
     return $this;
 }
 public function getCarrierName($carrierCode)
 {
     if ($name = Mage::getStoreConfig('carriers/' . $carrierCode . '/title')) {
         return $name;
     }
     return $carrierCode;
 }
Example #26
0
 /**
  * Return FancyZoom config information
  *
  * @param string $path
  * @param int $store_id
  * @return Simple_Xml
  */
 public function getConfigData($path, $store_id = null)
 {
     if (!empty($path)) {
         return Mage::getStoreConfig($path, $store_id);
     }
     return false;
 }
Example #27
0
 public function archivedPosts($showMonths = true)
 {
     $id = $this->getRequest()->getParam('id');
     $collection = Mage::getModel('gallery/gallery')->getCollection()->addFieldToFilter('status', 3)->addFieldToFilter('parent_id', $id);
     $collection->setOrder('created_time ', 'desc');
     $pageSize = Mage::getStoreConfig('gallery/trendsettings/looksperpage');
     if (!$pageSize) {
         $pageSize = 8;
     }
     if ($pageSize != 0) {
         $pager = $this->getLayout()->createBlock('page/html_pager', 'archive.pager');
         $pager->setLimit($pageSize);
         $pager->setTemplate('gallery/pager/archive.phtml');
         $pager->setCollection($collection);
         $this->setChild('pager', $pager);
         $backpager = $this->getLayout()->createBlock('page/html_pager', 'archive.backpager');
         $backpager->setLimit($pageSize);
         $backpager->setTemplate('gallery/pager/backlink.phtml');
         $backpager->setCollection($collection);
         $this->setChild('backpager', $backpager);
         $fwdpager = $this->getLayout()->createBlock('page/html_pager', 'archive.fwdpager');
         $fwdpager->setLimit($pageSize);
         $fwdpager->setTemplate('gallery/pager/fwdlink.phtml');
         $fwdpager->setCollection($collection);
         $this->setChild('fwdpager', $fwdpager);
     }
     //print $collection->getSelect();
     return $collection;
 }
    /**
     * Check if customer group can use the payment method
     *
     * @param Varien_Event_Observer $observer
     * @return bool
     */
    public function methodIsAvailable(Varien_Event_Observer $observer)
    {
        $paymentMethodInstance = $observer->getMethodInstance();
        /* @var $paymentMethodInstance Mage_Payment_Model_Method_Abstract */
        $result = $observer->getResult();

        $customer = Mage::helper('customer')->getCustomer();
        /* @var $customer Mage_Customer_Model_Customer */

        if ($paymentMethodInstance instanceof Mage_Paypal_Model_Standard) {
            $customerGroupConfig = Mage::getStoreConfig('paypal/wps/' . self::XML_CUSTOMER_GROUP_CONFIG_FIELD);
        } elseif ($paymentMethodInstance instanceof Mage_Paypal_Model_Express) {
            $customerGroupConfig = Mage::getStoreConfig('paypal/express/' . self::XML_CUSTOMER_GROUP_CONFIG_FIELD);
        } elseif ($paymentMethodInstance instanceof Mage_GoogleCheckout_Model_Payment) {
            $customerGroupConfig = Mage::getStoreConfig('google/checkout/' . self::XML_CUSTOMER_GROUP_CONFIG_FIELD);
        } else {
            $customerGroupConfig = $paymentMethodInstance->getConfigData(self::XML_CUSTOMER_GROUP_CONFIG_FIELD);
        }
        if (!empty($customerGroupConfig)) {
            $methodCustomerGroups = explode(',', $customerGroupConfig);
            if (count($methodCustomerGroups) > 0) {
                if (!in_array($customer->getGroupId(), $methodCustomerGroups)) {
                    $result->isAvailable = false;
                }
            }
        }
        return true;
    }
Example #29
0
 public function getFeedUrl()
 {
     if (is_null($this->_feedUrl)) {
         $this->_feedUrl = (Mage::getStoreConfigFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://') . Mage::getStoreConfig(self::XML_FEED_URL_PATH);
     }
     return $this->_feedUrl;
 }
Example #30
0
 protected function _toHtml()
 {
     if (!Mage::getStoreConfig('ves_base/general_setting/show')) {
         return;
     }
     return parent::_toHtml();
 }