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


PHP Mage_Catalog_Block_Product_Abstract::_construct方法代码示例

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


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

示例1: _construct

 /**
  * 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);
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:10,代码来源:Productsbyid.php

示例2: _construct

 /**
  * _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');
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:10,代码来源:List.php

示例3: _construct

 protected function _construct()
 {
     if ($this->getConfig('enabled') != 1) {
         return false;
     }
     parent::_construct();
 }
开发者ID:quyip8818,项目名称:Mag,代码行数:7,代码来源:Advanced.php

示例4: _construct

 public function _construct()
 {
     parent::_construct();
     if ($numberProduct = Mage::getStoreConfig('sm_featured/general/number_product')) {
         $this->setProductsCount($numberProduct);
     }
 }
开发者ID:sonbui00,项目名称:magento-mock,代码行数:7,代码来源:Product.php

示例5: _construct

 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));
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:8,代码来源:Widget.php

示例6: _construct

 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();
 }
开发者ID:AlexanderParker,项目名称:Doghouse_Carousel,代码行数:8,代码来源:Carousel.php

示例7: _construct

 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();
 }
开发者ID:RobertaFortes,项目名称:assisteste,代码行数:9,代码来源:List.php

示例8: _construct

 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));
 }
开发者ID:DevertNet,项目名称:MageProfis_HomepageProducts,代码行数:9,代码来源:Homepage.php

示例9: _construct

 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);
 }
开发者ID:mngr777,项目名称:mage-alsobuy,代码行数:10,代码来源:AlsoBuy.php

示例10:

 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();
     }
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:10,代码来源:Products.php

示例11: _construct

 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));
 }
开发者ID:technomagegithub,项目名称:magento,代码行数:10,代码来源:List.php

示例12: _construct

 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));
 }
开发者ID:RobertaFortes,项目名称:assisteste,代码行数:14,代码来源:List.php

示例13: _construct

 /**
  * 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');
 }
开发者ID:QiuLihua83,项目名称:magento-enterprise-1.13.1.0,代码行数:9,代码来源:Abstract.php

示例14: _construct

 protected function _construct()
 {
     parent::_construct();
     $this->setData('cache_tags', array(self::CACHE_GROUP, Mage_Core_Block_Template::CACHE_GROUP));
 }
开发者ID:dragontheme1235,项目名称:project-1,代码行数:5,代码来源:Widget.php

示例15: _construct

 public function _construct()
 {
     parent::_construct();
     $this->setTemplate('webshopapps_wsalogger/view.phtml');
     $this->setNotificationId($this->getRequest()->getParam('notification_id', false));
 }
开发者ID:guohuadeng,项目名称:stampApp,代码行数:6,代码来源:View.php


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