Hi,
That was quite a tricky one to understand
The issue comes from several things:
- the first column of your CSV is the product_code, which is necessary to properly import the products
- your file is saved as a UTF8 with BOM. This means that at the beginning of the file, there is a ZERO WIDTH NO-BREAK SPACE character.
- the mass action system doesn't handle properly the files with BOM and thus the BOM character gets added to the column name of the first column which leads to the first column not being found.
The problem is that since it's a zero width character, you can't see that BOM character when you open the file with notepad++ or when you look at the error message HikaShop provides. So you can't see that the issue comes from that character.
After some debugging, I found that strange character there, which lead me to this page:
stackoverflow.com/questions/9691771/why-...appearing-in-my-html
And thus I was able to put together a solution.
You just need to add the code :
$fileWithBOM = (substr($contentFile,0,3) == pack("CCC",0xef,0xbb,0xbf));
if($fileWithBOM)
$contentFile = substr($contentFile, 3);
before the line:
$contentFile = str_replace(array("\r\n","\r"),"\n",$contentFile);
in the file administrator/components/com_hikashop/classes/massaction.php
This will cut out the BOM character at the beginning if present and your file will then import properly.
We'll add that patch on our end.