Mhernandez
Mhernandez

Reputation: 15

Magento adding too many zeros to quantity

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

Upvotes: 0

Views: 59

Answers (2)

Đặng Hiệp
Đặng Hiệp

Reputation: 54

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

Upvotes: 0

Jayram Prajapati
Jayram Prajapati

Reputation: 394

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

Upvotes: 1

Related Questions