how to use var_dump and print_r in magento
This one is crazy with magento because sometimes it works and sometimes it just shows blank page. Once it gave me a real hard time. Finally found solution somewhere. I just had to do was add
on the object that i wanted to print asCODE:
->debug()
CODE:
$obj->debug(); //e.g. if i have $_cart = Mage::getModel('checkout/cart'); //to use print_r or var_dump, i need to do print_r($_cart->debug());
These are methods available for a product: