yast Posted October 22, 2010 Share Posted October 22, 2010 So,im dealing with this particular issue since 2 days and finaly need your help guys.I am running a Prestashop V1.3.2.3 , fresh install.So i got the shop installed fine,configured and all.Played around with the csv import function, tinkered around a bit and it works like a charm - beside the price field !example:in the product .csv i set the price to 312.50 or 312,50 and chose the tab "Price tax excl." at the upload screen and it imports the csv fine ,but in my product listing i see that it only took 312 as price and left the decimals out.If i put in the same prices in the .csv (with xxx,xx or xxx.xx like above) but chose the tab "Price tax incl." at the upload screen i get the following error at csv upload:"2 Errorsproduct1 (ID 111) could not been savedProduct -> price = 268,965517"all the above happens with the language set to german since its the default language of my shop and chosing german as "Select language of the file (the locale must be installed)" in the "Importation" part in TOOLS >> Import.NOW,if i use as price in the .csv "312.50" and in 'TOOLS >> Importation' i chose ENGLISH where it asks "Select language of the file" as language,it just works fine,imports the csv perfectly,calculates Price tax excl/Price tax incl perfectly and shows prices with decimals....So,where is the bug? why does the price field not work with the german language file at csv import?Any help or ideas are welcome because i am dabbling with this since 2 days and i am out of ideas Link to comment Share on other sites More sharing options...
debbie703 Posted October 22, 2010 Share Posted October 22, 2010 The first thing that comes to mind is the comma separated value. If the comma separated value is a "," then that could be why this is happening. Because you have a comma in the price. If that is the case, and you are using Microsoft Excel, you can choose which character to make as the separator.Windows>Control Panel>Region and Language Settings>Formats tab>Additional Settings>List Separator>enter a different character. Re-save your .csv file and try to import again. Be sure to enter the same separator in the import wizard. When you are done, be sure to change your settings back in Windows.Hope this helps! Link to comment Share on other sites More sharing options...
yast Posted October 25, 2010 Author Share Posted October 25, 2010 Thank you for your reply.It is not the comma separated value. I use "#" as comma value and "}" as separator for multiple choices( like categories).I wrote my own php script wich takes product infos from a database and builds a .csv file from it, wich i open later with notepad++ and change the encoding to UTF-8 before uploading to the shop.I tried also both "," and "." as the decimal separator for the price ,no luck.If i upload the .csv as "english"-language file (my shop is german by default) everything works as supposed with the "," as decimal separator for the price. Link to comment Share on other sites More sharing options...
rkaczorek Posted November 19, 2010 Share Posted November 19, 2010 I am facing exactly the same problem.Importing prices from csv for any language but English results in rounding/slicing decimals. No matter what you are using as decimal separatol.yast thanks for the tip - it is the only known solution to this bug. Link to comment Share on other sites More sharing options...
groumph94 Posted November 29, 2010 Share Posted November 29, 2010 You can find a solution here http://www.prestashop.com/forums/viewreply/331367/For those who don't speak french, this bug concerns any field with float values.BugTracker link http://www.prestashop.com/bug_tracker/view/5701/To correct it : Open /prestashop/admin/tabs/AdminImport.php line 1463 (v1.3.2.3 fresh install)replace setlocale(LC_ALL, strtolower($iso_lang).'_'.strtoupper($iso_lang).'.UTF-8'); with setlocale(LC_ALL, 'en_US'); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now