Magento了解产品系列
任何人都可以用外行的语言告诉我下面代码的含义Magento了解产品系列,magento,custom-attributes,Magento,Custom Attributes,任何人都可以用外行的语言告诉我下面代码的含义 $collection = Mage::getResourceModel('catalog/product_collection') ->addAttributeToSelect('name') ->addAttributeToSelect('sku') ->addAttributeToSelect('price') ->addAt
$collection = Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect('name')
->addAttributeToSelect('sku')
->addAttributeToSelect('price')
->addAttributeToSelect('status')
->addAttributeToSelect('short_description')
->addAttributeToSelect('small_image')
->setStoreId($this->getStoreId())
->addMinimalPrice()
->addFinalPrice()
->addTaxPercents()
->addStoreFilter()
->addAttributeToFilter('is_facebook', 1)
->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());
$collection->load();
获取当前商店目录中所有“is FaceWhere”属性设置为1的可见产品。检索到的字段是不言自明的,可能是FaceAnywhere商店视图所需的字段
此信息是作为对象集合检索的,我假定您的代码的其余部分会迭代以发布到Facewhatever。顶部还有一件事。$collection=Mage::getResourceModel('catalog/product_collection'))