I need help with my custom stock status.
That's what I have today.
My problem is that this shows only the qty of the parent product not the qty of the actually in use child product.
I need the qty of the actually in use child product.
My english is not the best.
So I hope everyone understand what I mean / know what I want to build.
I sell shoes and have a lot of sizes for one shoe. So one shoe is a configurable product and have 10 options (simple products) that are the sizes to select.
When I use my own code I can only get and use the quantity of the one configurable product (shoe) and not from the selected size (simple product).
Have anyone a idea how I can get and use the quantity of the selected product?
<?php if ($qtyStock = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty()>0):{?>
<p class="availability in-stock">
<span class="label"><?php echo $this->helper('catalog')->__('Availability:') ?></span>
<span class="value"><?php echo $this->helper('catalog')->__('In stock') ?></span>
<span class="value"><p>Delivery Time:</p>
<div id="delivery_time"><p>Delivery in 3 Days</p></div></span>
</p>
<?php } else: { ?>
<p class="availability out-of-stock">
<span class="label"><?php echo $this->helper('catalog')->__('Availability:') ?></span>
<span class="value"><?php echo $this->helper('catalog')->__('Out of stock') ?></span>
<span class="value"><p>Delivery Time:</p>
<div id="delivery_time"><p>Delivery in 8 Days.</p></div></span>
</p>
<?php } endif; ?>