News:

Looking for documentation? Take a look on our wiki

Main Menu

Show in stock quantity instead of level in category page.

Started by tadeystas, June 13, 2015, 21:19:34 PM

Previous topic - Next topic

tadeystas

Hello all,

I am new to VirtueMart.

I am trying to have stock quantity show for each item in the category page, instead of the stock level (image with 3 rectangles, last one is green if in stock).

I am using standard protostar template. I have copied default files from sublayouts to html/com_virtuemart for category and productdetails. I was able to make changes, and they work, so override was successful.

Problem is, I do not know how to make "In stock Quantity" show instead of stock level. I was able to do it for product detail, but I also need it for category page, where all the items are displayed.

Also, how do I make the order quanity textbox bigger. I am selling items that need to be order in thousands of pcs. I was able to setup that that steps are at 7500, just like need, but only 4 digits fit in the box, when it goes over 4 digits, the last digit is hidden. I need to fix that.

Please help! Thank you!!

Virtuemart 3.0.9
Joomla 3.4.1
PHP 5.4.39

Mod edit:  bump message removed. Please read http://forum.virtuemart.net/index.php?topic=104795.0

PRO


jenkinhill

And for the quantity box, make an override for components/com_virtuemart/assets/css/vm-ltr-site.css 

Look for line: input.quantity-input{height:2.2em!important;width:2.2em!important;text-align:center;font-weight:700;padding:0.1em;margin-bottom:0!important;}

And change  width:2.2em  to whatever value suits you.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

tadeystas

Quote from: PRO on June 15, 2015, 21:20:27 PM


<?php echo $product->product_in_stock ?>

Thank you. I still have a question: where would I place this. I would like to display stock quantity instead of level in category page for each product. I have not found in category\default.php anything that shows stock level.


P.S. I apologize for 'bumping'. I have not realized it is against the rules.



Quote from: jenkinhill on June 15, 2015, 23:53:57 PM
And for the quantity box, make an override for components/com_virtuemart/assets/css/vm-ltr-site.css 

Look for line: input.quantity-input{height:2.2em!important;width:2.2em!important;text-align:center;font-weight:700;padding:0.1em;margin-bottom:0!important;}

And change  width:2.2em  to whatever value suits you.

Thank you! I would have never found it by myself.

jenkinhill

QuoteI have not found in category\default.php anything that shows stock level.

It is in the products.php sublayout within the div  <div class="vm-product-rating-container">
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

tadeystas

Quote from: jenkinhill on June 17, 2015, 10:52:57 AM
It is in the products.php sublayout within the div  <div class="vm-product-rating-container">


Thanks!!! You were great help!!