Post by Zviadi » Sun Sep 14, 2008 7:17 pm

how can i save fractional number in quantity for ex: 510.5 cause i sell products according to weight,
please help.

New member

Posts

Joined
Sun Sep 14, 2008 7:11 pm

Post by bruce » Sun Sep 14, 2008 9:58 pm

Try changing the database fields ie: quantity field in the product table to a floating point type rather than int.
also quantity in order_product.

Let us know how it goes.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Zviadi » Mon Sep 15, 2008 4:16 am

i cant modify opencart.sql  any suggestions please,  i try to edit it with notepad but then it causes sql error, it seems like i need some kind of special editor, what shall i do ?

New member

Posts

Joined
Sun Sep 14, 2008 7:11 pm

Post by Zviadi » Mon Sep 15, 2008 4:35 am

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '# DROP TABLE IF EXISTS `address`' at line 1

New member

Posts

Joined
Sun Sep 14, 2008 7:11 pm

Post by bruce » Mon Sep 15, 2008 9:11 am

Modifying the installation sql is not what I meant but you do not need a special editor. By the way, which version of opencart are you installing and is it on a hosted server or a local machine for testing?

You can modify the structure of the database after it is installed using phpmyadmin.
Last edited by bruce on Mon Sep 15, 2008 9:17 am, edited 1 time in total.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Zviadi » Mon Sep 15, 2008 4:29 pm

i m installing 7.8 version on hosted server,  it  almost worked the way you said,  but still a litlle bit problem:  when i have  500.96 in stock  and i order  50.9  the left  value in stock  is    450.96    .96  remains always,  can you help me out here ?

New member

Posts

Joined
Sun Sep 14, 2008 7:11 pm

Post by Zviadi » Mon Sep 15, 2008 6:22 pm

i modified \library\cart\order.php 

quantity = (quantity - " . (float)$product['quantity'] . ")

this way

instead of 

quantity = (quantity - " . (int)$product['quantity'] . ")

it works so far,  thanks bruce, probably i will need your help sometime again cause i m going to stick with this software, thanks.

New member

Posts

Joined
Sun Sep 14, 2008 7:11 pm
Who is online

Users browsing this forum: No registered users and 1 guest