Post by jimaras » Wed Jan 18, 2012 3:02 pm

Hi,
I need the quantity in demical because i use kilogram in my store.
I'm using 1.5.1.3

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am

Post by MarketInSG » Wed Jan 18, 2012 7:02 pm

Hi

You can go to you database, edit the structure of your table, "product". Change the field, "quantity", from "int(4)" to "decimal(5,2)" That will allow decimals to be placed into the field.

Regards
MarketInSG


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by jimaras » Wed Jan 18, 2012 10:29 pm

MarketInSG wrote:Hi

You can go to you database, edit the structure of your table, "product". Change the field, "quantity", from "int(4)" to "decimal(5,2)" That will allow decimals to be placed into the field.

Regards
MarketInSG
Hi MarketinSG,
I do this but nothing changed!

Then I do this(thanks to @georgekaf):

1.I run in my database

Code: Select all

    ALTER TABLE `product` CHANGE `quantity` `quantity` DECIMAL( 4, 2 ) NOT NULL DEFAULT '0.00'
    ALTER TABLE `product` CHANGE `minimum` `minimum` DECIMAL( 4, 2 ) NOT NULL DEFAULT '0.00'
2.In admin/model/catalog/product.php

I change

Code: Select all

(int)$data['quantity']
to this

Code: Select all

(float)$data['quantity']
and I change this

Code: Select all

 (int)$data['minimum']
to this

Code: Select all

(float)$data['minimum']
3. In system/library/cart.php

I change this

Code: Select all

(int)$qty
to this

Code: Select all

(float)$qty
So with these changes, decimals will be allowed to be placed into the field but in admin panel Sales->Orders->View->Products the quantity isn't in decimal but the total is correct!
admin.jpg

admin.jpg (28.42 KiB) Viewed 799 times

Also in history->View->Info order (front store) the quantity is wrong, but the total is correct
front.jpg

front.jpg (33.19 KiB) Viewed 799 times

And my major problem is that in admin panel->Catalog->Data in the "Minimum Quantity" didn't allowed decimal

http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am

Post by jimaras » Thu Jan 19, 2012 3:10 am

Also i need a picker in quantity field in product

You can see in image the time picker with hours and minutes
I need something like this for kilos and grams.

timepicker.jpg

timepicker.jpg (34.17 KiB) Viewed 790 times


http://e-kreopoleio.com/


Active Member

Posts

Joined
Thu Sep 15, 2011 1:45 am
Who is online

Users browsing this forum: No registered users and 10 guests