1

I tried with multiple codes to try and sort the collection of associated products based on the position of the attribute value but without success.

With my foreach in the product page I have pulled out all the records of the associated products but are always shown by order of id and not by position of the value they have with the attribute. This is my situation:

enter image description here

In this way I take the collection of associated products: $conf = Mage::getModel('catalog/product_type_configurable')->setProduct($_product); $simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();

How can I get the correct order S, M, L, XL, XXL? Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.