cancel
Showing results for 
Search instead for 
Did you mean: 

Stock status options

Stock status options

How would I programmatically get the list of available options for Stock Status to use in Admin product grid in Magento 1.9.2?

1 REPLY

Re: Stock status options

Hi,

 

Not sure if this is what you need, this is the query that I use in order to obtain the values of an attribute:

 

$attributeId = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product', '%attributecode%');

 

$options = Mage::getResourceModel('eav/entity_attribute_option_collection')
->setAttributeFilter($attributeId)
->setPositionOrder('asc', true)
->setStoreFilter(0)
->load();