i have a little question. When the Stock Status is set to "Only qty left in Stock" then is the Message "In Stock" showing too. But i will hide the Message "In Stock", when the Message "Only qty left in Stock" is showing.

Here a example: 10 articles in stock = Message "In Stock" 2 articles left in stock = Message "Only 2 left in Stock"

Can anyone help me?

  • Anyone a idea how can i solve this issue? Jun 26 '15 at 12:47

Ok, i have solved the problem. Here is my code:

    $__manStock = $_product->getStockItem()->getManageStock();
    $__invAmt = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
    if ($__invAmt > 10)
       echo $this->__("In stock.");
       else {
          echo $this->__("Only $__invAmt left in stock.");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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