Welcome, Guest. Please login or register.
Login with username, password and session length


VirtueMart 1.1.8 - [SECURITY RELEASE] is available! Read more....

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: 1 [2]   Go Down
Print
Author Topic: Dont want to show my stock quantity  (Read 16988 times)
haastyle
Newbie
*
Posts: 4


« Reply #15 on: March 20, 2009, 18:14:06 PM »

Can someone please help me with this the code is much different in 1.1+
Logged
nicky70
Newbie
*
Posts: 44


« Reply #16 on: June 09, 2009, 21:16:17 PM »

Hi, I would also be interested in this code for new VM as it's about the only thing that I'm currently using in old VM that is preventing me from upgrading.  I've emailed Isak Anderson and haven't received a response, so if anybody else out there has managed to re-code this for 1.1x I'd appreciate it because I'm not a coder!  Smiley
Cheers,
Nicky
Logged
Beta
Newbie
*
Posts: 4


« Reply #17 on: March 04, 2010, 05:27:17 AM »

Hello,

Probably a bit late but here goes, a simple solution would look like this in flypage.tpl.php
Code:
<?php
if($product_in_stock >= "50") {
 echo 
'<div style="color: green;">In stock</div>';
}
elseif(
$product_in_stock <= "49" && $product_in_stock "0") {
 echo 
'<div style="color: red;">Few in stock</div>';
}
elseif(
$product_in_stock <= "0") {
 echo 
'<div style="color: grey;">Not in stock</div>';
}
else {
 echo 
'<div style="color: grey;">Stocklevel is unknown, please contact us</div>';
}
?>

50 or more in stock = green text showing "In stock"
49 or less but more than 0 in stock = red text showing "Few in stock"
0 or less in stock = grey text showing "Few in stock"

Else it shows "Stocklevel is unknown, please contact us".

Best regards, Beta
« Last Edit: March 04, 2010, 05:29:51 AM by Beta » Logged
Pages: 1 [2]   Go Up
Print
Jump to: