I came across this block of code in an extension that loops through child products and attempts to return their current stock qty and the child products name:
<?php foreach ($this->getChildProducts() as $childProduct) : ?>
<?php $childProductStockQty = $this-> getProductStockQty($childProduct);?>
<?php if ($childProductStockQty > 0) : ?>
<tr>
<td><?php echo $childProduct->getName() ?></td>
<td class="a-center"><?php echo $childProductStockQty ?></td>
</tr>
<?php endif ?>
<?php endforeach ?>
In CE 1.9.0.1 this worked perfectly, returning both product names and stock quantities as expected. In CE 1.9.1, it will return the correct stock quantities, but the name returns null.
My question isn't so much 'what's wrong with this extension?', I've sent a question to the developer as well. I'm wondering if any of you are aware if there are changes in CE 1.9.1 in how to retrieve a child product name.
Reading the code down the Mage/CatalogInventory/Block/Stockqty rabbit hole hasn't shed any light that I can detect.
Any and all advice is appreciated.
$childProduct' and check the value of[name]? – Manikandan Arunachalam Nov 29 '14 at 04:56