Magento为数量添加了太多零

时间:2015-12-31 15:11:58

标签: php magento product stock

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

我找到了可以更改的代码: enter image description here

2 个答案:

答案 0 :(得分:1)

要解决此问题,您需要找到来自哪个文件

使用Magento中的模板路径提示扩展

然后代码如下:

number_format('QTY-VARIABLE',2);

所以它只会添加2个零,如果你不想在第二个参数中添加0

让我知道您想了解更多

答案 1 :(得分:0)

您可以将 $ v-> getCustomoptionsQty()编辑为 number_format($ v-> getCustomoptionsQty(),0)