Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show available stock quantity in Ubercart?

I defined a stock quantity for a product in Ubercart. And I want to show the remain quantity in the product node view.

However, I did not find a quantity field in /admin/store/settings/products/edit/fields ? How can show the remind quantity in the product node view? Thanks!

like image 320
ohho Avatar asked Oct 15 '25 09:10

ohho


2 Answers

Investigate $node via dsm($node) (devel) or print_r($node) in node-product.tpl.php.
Also in uc_stock module - uc_stock_level function used for getting level by sku.

like image 130
Nikit Avatar answered Oct 19 '25 01:10

Nikit


Once you go to the stock setting page and sort out your message which will be sent when the threshold is met, you need to go to each product edit node. Near the EDIT / VIEW tabs along the top of the node you should see a STOCK tab in the horizontal tab menu along with ATTRIBUTES, OPTIONS, and ADJUSTMENTS. Click on the STOCK tab and there you can edit total stock, set your threshold, etc ....

Then you can create a product view using Ubercart Views module and choose to show stock.

like image 30
Marc Debiase Avatar answered Oct 19 '25 03:10

Marc Debiase



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!