0

I have a collection of products which consist of configurable products that are visible and active.

How do i get all values in an array of an attribute called manu_color of each configurable product.

I is important that i only get manu_color of the simple products if the simple product are actually saleable.

Any help would be appreciated :)

1 Answer 1

1

Ok so far i have this. Problem is that array return identical values. Will post update when i have it working 100%

if($_product->getTypeId() == "configurable"): $conf = Mage::getModel('catalog/product_type_configurable')->setProduct($_product); $simple_collection = $conf ->getUsedProductCollection() ->addAttributeToSelect('*') ->addAttributeToFilter('status', 1) ->addFilterByRequiredOptions(); Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($simple_collection); $manuColor = array(); foreach($simple_collection as $simple_product){ $manu_color[] = $simple_product->getAttributeText('manu_color'); } endif; 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.