本文整理汇总了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);
}
示例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');
}
示例3: _construct
protected function _construct()
{
if ($this->getConfig('enabled') != 1) {
return false;
}
parent::_construct();
}
示例4: _construct
public function _construct()
{
parent::_construct();
if ($numberProduct = Mage::getStoreConfig('sm_featured/general/number_product')) {
$this->setProductsCount($numberProduct);
}
}
示例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));
}
示例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();
}
示例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();
}
示例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));
}
示例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);
}
示例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();
}
}
示例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));
}
示例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));
}
示例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');
}
示例14: _construct
protected function _construct()
{
parent::_construct();
$this->setData('cache_tags', array(self::CACHE_GROUP, Mage_Core_Block_Template::CACHE_GROUP));
}
示例15: _construct
public function _construct()
{
parent::_construct();
$this->setTemplate('webshopapps_wsalogger/view.phtml');
$this->setNotificationId($this->getRequest()->getParam('notification_id', false));
}