Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need help with getting some values out of my code.So I have my configurable product and it is based on a global attribute "size", it has its own associated products which are the same product in different sizes. I need to somehow call a model or something that will give me the associated products and their label for the attribute "size" for example "xxl".
What I did so far was to get all child products. But the this size value is an Int, and there is no size label variable.

Another thing I'd like to add if it helps: the size variable from child products and the value_index from "size" options are the same.


This is the code and need to insert the label in it and to get it displayed in a foreach as a li element

$product1= Mage::getModel('catalog/product')->load($_product->product_id); 
$childProducts = Mage::getModel('catalog/product_type_configurable')

foreach($childProducts as $child) {


share|improve this question
I'm pretty sure I gave you the answer just below. – Julien Lachal Jul 17 '14 at 13:54
up vote 3 down vote accepted
share|improve this answer
Ah, thank you it did the job! – user12285 Jul 17 '14 at 14:04
glat it helped. – Julien Lachal Jul 17 '14 at 14:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.