ResourceModel

1
//return:
//Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection
$collection = Mage::getResourceModel('catalog/product_collection')

2
addAttributeToSelect

 

3

$collection = Mage::getResourceModel('catalog/product_collection')
            ->setStoreId($this->getStoreId())
            ->addCategoryFilter($this);

 

我也不知道说点啥,反正是得到产品集合的一种方式,返回值直接可以使用foreach进行操作!!

 

得到单一产品:

$product = Mage::getModel('catalog/product')->load($this->getProductId());

相关文章:

  • 2021-06-01
  • 2021-07-31
  • 2021-11-29
  • 2022-01-02
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-06
  • 2021-09-02
  • 2021-09-02
  • 2021-08-03
  • 2021-06-19
  • 2022-02-07
  • 2021-09-14
相关资源
相似解决方案