Post by vignir » Fri May 25, 2012 12:33 am

Is there a way to control how many decimal places are shown in admin?
I don´t want any decimal places to be show but now it´s showing four.

I want this: 10000
Now it shows this: 10000.0000

Thanks in advance

New member

Posts

Joined
Fri May 25, 2012 12:30 am

Post by opcrat » Fri May 25, 2012 4:17 am

Decimal places are basically coming from database. To change it, you have to change data type for particular column.

Example, open your database and open coupon table structure, as you can see discount and total has Type decimal(15,4), that means it will add four zeros after digit like 10.0000. If you don't want any zero's than simple change Type to decimal(15,0) it will automatically remove all decimal places.

Most Useful Extensions || Most Selling Extensions
Opencart Development || Opencart Designing || eCommerce Project

✔ Join more than 5000 Happy Opencart Store Owners enjoying the extensions designed and developed by Opcrat, Opencart Partner.


User avatar
Active Member

Posts

Joined
Wed Dec 21, 2011 6:54 am

Post by vignir » Fri May 25, 2012 4:42 pm

Thank you!
That worked :)

New member

Posts

Joined
Fri May 25, 2012 12:30 am

Post by opcrat » Fri May 25, 2012 10:43 pm

You welcome. If your issue is solved than please add solved in title of this topic so that others can understand from list that its already solved.

Most Useful Extensions || Most Selling Extensions
Opencart Development || Opencart Designing || eCommerce Project

✔ Join more than 5000 Happy Opencart Store Owners enjoying the extensions designed and developed by Opcrat, Opencart Partner.


User avatar
Active Member

Posts

Joined
Wed Dec 21, 2011 6:54 am

Post by adida » Sun Oct 07, 2012 2:05 pm

opcrat wrote:Decimal places are basically coming from database. To change it, you have to change data type for particular column.

Example, open your database and open coupon table structure, as you can see discount and total has Type decimal(15,4), that means it will add four zeros after digit like 10.0000. If you don't want any zero's than simple change Type to decimal(15,0) it will automatically remove all decimal places.


In my case it did not work. I am using OC Version 1.5.3.1. I changed exactly as you said. May be, do I have to do anything else in the version 1.5.3.1? ???

Taking back my words - I went to currency table and set the field "decimal_place" from 2 to 0. ;D If anyone want the change, go to currency table.

Newbie

Posts

Joined
Mon Jul 23, 2012 1:22 pm

Post by nsnaveen » Thu Oct 25, 2012 1:39 pm

Iam new to database ect., can you tell me which file i should change to remove decimal.

if you can tell me the exact path it would be very helpful

thanks in advance
naveen

Newbie

Posts

Joined
Wed Aug 15, 2012 1:14 am

Post by nsnaveen » Thu Oct 25, 2012 1:43 pm

Were exactly should i change the value 15,0 i could not find coupon table structure.

could you please tell me exact path and file name to change to get

1000 instend of 1000.00

thanks
naveen

Newbie

Posts

Joined
Wed Aug 15, 2012 1:14 am
Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot], Google [Bot] and 20 guests