dungiis Posted September 4, 2009 Share Posted September 4, 2009 Hello folksAs i mentioned at the previous topic I am using Prestashop for a Vietnamese Project but having a problem when add and display price of each productI created VND Currency and set them as default. When i create a product with the price is 15000000 it always converts to 9999999. You can see demo here- Before posting the price : http://beetbe.com/img1.png- After posting the price : http://beetbe.com/img2.pngThe price is always being converted to 1000000 at the Back-end and font-end of the websiteIt's amazing that the problem not appears at my localhost it only appears on Server and i don't know why Anyone here or PS developers could give me solution or indicate to me the function that uses for convert functionality?Thank you very much Link to comment Share on other sites More sharing options...
presta-dyr Posted September 4, 2009 Share Posted September 4, 2009 It is a good idea to describe the problem in the subject when you post.I can't see it will ever work. The price field in the database is defined as decimal(13,6). If your prefix is ps_ you can run:ALTER TABLE `ps_product` CHANGE `price` `price` DECIMAL( 17, 2 ) NOT NULL DEFAULT '0.000000';ALTER TABLE `ps_product` CHANGE `wholesale_price` `wholesale_price` DECIMAL( 17, 2 ) NOT NULL DEFAULT '0.000000';from phpMyAdmin. You have to adjust fields in the tables delivery, discount, discount_quantity, group, orders, order_detail and order_discount as well./Kjeld Link to comment Share on other sites More sharing options...
dungiis Posted September 4, 2009 Author Share Posted September 4, 2009 But please tell me why it can be ok with Localhost. The problem is just with server with a database ? Link to comment Share on other sites More sharing options...
presta-dyr Posted September 4, 2009 Share Posted September 4, 2009 It seems your database system on localhost handles too big numbers differently./Kjeld Link to comment Share on other sites More sharing options...
dungiis Posted September 4, 2009 Author Share Posted September 4, 2009 No Presta-dyr! I just use 1 database for Localhost and Server but the just have problem with Server I run the query as you mentioned above but it's error "#1064 - 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 '’0.000000’' at line 1 " Link to comment Share on other sites More sharing options...
radders Posted September 4, 2009 Share Posted September 4, 2009 Do you really need that much precision? Seeing as there are around 18,000 of these to the mighty dollar why not just use something like VND (000) as your currency? Link to comment Share on other sites More sharing options...
dungiis Posted September 4, 2009 Author Share Posted September 4, 2009 I have to increase the price fields from decimal(13,6) to decimal(15,6) and it works )Thank you presta-dyr Link to comment Share on other sites More sharing options...
Recommended Posts