Currently I am working on a website in Joomla 2.5.28 and VirtueMart 2.6.14. As I am new to both , I am bit stuck in some sections and I couldn't find much help online. The issue is I am stuck in the "related products" listing section. My requirement is to not list a related product if it is sold out. Please suggest me the file where i should modify.
			
			
			
				Hi,
If this is a new shop try to download last release, i have send the fix for this case.
If it's not in last release then the fix comes in the new one.
See http://forum.virtuemart.net/index.php?topic=130303.msg448850#msg448850 for more info.
Grreets,
Patrick
			
			
			
				I believe that fix was added to VM3.0.9.4
@Luke123 if you decide to upgrade to using VM3.x if you use a commercial  Joomla/VM template that there is a VM3 compatible version available as the VM templating system is much enhanced compared to VM2
			
			
			
				Many Thanks for the reply @Studio 42 and @jenkinhill.
Since its an already existing shop, is there no other solution other than updating to the release VM3.0.9.4?? Or is it possible to update the query that displays the related products (based on the stock count or something from the products table)? 
Sorry if i asked something wrong
Thanks and Regards,
Luke
			
			
			
				Yes, you could add a check for stock. If you cannot do it then it should not cost a great deal for a developer to do it for you.
You should update VM in any case to 2.6.18 as that has some bug fixes.
			
			
			
				Ok. Could you please tell me the file to give the check for the stock and how can I do it. I could not find the file or the query where this has to be done.  
Many Thanks in Advance
Regards,
Luke
			
			
			
				See http://forum.virtuemart.net/index.php?topic=130303.msg448850#msg448850 for more info.
you have the fix for virtuemart 3 but you can use same file for virtuemart 2(only the line change)