order export puntuation

  • Posts: 171
  • Thank you received: 4
11 years 5 months ago #77707

hey,

when i export orders from the shop, the total prices are written wrong in the CSV file.

exampel in backend 338,95 dkk and in csv it stands as 33.895.000

i can see its same number, but shouldn't it look the same ?

Please Log in or Create an account to join the conversation.

  • Posts: 26008
  • Thank you received: 4004
  • MODERATOR
11 years 5 months ago #77710

Hi,

Can you create a new export, save your CSV file and open it using a simple text editor ?
It is possible that your spreadsheet software convert the number without understanding the number separator.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 4
11 years 5 months ago #77712

thanx that seems to be the problem that its exported with 5 decimals and excel can't figure this out.

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 4
  • Hikashop Business
11 years 2 months ago #91427

How did you solve this? I'm having the same problem with the prices in my csv. Did you find a way to handle the prices correctly in excel?

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 4
11 years 2 months ago #91428

i did string replace in a text editor for this to work.... its still not fixed...
maybee making a xls export button would be the smarter way to do this as it seems the csv isn't compatible with it.

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 2 months ago #91550

The CSV is fine. You can for example open it with OpenOffice Calc instead of Excel and you won't have the issue.
It is important in some cases to export the prices with more than 2 decimals or the prices wouldn't be correct.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 4
11 years 2 months ago #91562

the csv is fine to csv standarts, but when ppl need to use it with excel and don't wanna install openoffice or use other means of converting it, its not fine.

Please Log in or Create an account to join the conversation.

  • Posts: 69
  • Thank you received: 4
  • Hikashop Business
11 years 2 months ago #91573

