コード例 #1
0
 /**
  * Initialize block's cache
  */
 protected function _construct()
 {
     parent::_construct();
     $this->addColumnCountLayoutDepend('empty', 6)->addColumnCountLayoutDepend('one_column', 5)->addColumnCountLayoutDepend('two_columns_left', 4)->addColumnCountLayoutDepend('two_columns_right', 4)->addColumnCountLayoutDepend('three_columns', 3);
     $this->addData(array('cache_lifetime' => 86400));
     $this->addCacheTag(Mage_Catalog_Model_Product::CACHE_TAG);
 }
コード例 #2
0
ファイル: List.php プロジェクト: hientruong90/ee_14_installer
 /**
  * _construct
  */
 public function _construct()
 {
     parent::_construct();
     $this->addPriceBlockType('simple', 'catalog/product_price', 'merchandiser/new/category/price.phtml');
     $this->addPriceBlockType('grouped', 'catalog/product_price', 'merchandiser/new/category/price-grouped.phtml');
     $this->addPriceBlockType('configurable', 'catalog/product_price', 'merchandiser/new/category/price-configurable.phtml');
 }
コード例 #3
0
ファイル: Advanced.php プロジェクト: quyip8818/Mag
 protected function _construct()
 {
     if ($this->getConfig('enabled') != 1) {
         return false;
     }
     parent::_construct();
 }
コード例 #4
0
ファイル: Product.php プロジェクト: sonbui00/magento-mock
 public function _construct()
 {
     parent::_construct();
     if ($numberProduct = Mage::getStoreConfig('sm_featured/general/number_product')) {
         $this->setProductsCount($numberProduct);
     }
 }
コード例 #5
0
ファイル: Widget.php プロジェクト: igorvasiliev4/magento_code
 protected function _construct()
 {
     parent::_construct();
     if (!self::$_helper && Mage::helper('core')->isModuleEnabled('AW_Blog')) {
         self::$_helper = Mage::helper('blog');
     }
     $this->setData('cache_tags', array(self::CACHE_GROUP, Mage_Core_Block_Template::CACHE_GROUP));
 }
コード例 #6
0
 protected function _construct()
 {
     //Want to change/override this? No problem. Override this block, override the constructor,
     //OR, if using it as a widget, create a config so you can specify what template you want to use
     $this->setTemplate('doghouse/carousel/carousel.phtml');
     $this->setCacheLifetime(3600);
     return parent::_construct();
 }
