Joomla 3.4.4
Virtuemart 3.0.9
Hi,
I've added a line of code to product details default.php to show the number left in stock, which works ok.
The line is "<div class="edition">Limited Edition - Only <?php echo $this->product->product_in_stock ?> Left Now</div>"
However, I need to add in an "if" because I don't want to show the statement where I have zero products, can anybody advise me how I should do this? I've tried a couple of times, but I'm not getting it right.
I'd be grateful for any pointers,
Many thanks
Alan
<?php
if($this->product->product_in_stock > 0){ ?>
<div class="edition">Limited Edition - Only <?php echo $this->product->product_in_stock ?> Left Now</div>
<?php } ?>
Hi GJC,
Very many thanks, your help is much appreciated.
Thank you
Alan