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


PHP Mage_Catalog_Block_Product_List::__construct方法代码示例

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


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

示例1: __construct

	public function __construct($attributes = array()){
	
		$helper =  Mage::helper('ve_easyslide/data');		
		$this->_config['show'] = $helper->get('show', $attributes);
		if(!$this->_config['show']) return;			
		parent::__construct();		
			
		$this->_config['title'] = $helper->get('title', $attributes);
		$this->_config['folder'] = $helper->get('folder', $attributes);		
		$this->_config['height'] = $helper->get('height', $attributes);
		$this->_config['width'] = $helper->get('width', $attributes);
		$this->_config['autoplay'] = $helper->get('autoplay', $attributes);
		$this->_config['controlnumber'] = $helper->get('controlnumber', $attributes);
		$this->_config['npbutton'] = $helper->get('npbutton', $attributes);
		$this->_config['duration'] = $helper->get('duration', $attributes);
		$this->_config['interval'] = $helper->get('interval', $attributes);
		$this->_config['thumbnailMode'] = $helper->get('thumbnailMode', $attributes);
		for($i=1; $i <= 10; $i++) 
		{
			$image = 'image'.$i;			
			$link = 'link'.$i;
			$imagename = $helper->get($image, $attributes);
			if($this->_config['thumbnailMode'] != "none"){
				$strreplace = '_'.$this->_config['width'].'_'.$this->_config['height'].'.';			
				$imagename = @str_replace('.',$strreplace,$imagename);
			}
			$this->_config[$image] = $imagename;
			$this->_config[$link] = $helper->get($link, $attributes);
		}	
		
		$this->_config['template'] = 've/easyslide/list.phtml';	
		
	}		
开发者ID:ravi2jdesign,项目名称:magentoOLD,代码行数:33,代码来源:List.php

示例2: __construct

 public function __construct($attributes = array())
 {
     parent::__construct($attributes);
     $selfData = $this->getData();
     // handler configuration for module config
     $configuration = $this->_getConfiguration();
     if (count($configuration)) {
         foreach ($configuration as $field => $value) {
             //if (!array_key_exists($field, $selfData)){
             $selfData[$field] = $value;
             //}
         }
     }
     //Zend_Debug::dump($attributes);die;
     // handler attributes for {{block ...}} in cms page
     if (count($attributes)) {
         foreach ($attributes as $field => $value) {
             //if (!array_key_exists($field, $selfData)){
             $selfData[$field] = $value;
             //}
         }
     }
     // re-save data
     $this->setData($selfData);
 }
开发者ID:Aerotexextintores,项目名称:novosite,代码行数:25,代码来源:Home2.php

示例3: __construct

 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     $this->_show = $this->getGeneralConfig("show");
     if (!$this->_show) {
         return;
     }
     parent::__construct($attributes);
 }
开发者ID:booklein,项目名称:bookle,代码行数:11,代码来源:Productlist.php

示例4: __construct

 /**
  * @param array $attributes
  */
 public function __construct($attributes = array())
 {
     $this->_helper = Mage::helper('devhh_brands/products');
     $this->_brandname = Mage::registry('brandname');
     $this->_optionId = $this->_helper->getValueIdByCode('manufacturer', $this->_brandname);
     $this->addData(array('cache_lifetime' => false, 'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG), 'cache_key' => 'brands-list-' . $this->_optionId));
     parent::__construct();
 }
开发者ID:aliuosio,项目名称:dev-hh-brands,代码行数:11,代码来源:Products.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     if (Mage::helper('adjnav')->isModuleEnabled('Aitoc_Aitproductslists')) {
         $this->setTemplate('aitcommonfiles/design--frontend--base--default--template--catalog--product--list.phtml');
     } else {
         $this->setTemplate('catalog/product/list.phtml');
     }
 }
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:9,代码来源:FrontCatalogProductList.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addPriceBlockType('bundle', 'bundle/catalog_product_price', 'bundle/catalog/product/price.phtml');
     $this->addPriceBlockType('giftcard', 'enterprise_giftcard/catalog_product_price', 'giftcard/catalog/product/price.phtml');
     $this->addPriceBlockType('msrp', 'catalog/product_price', 'catalog/product/price_msrp.phtml');
     $this->addPriceBlockType('msrp_item', 'catalog/product_price', 'catalog/product/price_msrp_item.phtml');
     $this->addPriceBlockType('msrp_noform', 'catalog/product_price', 'catalog/product/price_msrp_noform.phtml');
 }
开发者ID:EagleSH,项目名称:besttoy,代码行数:9,代码来源:View.php

示例7: _getProductCollection

 protected function _getProductCollection()
 {
     parent::__construct();
     $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSort("entity_id", "DESC")->addAttributeToSelect(array('name', 'price', 'small_image'))->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds())->setPageSize($this->get_prod_count())->addAttributeToSort($this->get_order(), $this->get_order_dir())->setCurPage($this->get_cur_page());
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
     Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);
     $this->_productCollection = $products;
     return $this->_productCollection;
 }