I've asked a friend who's an excel expert how I could solve this issue. And it is indeed an excel issue. It has to do with the configuration of excel (or your system software, depending of which version of excel you're using). If it has a dot (.) as decimal separator it is working fine. If you have a comma (,) as a decimal separator then the prices are messed up. And that has to do with how excel 'reads' the numbers of the csv file. Has nothing to do with a bug or a bad csv file ;)

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 4
11 years 2 months ago #91720

still doesn't help that the normal user/admin who tries to use this function can't get it to work... doesn't matter if the "error" is in hikashop or excel...

just need a way for them, to get it working easy.

Please Log in or Create an account to join the conversation.

  • Posts: 2334
  • Thank you received: 403
11 years 2 months ago #91923

Hi there,

You may understand that we can't adapt Hikashop to fit an external software bug... it's nonsense.
It you really want to avoid this, a solution would be to edit the export.php file in administrator/com_hikashop/views/order/tmpl and add some code there to replace the coma by a dot in every price.
However it will require some good php skills and I definitely think that using another software (maybe simply a more recent version of excel, we don't have this bug here) is the best solution.

Please Log in or Create an account to join the conversation.

  • Posts: 171
  • Thank you received: 4
11 years 1 month ago #93579

A lot of people use comma as a decimal separator. So all of those people will not be able to open the CSV file correctly in Excel without tampering with system settings.

Another solution would be to make the export configurable to use a user defined (or just choose between comma and dot) decimal separator and then make the export do the string replace. Let's call that a feature request for the future :)

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
11 years 1 month ago #93811

Actually, you should be able to change the decimal separator in the export CSV by just adding a line at the top of the export.php file to change the locale of PHP: stackoverflow.com/questions/2996743/cast...wertab=votes#tab-top

Also, the decimal separator support in Excel can also be changed so that it can import both comma or dot separated formats:
superuser.com/questions/385511/easy-way-...l-separator-in-excel
That's even easier than setting the locale in the code in HikaShop.

Please Log in or Create an account to join the conversation.

  • Posts: 187
  • Thank you received: 10
10 years 6 months ago #129869

Although an older topic, it is still an issue. Just had some clients complaining they could not import the CSV into their bookkeeping program. Here in the Netherlands we use the comma as decimal separator and the export makes some strange numbers:
We get a dot for the thousands as well as for the decimal separator. That doesn't make sense to me and impossible to run a script or do a simple search and replace.

Example:
Price of product is: 3,97 in the export it shows as 397.000
Items that cost 270 euro, display as 2.700.00

Please help us fix this in a professional manner. It is really an issue and clients need those exports to work well for their monthly bookkeeping.
I have several sites where this is an issue and I am afraid I will have to offer an alternative component if this is not fixed soon.

Thank you for your understanding.

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
10 years 6 months ago #129899

Hi,

In my previous post, I already gave a link to some code to add in order to change the exported format of prices. You can add that code from stackoverflow in the file "export" of the view "order" via the menu Display>Views.

Please Log in or Create an account to join the conversation.

  • Posts: 187
  • Thank you received: 10
10 years 6 months ago #129904

HI Nicolas, of course I tried that but it does not help. It seems a combination of how it gets out of Hikashop and the local decimal separator. It is not so simple to just set PHP and get the result right out the examples I gave above.
Please take this as a serious request, I am now forced to test VM :-(

Please Log in or Create an account to join the conversation.

  • Posts: 187
  • Thank you received: 10
10 years 5 months ago #129990

Allow me to explain why this is important to get sorted:

When I build websites I advice people to use Hikashop. I think it is well made, stable and has good support. Almost all Hikashop owners are small companies that need to do their VAT and other bookkeeping monthly and use an electronic bookkeeping system. Mainly online here. We have about 20 different online bookkeeping options here in the Netherlands. Paying and reporting tax is only possible online so the whole process is an electronic one. Most bookkeeping systems I know have a connector for at least Magento and Virtuemart. None has one for Hikashop. I have done research and got quotes for building a connector which will be around 2500 euro if the online bookkeeping system has an API. Most people are asking me if it would not be cheaper to use VM2. If I convince them Hika is better they usually are willing to make the extra step of export/import but then it needs to be a seamless effort. It has to be done at least once a month and then fiddling around is not an option.
So please help me keeping Hika on the map here by trying to find a proper way around this silly comma/decimal system. Part is PHP and localisation, part is also the export of Hika that spits out different number in different ways.
CSV export is not just a gimmick, for a lot of people it is the main connection to the their bookkeeping. Hikashop has grown mature, the pressure for new feature is no longer there. Please spent a bit of your resources to make this all work.

Bastiaan

The following user(s) said Thank You: Zian

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 5 months ago #131078

Hi,

As Nicolas said, you just have to replace the comma by a dot with some code.
All the exports are working fine, there is no price problems, so if it's adding a 0 at the end of the price it's probably due to a wrong modification.

Actually, thanks to the mass actions present in HikaShop you can export the desired data. Not formatting the prices as wanted, but it can be possible by creating a plugin based on the current export feature. By this way you can format the csv file as wanted.

I have added your request in the todo list, but if you need it shortly, you can ask for a quote via our contact form, or post a request on the commercial jobs section of this forum.

Please Log in or Create an account to join the conversation.

  • Posts: 1
  • Thank you received: 0
9 years 5 months ago #177498

Has there been any progress on this? I have managed to get it going correctly by using the data import function in excel but it is still a too lengthy process in comparison with Magento (which is "supposed to be" difficult etc.). Hikashop is a great piece software but I hope, you really start to focus more on the business aspects as well.

As the previous commenter said, Hikashop has matured and it is time to focus on running the business as well as selling products. Otherwise it will be impossible for you to compete on a larger scale (for example with Magento etc.).

Best regards,

Zian

EDITED: got it working with your suggestion. but some of the post still applies.

Last edit: 9 years 5 months ago by Zian.

Please Log in or Create an account to join the conversation.

  • Posts: 187
  • Thank you received: 10
9 years 5 months ago #178754

Zia how did you get it working? It starts to become a major issue here with the accounting department and they want us to switch webshop....
We need a weekly CSV export to accounting and they go crazy with this export. I can't expect them to convert and convert before they import it in their accounting software. Accounts use windows and excel so there must be a proper way to make them happy.

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
9 years 5 months ago #178790

Hi,

The exported files are properly openable in Excel without changing anything of the CSV. Simply, when you open the CSV with Excel you need to make sure that it uses the correct punctuation to read the CSV file. See the answers of that link:
stackoverflow.com/questions/11421260/csv-decimal-dot-in-excel
It's a shame to want to switch the webshop just because Excel is not configured properly to open the CSV.

Please Log in or Create an account to join the conversation.

Time to create page: 0.152 seconds
Powered by Kunena Forum