Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento了解产品系列_Magento_Custom Attributes - Fatal编程技术网

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'))