[ic] SQL Price Rounding Problem
Cameron B. Prince
cplists at princeservices.com
Sat Feb 18 17:03:08 EST 2006
Hey guys,
I recently moved a customer over and shortly after was informed of a problem
where all the product prices had the cents stripped off. A price in the
products.txt of 17.99 was showing up in MySQL as 17.00.
This is IC v4.8.5, MySQL v4.1.16, perl v5.6.2 and the latest DBI and
DBD::mysql.
I reimported the table several times and verified this was happening each
time. I did a describe on the table and found that the price column had not
been modified from the default foundation catalog:
| price | decimal(12,2) | | MUL | 0.00 | |
To further test, I setup a standard catalog using IC v5.4.0 and copied the
products.txt file over and imported it. I had the same problem.
So I begin troubleshooting by dropping the product rows from 29,000+ to
1,000. I still had the same problem. I edited the
dbconf/mysql/products.mysql file and removed:
Database products NUMERIC price
Once I imported again, the prices were correct. Just as a sanity check, I
put the line back in the dbconf file and imported again. The problem
reoccurred. There appears to be a bug in the import function.
I recall seeing code in the admin pages or source in the past that used the
NUMERIC directive to control sorting I believe. Are there any other
ramifications I should be aware of by removing it from the dbconf file?
Thanks,
Cameron
More information about the interchange-users
mailing list