Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //load parent product "$product"
- $childProducts = Mage::getModel('catalog/product_type_configurable')
- ->getUsedProducts(null,$product);
- // now get qty from collection
- $qtyModel = Mage::getModel('cataloginventory/stock_item');
- foreach($childProducts as $key => $child){
- $childQty[$key] = $qtyModel->loadByProduct($child)->getQty();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement