$products = Mage::getModel( 'catalog/category' )->load( $category_id ) ->getProductCollection() ->addAttributeToSelect( '*' ) ->addAttributeToFilter( 'status' , 1) ->addAttributeToFilter( 'visibility' , 4);
利用此脚本,,其实可以自己写一个导出脚本,,方便管理产品,,,如下,,导出指定分类下的,目录id和sku
<?php
header("Content-Type: text/csv"); header("Content-Disposition: attachment; filename=catagory.csv");//filename是导出的文件名 header('Cache-Control:must-revalidate,post-check=0,pre-check=0'); header('Expires:0'); header('Pragma:public');
require_once('app/Mage.php');
echo "sku,category_ids\r\n"; (责任编辑:最模板) |