简体   繁体   English

在magento中过滤产品数据

[英]Filter products data in magento

I need to migrate only active products i am using the below code to get all product collection 我只需要迁移 活动产品,我正在使用以下代码来获取所有产品集合

Mage::getModel('catalog/product')->getCollection(); 

can anybody tell me how can i filter only status = enabled form above code 有人可以告诉我如何仅过滤以上代码中的status = enabled表单吗?

尝试

Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('status', 1)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM