test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • calavaro Friend
    #190816

    Hi,

    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)


    1. 515OOdN
    Saguaros Moderator
    #507278

    See the Wiki of virtuemart for custom fields with stock control. http://dev.virtuemart.net/projects/virtuemart/wiki/Product_custom_fields_with_stock_control

    calavaro Friend
    #507360

    I 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 Moderator
    #507548

    Did 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.

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 2 voices, and was last updated by  Saguaros 11 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum