-
AuthorPosts
-
calavaro Friend
calavaro
- Join date:
- August 2013
- Posts:
- 125
- Downloads:
- 7
- Uploads:
- 34
- Thanks:
- 28
- Thanked:
- 24 times in 1 posts
September 23, 2013 at 1:50 am #190816Hi,
How to display current stock level on Product Detail page?
On category page it displays a very nice graphics for the “Current stock level”. I copied this code from the category default.php page (..htmlcom_virtuemartcategory), and inserted it into the productdetails default.php page (..htmlcom_virtuemartproductdetails).
<?php
if ( VmConfig::get ('display_stock', 1)) { ?>
<!-- if (!VmConfig::get('use_as_catalog') and !(VmConfig::get('stockhandle','none')=='none')){?> -->
<div class="paddingtop8">
<span class="vmicon vm2-<?php echo $product->stock->stock_level ?>" title="<?php echo $product->stock->stock_tip ?>"></span>
<span class="stock-level"><?php echo JText::_ ('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') ?></span>
</div>
<?php } ?>The result is not great though.
It doesn’t seem to pull the graphics, or it may have some other problem. I just don’t know.(the 3 dots above and below “Current Stock Level” is for my own reference only (easy to find in the code when editing)
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 27, 2013 at 8:35 am #507278See the Wiki of virtuemart for custom fields with stock control. http://dev.virtuemart.net/projects/virtuemart/wiki/Product_custom_fields_with_stock_control
calavaro Friendcalavaro
- Join date:
- August 2013
- Posts:
- 125
- Downloads:
- 7
- Uploads:
- 34
- Thanks:
- 28
- Thanked:
- 24 times in 1 posts
September 28, 2013 at 3:24 am #507360I followed your link, and the details to add the stock, but it does not work.
I also read this: http://pm.joomlart.com/browse/JATCHAWKS-91
So it seems it is severely broken for now. :((
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 30, 2013 at 2:07 pm #507548Did you also try to post a thread in VM forum asking for this? Because this needs some customization in code of this component to achieve.
AuthorPostsViewing 4 posts - 1 through 4 (of 4 total)This topic contains 4 replies, has 2 voices, and was last updated by Saguaros 11 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum
How to display current stock level on Product Detail page?
Viewing 4 posts - 1 through 4 (of 4 total)