So I have a configurable product which pulls certain attributes from the simple product using this code:
if($_product->getTypeId() == "configurable"):
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($_product);
$simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();
foreach($simple_collection as $simple_product){
echo $simple_product->getSku() . " - " . $simple_product->getName() . " - " . Mage::helper('core')->currency($simple_product->getPrice()) . "<br>";
}
This works perfectly.
What I want it to do now is sort the products by price, with the lowest at the top.
I am a noob, so if anyone can help me with it and modify the code for my needs, you will be a life saver :)
Thanks in advance