News:

Looking for documentation? Take a look on our wiki

Main Menu

Stock Quantity

Started by heppers, April 05, 2017, 21:40:43 PM

Previous topic - Next topic

heppers

Apologies for the slight duplication, but im finding what i have found very difficult to follow.
I'm after a n00b/simple/dummies guide to replacing the red/amber/green stock level bars with text "Quantity in stock: X" where X obviously is the qty in stock.

I've found a few things but it says "use this line of code" but then doesn't say exactly where it needs to go.

I'd also like it to show the QTY on the product page as well as on the category page.

I'm not really a programmer so my knowledge of html/php is very limited :)

Maybe to expand...
In category view you have the product image at the top
Under that you have the product title, and next to it the traffic light stock level
Under that you have Description
Under that and to the left is Price,

Can i get the Quantitiy in stock to the right of the price?

GJC Web Design

No one can help you without versions, template and a live site would obviously help...

qty is in the product object as   $product->stock->stock_level

if u echo this you have a number

so place your code where u want to see it
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

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

heppers

DOH! Sorry I'm running Joomla 3.6.5 and VM 3.2.1!
>Facepalm<

GJC Web Design

QuoteFor template/layout/function issues a live site url is required  <------------

how could we know what of the 100's of available templates u are using?

but my instructions above still apply.. the info is there.. u just need to display it
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

heppers

#5
I'm really not awake this morning am i? The default protostar template that comes with Joomla...
Runs away to facepalm. again.
http://pedders.noip.me/bbhs/index.php/shop
Also PHP 5.6.27 :)