Looking for documentation? Take a look on our wiki

Main Menu

Product in stock variable in product details

Started by wknuvers, February 26, 2014, 10:42:28 AM

Previous topic - Next topic


Dear all, I am building a webshop on Joomla 2.5.16 and VM 2.0.26d. On the product details page I want to show the stock in numbers. I have found a solution for that, adding an additional line in (..)/components/com_virtuemart/views/productdetails/tmpl/default.php. The additional entry is:

<div class="FlexibleStockNumber">In Stock Now: <?php echo $this->product->product_in_stock ?><div>

However, I am struggling with the position of this entry in the php file. When I want to add this that it shows underneath the price, the description field underneath the add cart button is moved up. When I add the entry after the description field of course it shows after the description block, but for me that's the wrong place to show this. This would definitely belong in the neigbourhood of the price and add cart button.
Can anyone advise where to add this within the script so it behaves like I want instead of mocking up my templating?