How to get all the ID of product in one page
$model = Mage::getModel('catalog/product'); //getting product model
$collection = $model->getCollection(); //products collection
foreach ($collection as $product) //loop for getting products
{
echo $product->getId();
}
How to get the attribute value of any attribute name in any page
$_Products = Mage::getSingleton('checkout/cart')->getQuote()->getAllItems();
foreach ($_Products as $value){
$item_ID = $value->getProductId();
$_Product = Mage::getModel('catalog/product')->load($item_ID);
$checkfree = $_Product->getAttributeText('your_attribute_code');
echo $checkfree; //to getthe attribute value of free shipping
}
No comments:
Post a Comment
Thankyou for your Comments