Using Magento 1.8v.
In my customization when customer adding products to cart. Some products qty should not be changeable(i.e qty is fixed) and some other products qty available to change .
Example :
cat1
products
cat2
subcat
subcat
For Example: cat1 products allowed for qty change so when adding to shopping cart it will be 1 and remaining category should not allowed so it is stock item value .
Im trying below code in this class Mage/Checkout/Model/Cart.php but throwing error
$categoryIds=$this->getProduct()->getCategoryIds($productid);
foreach($categoryIds as $categoryId)
$category = Mage::getModel('catalog/category')->load($categoryId);
if ($category->getName() == 'cat1')
$minimumQty = $product->getStockItem()->getMinSaleQty();
else if($category->getName() == 'cat2')
minimumQty=stock_item->loadByProduct($product)->getQty();
How do i get category name ?