News:

Looking for documentation? Take a look on our wiki

Main Menu

[SOLVED] Show "Last product!" when there is only 1 product in stock

Started by DaggaTora, August 14, 2012, 10:02:59 AM

Previous topic - Next topic

DaggaTora

Hi,

I've been searching though the forum but i can't find the post. I remember a post where someone explains how to show a message on the front end when so clients can know that there is only one product in stock. Something like "Last product in stock!".

Does anyone knows how to achieve this?

Thanks!
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

bytelord

Hi,

I have read that here from user PRO. Is for product pages, when a user navigates in product details check the stock and place a message.
http://forum.virtuemart.net/index.php?topic=92756.msg305223#msg305223

you can change the <=10, for example =1 and displays the message "Last product in stock".

for your solution:
<?php if ($this->product->product_in_stock ==1) { ?>
                  <div>ONLY <?php echo $this->product->product_in_stock ?> product in Stock. Order now!!</div>
               <?php    }?>
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

DaggaTora

Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!