我如何使用magento内置数据流配置文件功能仅从magento导出前100个产品。我想出口第一批产品,但我的商店有20000种产品,所以我想出口1000件产品。等待建议。
答案 0 :(得分:0)
您可以通过重写Mage_Dataflow_Model_Batch_Abstract
类中的核心函数getIdCollection()来实现。
返回所有id集合,您可以根据需要自定义代码。
目前返回代码如下:
return
$ this-> getResource() - > getIdCollection($ this),您可以按照以下内容替换代码
//return $this->getResource()->getIdCollection($this);
$idArray = array();
foreach($this->getResource()->getIdCollection($this) as $key => $val){
if($key < 100){
$idArray[] = $val;
}
}
return $idArray;
请检查下载的csv后,不要在弹出窗口中看到加载的记录希望这会对你有帮助!..