Im currently using Magento CE 1.9 and I want to display the individual stock quantities of all the simple products associated with the configurable product.

When you click the "Only X Left" message on the product page on the front end these products display as per /template/cataloginventory/stockqty/composite.phtml

However only the quantities are showing but the simple product titles are note displaying.

Can anyone suggest why the titles aren't displaying and how to fix this?

Also how can you get this table to display showing all the quantities to display without having to click on the message?

  • please mention magento version
    – Amit Bera
    Commented May 9, 2016 at 8:03
  • It says Magento CE 1.9
    – seb
    Commented May 9, 2016 at 8:13

1 Answer 1


In the template


the table on line 35 got css-class "no-display":

<table id="<?php echo $this->getDetailsPlaceholderId() ?>" class="availability-only-details no-display">

override the template in your design and delete the "no-display" css-class... and then format the table to fit your needs. If you do, you can also remove the javscript at the bottom of the template-file from line 56 to 65

<script type="text/javascript">
$('<?php echo $this->getPlaceholderId() ?>').observe('click', function(event){
    $('<?php echo $this->getDetailsPlaceholderId() ?>').toggleClassName('no-display');
    decorateTable('<?php echo $this->getDetailsPlaceholderId() ?>');
  • Thanks for that the table is now displaying as expected - do you have any ideas/suggestions on why the simple product names are not displaying in the table but the quantities are?
    – curtisc
    Commented May 9, 2016 at 10:02
  • The table has the following: <?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 ?>
    – curtisc
    Commented May 9, 2016 at 10:03
  • maybe the attribute for the name of the product is not "name"?=
    – roman204
    Commented May 9, 2016 at 10:29
  • and please dont forget to mark my answer as useful.
    – roman204
    Commented May 9, 2016 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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