ohho
ohho

Reputation: 51911

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!

Upvotes: 4

Views: 4490

Answers (2)

Marc Debiase
Marc Debiase

Reputation: 21

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.

Upvotes: 1

Nikit
Nikit

Reputation: 5128

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.

Upvotes: 2

Related Questions