public function _construct() { parent::_construct(); //$this->started_at = Mage::getSingleton('core/date')->timestamp(time()); $this->started_at = time(); $this->setData('cdate', $this->started_at); }
public function _construct() { parent::_construct(); $this->method = Zend_Http_Client::GET; $this->headers = array(); $this->response_model = Mage::getModel('klevu_search/api_response'); }
protected function _construct() { parent::_construct(); if (!$this->hasData('store_code')) { $this->setData('store_code', Mage_Core_Model_Store::DEFAULT_CODE); } try { Mage::app()->getStore($this->getData('store_code')); } catch (Exception $e) { Mage::throwException(sprintf('Store with code \'%s\' doesn\'t exists.', $this->getData('store_code'))); } $this->setData('store_id', Mage::app()->getStore($this->getData('store_code'))->getStoreId()); $this->setData('website_id', Mage::app()->getStore($this->getData('store_code'))->getWebsiteId()); $this->setData('store_currency_code', Mage::app()->getStore($this->getData('store_code'))->getCurrentCurrencyCode()); // Initialize locks $this->initSavePath(); $this->_storeLockFile = @fopen($this->getLockPath(), "w"); if (!file_exists($this->getLockPath())) { Mage::throwException(sprintf('Can\'t create file %s', $this->getLockPath())); } // If the location is not writable, flock() does not work and it doesn't mean another script instance is running if (!is_writable($this->getLockPath())) { Mage::throwException(sprintf('Not enough permissions. Location [%s] must be writable', $this->getLockPath())); } }
public function _construct() { parent::_construct(); $options = array(); $names = array(); $code = false; foreach ($this->getActiveFilters() as $filter) { if (!$filter->getFilter()->getData('attribute_model')) { continue; } if (is_object($filter->getFilter()->getAttributeModel())) { $code = $filter->getFilter()->getAttributeModel()->getAttributeCode(); } $name = $filter->getName(); $selected = $filter->getLabel(); if (!isset($options[$code])) { $options[$code] = array(); } $names[$code] = $name; $options[$code][] = $selected; } $allOptions = array(); $allOptions2 = array(); foreach ($options as $code => $values) { $this->setData($code, implode(', ', $values)); // // if ($code == 'brand') { // continue; // } $allOptions[] = $names[$code] . ': ' . implode(', ', $values); $allOptions2[] = implode(', ', $values); } $this->setNamedSelectedOptions(implode(', ', $allOptions)); $this->setSelectedOptions(implode(', ', $allOptions2)); }
/** * Varien_Object */ public function _construct() { parent::_construct(); $this->_recurrences = array(); $this->_product = null; $this->_recurrency = null; $this->_recurrencesData = array(); }
protected function _construct() { parent::_construct(); $this->initConfig(); if (!$this->getFromCustomGridXml()) { $this->finalizeConfig(); } }
public function _construct() { parent::_construct(); $page = Mage::app()->getRequest()->getParam('p'); if ($page > 1) { $this->setPage(Mage::helper('seo')->__("Page %s", $page)); } }
public function _construct() { parent::_construct(); $this->client = Mage::getSingleton('inchoo_socialconnect/linkedin_oauth2_client'); if (!$this->client->isEnabled()) { return $this; } }
public function _construct() { parent::_construct(); $this->loadEntityType('catalog_product'); $attr_status = $this->getAttribute('status'); $this->setData('product_status_attribute_id', $attr_status->getAttributeId()); unset($attr_status); }
protected function _construct() { parent::_construct(); if (!$this->hasData('store_code')) { $this->setData('store_code', Mage_Core_Model_Store::DEFAULT_CODE); } try { Mage::app()->getStore($this->getData('store_code')); } catch (Exception $e) { Mage::throwException(sprintf('Store with code \'%s\' doesn\'t exists.', $this->getData('store_code'))); } $this->setData('store_id', Mage::app()->getStore($this->getData('store_code'))->getStoreId()); $this->setData('website_id', Mage::app()->getStore($this->getData('store_code'))->getWebsiteId()); }
/** * Validate that the feed model has necessary configuration for the core * feed model. Instantiate and store a core feed model using config data * and optionally a fs_tool set in magic data. * * @throws EbayEnterprise_Eb2cCore_Exception_Feed_Configuration * @return self */ protected function _construct() { parent::_construct(); $this->_logger = Mage::helper('ebayenterprise_magelog'); $this->_context = Mage::helper('ebayenterprise_magelog/context'); if (!$this->hasFeedConfig()) { throw new EbayEnterprise_Eb2cCore_Exception_Feed_Configuration(__CLASS__ . ' no configuration specifed.'); } // Set up local folders for receiving, processing $coreFeedConstructorArgs = array('feed_config' => $this->getFeedConfig()); // FileSystem tool can be supplied, esp. for testing if ($this->hasFsTool()) { $coreFeedConstructorArgs['fs_tool'] = $this->getFsTool(); } // Ready to set up the core feed helper, which manages files and directories: $this->_coreFeed = Mage::getModel('ebayenterprise_catalog/feed_core', $coreFeedConstructorArgs); return $this; }
/** * Internal constructor not depended on params. * It's used for application object initialization * * @return null */ final function _construct() { parent::_construct(); $this->setApplicationModel(); }
public function _construct() { parent::_construct(); $this->started_at = time(); $this->setData('cdate', $this->started_at); }
/** * Init. */ public function _construct() { parent::_construct(); }
protected function _construct() { parent::_construct(); }
protected function _construct() { $this->_sizes = array('168x145' => array('label' => Mage::helper('affiliatepluswidget')->__('168x145 Single Product'), 'width' => 168, 'height' => 145, 'rows' => 1, 'columns' => 1), '300x250' => array('label' => Mage::helper('affiliatepluswidget')->__('300x250 Medium Rectangle'), 'width' => 300, 'height' => 250, 'rows' => 3, 'columns' => 2), '336x300' => array('label' => Mage::helper('affiliatepluswidget')->__('336x300 Large Rectangle'), 'width' => 336, 'height' => 300, 'rows' => 3, 'columns' => 2), '728x136' => array('label' => Mage::helper('affiliatepluswidget')->__('728x136 Wide Rectangle'), 'width' => 728, 'height' => 136, 'rows' => 1, 'columns' => 5), '728x175' => array('label' => Mage::helper('affiliatepluswidget')->__('728x175 Wide Rectangle Fully'), 'width' => 728, 'height' => 175, 'rows' => 1, 'columns' => 5), '160x450' => array('label' => Mage::helper('affiliatepluswidget')->__('160x450 Wide Skyscraper'), 'width' => 160, 'height' => 450, 'rows' => 6, 'columns' => 1), '160x600' => array('label' => Mage::helper('affiliatepluswidget')->__('160x600 Wide Skyscraper Fully'), 'width' => 160, 'height' => 600, 'rows' => 6, 'columns' => 1)); return parent::_construct(); }
public function _construct() { parent::_construct(); $this->_logger = Mage::helper('ebayenterprise_magelog'); $this->_context = Mage::helper('ebayenterprise_magelog/context'); }
public function _construct() { parent::_construct(); $this->_config = Mage::getModel('seo/config'); $this->_additional = array('category' => array(), 'product' => array()); }
public function _construct() { $this->setData(array('helper' => Mage::helper('magic360/settings'), 'tool' => Mage::helper('magic360/settings')->loadTool(), 'basedir' => Mage::getBaseDir('media') . DS . '360images')); parent::_construct(); }
public function _construct() { parent::_construct(); $this->loadEntityType('catalog_product'); }
public function _construct() { $this->setCaption("unnamed special points rule action"); $this->setDescription("unnamed special points rule action..."); return parent::_construct(); }
public function _construct() { parent::_construct(); $this->successful = false; }
public function _construct() { $this->_helper = Mage::helper('misspell/string'); return parent::_construct(); }
protected function _construct() { parent::_construct(); ini_set('memory_limit', '2048M'); $this->_fastSimpleImport = Mage::getModel('fastsimpleimport/import'); }