Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $category = Mage::getModel('catalog/category')->load(176);
- $productCollection = $category->getProductCollection();
- foreach($productCollection as $p){
- Mage::getSingleton('catalog/category_api')
- ->removeProduct(176,$p->getId());
- }
- $category = Mage::getModel('catalog/category')->load(176);
- $category->setPostedProducts(array());
- $category->save();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement