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


PHP Mage_Catalog_Block_Product_List::getLoadedProductCollection方法代码示例

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


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

示例1: collect

 /**
  * Collects list of objects in product list
  *
  * @param Mage_Catalog_Block_Product_List $object
  * @return Mage_Catalog_Model_Product[]
  */
 public function collect($object)
 {
     $result = array();
     $products = $object->getLoadedProductCollection();
     foreach ($products as $product) {
         $result[] = $product;
     }
     return $result;
 }
开发者ID:jonesio,项目名称:EcomDev_Varnish,代码行数:15,代码来源:List.php

示例2: testSetCollection

 public function testSetCollection()
 {
     $this->_block->setCollection('test');
     $this->assertEquals('test', $this->_block->getLoadedProductCollection());
 }
开发者ID:relue,项目名称:magento2,代码行数:5,代码来源:ListTest.php

示例3: _processCatalogProductList

 /**
  * @param string $html
  * @param Mage_Catalog_Block_Product_List $block
  * @return string
  */
 private function _processCatalogProductList($html, $block)
 {
     $helper = $this->_getHelper();
     /** @var $processor Mageplace_Callforprice_Model_Htmlprocessor_Interface */
     $processor = Mage::getModel('mageplace_callforprice/htmlprocessor_factory')->createProcessor();
     $processor->load($html);
     if ($helper->isGlobalEnabled()) {
         $processor->replace($helper->getCssSelector('product_list_price'), $helper->prepareReplacement());
         $processor->remove($helper->getCssSelector('product_list_addtocart'));
         return $processor->getHtml();
     }
     /** @var $parent Mage_Catalog_Block_Category_View */
     $parent = $block->getParentBlock();
     if ($parent instanceof Mage_Catalog_Block_Category_View && ($category = $parent->getCurrentCategory())) {
         if ($helper->isEnabledForCategory($category)) {
             $processor->replace($helper->getCssSelector('product_list_price'), $helper->prepareReplacement());
             return $processor->getHtml();
         }
     }
     $processor->process('productlist', array('products' => $block->getLoadedProductCollection()));
     return $processor->getHtml();
 }
开发者ID:CE-Webmaster,项目名称:CE-Hub,代码行数:27,代码来源:Observer.php

示例4: getLoadedProductCollection

 /**
  * Fires a custom event we can catch in the observer and process
  * the products where the add-to-cart-button should be hidden
  *
  * @return Mage_Eav_Model_Entity_Collection_Abstract
  */
 public function getLoadedProductCollection()
 {
     $oProductCollection = parent::getLoadedProductCollection();
     Mage::dispatchEvent('sitewards_b2bprofessional_product_list_collection_load_after', array('product_collection' => $oProductCollection));
     return $oProductCollection;
 }
开发者ID:psskhal,项目名称:B2BProfessional,代码行数:12,代码来源:List.php

示例5: appendToCatalogListing

 /**
  * Appends the points balance in the header somewhere
  * @param Mage_Catalog_Block_Product_List $block
  * @param Varien_Object $transport
  */
 public function appendToCatalogListing($block, $transport)
 {
     // Should we be checking this auto-integration?
     if (!Mage::getStoreConfigFlag('rewards/autointegration/product_listing')) {
         return $this;
     }
     // Block is a price block.
     if (!$block instanceof Mage_Catalog_Block_Product_List) {
         return $this;
     }
     $all_products = $block->getLoadedProductCollection();
     $html = $transport->getHtml();
     $html = $this->_getNewCatalogListingHtml($html, $all_products);
     $transport->setHtml($html);
     return $this;
 }
开发者ID:rajarshc,项目名称:Rooja,代码行数:21,代码来源:Output.php


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