PDA

View Full Version : How do I learn the methods that can be accessed for certain objects?



JackITo
06-04-2013, 01:10 AM
I have the following code:

$_productCollection = Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect(array('name', 'price', 'small_image', 'status'), 'inner')
->addCategoryFilter(Mage::getModel('catalog/category')->load($catid));
$_helper = $this->helper('catalog/output');
foreach ($_productCollection as $_product):
echo $_product->getProductUrl();
endforeach

I want to learn how I discover the methods I can use on an object.

For example $_product->getProductUrl() is using the method getProductUrl() to get the url, but I need price and have no idea what method calls that. Using a print_r doesn't provide enough info for me to discover what they are. I presume they are in controllers that are located in the MAGE core. I have commerce bug and I have tired looking at: http://docs.magentocommerce.com/ But I find myself lost at times.

quochoai
08-19-2017, 05:30 AM
It is best to use a customer approach, they are really powerful and useful for online marketing