开发者ID:vesviet,项目名称:dellocal,代码行数:10,代码来源:List.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $now = date("Y-m-d 00:00:00");
     $collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addAttributeToSelect('special_to_date')->addAttributeToFilter('status', 1)->addAttributeToFilter('visibility', array('neq' => 1))->addAttributeToFilter('special_price', array('neq' => ''))->addAttributeToFilter(array(array('attribute' => 'special_to_date', 'date' => true, 'gteq' => $now), array('attribute' => 'special_to_date', 'is' => new Zend_Db_Expr('null'))), '', 'left')->addAttributeToFilter(array(array('attribute' => 'special_from_date', 'date' => true, 'lteq' => $now), array('attribute' => 'special_from_date', 'is' => new Zend_Db_Expr('null'))), '', 'left');
     if ($limit = (int) Mage::getStoreConfig('onsale/configuration/limit')) {
         $collection->getSelect()->limit($limit);
     }
     $this->_collection = $collection;
 }
开发者ID:jokusafet,项目名称:MagentoSource,代码行数:10,代码来源:Onsale.php

示例9: _getProductCollection

 protected function _getProductCollection()
 {
     parent::__construct();
     $storeId = Mage::app()->getStore()->getId();
     $products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSort('created_at', 'desc')->setPageSize($this->get_prod_count())->addAttributeToSelect(array('name', 'price', 'small_image'))->setStoreId($storeId)->addStoreFilter($storeId)->setCurPage($this->get_cur_page());
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
     Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);
     $this->_productCollection = $products;
     return $this->_productCollection;
 }
开发者ID:EagleSH,项目名称:besttoy,代码行数:11,代码来源:List.php

示例10: __construct

 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     $helper = Mage::helper('ves_deals/data');
     $this->_show = $this->getConfig("show");
     if (!$this->_show) {
         return;
     }
     /*End init meida files*/
     $mediaHelper = Mage::helper('ves_deals/media');
     $mediaHelper->addMediaFile("skin_css", "ves_deals/style.css");
     $mediaHelper->addMediaFile("js", "ves_deals/countdown.js");
     parent::__construct();
 }
开发者ID:booklein,项目名称:bookle,代码行数:16,代码来源:Productlist.php

示例11: _getProductCollection

 protected function _getProductCollection()
 {
     parent::__construct();
     $storeId = Mage::app()->getStore()->getId();
     $products = Mage::getResourceModel('reports/product_collection')->addAttributeToSelect('*')->setStoreId($storeId)->addStoreFilter($storeId)->addViewsCount()->setPageSize($this->get_prod_count())->addAttributeToSort($this->get_order(), $this->get_order_dir())->setCurPage($this->get_cur_page());
     $productFlatData = Mage::getStoreConfig('catalog/frontend/flat_catalog_product');
     if ($productFlatData == "1") {
         $products->getSelect()->joinLeft(array('flat' => 'catalog_product_flat_' . $storeId), "(e.entity_id = flat.entity_id ) ", array('flat.name AS name', 'flat.small_image AS small_image', 'flat.price AS price', 'flat.special_price as special_price', 'flat.special_from_date AS special_from_date', 'flat.special_to_date AS special_to_date'));
     }
     Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
     Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
     Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);
     $this->_productCollection = $products;
     return $this->_productCollection;
 }
开发者ID:kk12837,项目名称:sweetbaby,代码行数:15,代码来源:List.php

示例12: __construct

 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     $this->_show = $this->getGeneralConfig("show");
     if (!$this->_show) {
         return;
     }
     parent::__construct($attributes);
     $config_template = $this->getGeneralConfig("listing_layout");
     $my_template = "";
     if (isset($attributes['template']) && $attributes['template']) {
         $my_template = $attributes['template'];
     } elseif ($this->hasData("template")) {
         $my_template = $this->getData("template");
     } else {
         $my_template = "ves/brand/default.phtml";
     }
     $this->setTemplate($my_template);
 }
开发者ID:adrienManikon,项目名称:iPong,代码行数:21,代码来源:List.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $collection = $this->_getProductCollection();
     $this->setCollection($collection);
 }
开发者ID:kanotest15,项目名称:cbmagento,代码行数:6,代码来源:Sale.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setTemplate('callforprice/listcart.phtml');
 }
开发者ID:xiaoguizhidao,项目名称:autotech_design,代码行数:5,代码来源:Listcart.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $this->_session = Mage::getSingleton('core/session');
     //$this->_questions = Mage::getModel('perguntas/question')->getAllQuestions();
 }
开发者ID:jpedro21,项目名称:comerciodoboi,代码行数:6,代码来源:Result.php


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