Magento为数量添加了太多零

Magento为数量添加了太多零

问题描述:

So I am working on a site that uses magento and I noticed when I go to a product the quantity in stock displays the correct value, but with too many zeros on the end of it like this : enter image description here

I found the code where this may be changed: enter image description here

所以我正在使用magento的网站上工作,我注意到当我去产品时显示库存数量 正确的值,但在它的末尾有太多的零,如下所示: p>

我找到的代码可能是 已更改: p> div>

to solve this you need to find from which file this is comming

for that use Template Path Hint extension in Magento

then after then the code like :

number_format('QTY-VARIABLE',2);

so it will add 2 zero only and if you not want to add then in second param put 0

let me know you want to know more

You can edit $v->getCustomoptionsQty() to number_format($v->getCustomoptionsQty() , 0)