コード例 #7
0
ファイル: List.php プロジェクト: RobertaFortes/assisteste
 protected function _construct()
 {
     if ($this->getCacheLifeTime()) {
         $this->addData(array('cache_lifetime' => $this->getCacheLifeTime(), 'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG)));
     } else {
         $this->addData(array('cache_lifetime' => 7200, 'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG)));
     }
     parent::_construct();
 }
コード例 #8
0
 public function _construct()
 {
     $this->setCategoryId(Mage::getStoreConfig('homepageproducts/general/category'));
     $this->setItemLimit(Mage::getStoreConfig('homepageproducts/general/items'));
     parent::_construct();
     $this->addData(array('cache_lifetime' => 43200));
     // 12 hours
     $this->addCacheTag(array(Mage_Catalog_Model_Product::CACHE_TAG));
 }
コード例 #9
0
ファイル: AlsoBuy.php プロジェクト: mngr777/mage-alsobuy
 protected function _construct()
 {
     if (!$this->hasData('template')) {
         $this->setData('template', 'alsobuy/product/alsobuy.phtml');
     }
     parent::_construct();
     $this->addData(array('cache_lifetime' => 86400));
     $this->addCacheTag(Mage_Catalog_Model_Product::CACHE_TAG);
     $this->addCacheTag(Mngr_AlsoBuy_Model_Indexer_Similarity::CACHE_TAG);
 }
コード例 #10
0
 function _construct()
 {
     parent::_construct();
     $templates = Mage::getModel('thememanager/widget_view')->getTemplates();
     $template = $this->getTemplate();
     if (isset($templates[$template])) {
         $this->setTemplate($templates[$template]['phtml']);
         $this->products_collection = $this->getProductsCollection();
     }
 }
コード例 #11
0
ファイル: List.php プロジェクト: technomagegithub/magento
 protected function _construct()
 {
     parent::_construct();
     $cacheLifeTime = $this->getCacheLifeTime() ? $this->getCacheLifeTime() : 7200;
     $cacheTags = array(Mage_Catalog_Model_Product::CACHE_TAG, Mage_Cms_Model_Page::CACHE_TAG, 'em_bestsellerproducts');
     if ($this->ShowLabel() && Mage::helper('core')->isModuleEnabled('EM_Productlabels')) {
         $cacheTags[] = EM_Productlabels_Model_Productlabels::CACHE_TAG;
     }
     $this->addData(array('cache_lifetime' => $cacheLifeTime, 'cache_tags' => $cacheTags));
 }
コード例 #12
0
ファイル: List.php プロジェクト: RobertaFortes/assisteste
 protected function _construct()
 {
     parent::_construct();
     $cacheLifeTime = $this->getCacheLifeTime() ? $this->getCacheLifeTime() : 86400;
     $cacheTags = array(Mage_Catalog_Model_Product::CACHE_TAG, Mage_Cms_Model_Page::CACHE_TAG);
     if ($this->getShowFrontend('label') && Mage::helper('core')->isModuleEnabled('EM_Productlabels')) {
         $cacheTags[] = EM_Productlabels_Model_Productlabels::CACHE_TAG;
     }
     /* If get best seller product, add 'ft_bestseller' cache tag */
     if ($this->getData('type_filter') == 2) {
         $cacheTags[] = self::BEST_SELLER_CACHE_TAG;
     }
     $this->addData(array('cache_lifetime' => $cacheLifeTime, 'cache_tags' => $cacheTags));
 }
コード例 #13
0
 /**
  * Internal constructor, that is called from real constructor
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->addItemPriceBlockType('default', 'wishlist/render_item_price', 'wishlist/render/item/price.phtml');
 }
コード例 #14
0
ファイル: Widget.php プロジェクト: dragontheme1235/project-1
 protected function _construct()
 {
     parent::_construct();
     $this->setData('cache_tags', array(self::CACHE_GROUP, Mage_Core_Block_Template::CACHE_GROUP));
 }
コード例 #15
0
ファイル: View.php プロジェクト: guohuadeng/stampApp
 public function _construct()
 {
     parent::_construct();
     $this->setTemplate('webshopapps_wsalogger/view.phtml');
     $this->setNotificationId($this->getRequest()->getParam('notification_id', false));
 }
コード例 #16
0
ファイル: Abstract.php プロジェクト: nemphys/magento2
 /**
  * Internal constructor, that is called from real constructor
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->addItemPriceBlockType('default', 'Mage_Wishlist_Block_Render_Item_Price', 'render/item/price.phtml');
 }
コード例 #17
0
 /**
  * Initialize block's cache
  */
 protected function _construct()
 {
     parent::_construct();
     $this->addColumnCountLayoutDepend('two_columns_left', 3)->addColumnCountLayoutDepend('two_columns_right', 3);
     $this->addData(array('cache_lifetime' => 86400, 'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG)));
 }
コード例 #18
0
ファイル: Featuredcategory.php プロジェクト: victorkho/telor
 protected function _construct()
 {
     parent::_construct();
 }
コード例 #19
0
ファイル: View.php プロジェクト: natxetee/magento2
 protected function _construct()
 {
     parent::_construct();
     $this->setReviewId($this->getRequest()->getParam('id', false));
 }
コード例 #20
0
ファイル: Toprated.php プロジェクト: kk12837/sweetbaby
 protected function _construct()
 {
     parent::_construct();
     $this->addData(array('cache_lifetime' => 86400, 'cache_tags' => array('ecommerceofficehomepage_home_toprated')));
 }
 protected function _construct()
 {
     parent::_construct();
     self::$productPrice = Mage::app()->getLayout()->createBlock('catalog/product_price');
 }
コード例 #22
0
 /**
  * Internal constructor
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_initBlocks();
 }
コード例 #23
0
 /**
  * Set a default template
  */
 protected function _construct()
 {
     $this->setTemplate('vinaikopp/productcategories/list.phtml');
     parent::_construct();
 }
コード例 #24
0
ファイル: List.php プロジェクト: CE-Webmaster/CE-Hub
 /**
  * Initialization
  */
 protected function _construct()
 {
     $this->_serializer = new Varien_Object();
     //$this->addData('type','computer');
     parent::_construct();
 }
コード例 #25
0
ファイル: View.php プロジェクト: relue/magento2
 /**
  * Initialize block
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setTagId(Mage::registry('tagId'));
 }
コード例 #26
0
ファイル: List.php プロジェクト: jtoshmat/mystore
 /**
  * Initialization
  */
 protected function _construct()
 {
     $this->_serializer = new Varien_Object();
     $this->addData(array('cache_lifetime' => 86400, 'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG)));
     parent::_construct();
 }
コード例 #27
0
 protected function _construct()
 {
     parent::_construct();
     $this->addData(array('cache_lifetime' => 300, 'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG)));
 }
コード例 #28
0
ファイル: New.php プロジェクト: elderxavier/aalembrancas-tema
 /**
  * Initialize block's cache
  */
 protected function _construct()
 {
     parent::_construct();
     $this->addColumnCountLayoutDepend('empty', 6)->addColumnCountLayoutDepend('one_column', 5)->addColumnCountLayoutDepend('two_columns_left', 4)->addColumnCountLayoutDepend('two_columns_right', 4)->addColumnCountLayoutDepend('three_columns', 3);
 }
コード例 #29
0
 public function _construct()
 {
     $this->setTemplate('dailydeal/sidebar.phtml');
     return parent::_construct();
 }
コード例 #30
0
ファイル: Bestsellers.php プロジェクト: AleksNesh/pandora
 public function __construct()
 {
     parent::_construct();
     $this->setData('bestsellers', Mage::getStoreConfig('shoppersettings/catalog/bestsellers'));
 }