I had the problem that i needed the amount of my products in stock.
Solved this whith a simple formatting function.
num ist the product number,
amount the amount in the package (there can be multiple packages in stock containing this product)
/**
displays num whith total amount...