Skip to main content

Column is twice in the CSV File

More
13 years 1 month ago #118892 by piggybank
-- HikaShop version -- : 2.2.0
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.8

I am trying to import a CSV file (attached) and I'm getting a series of errors like:
The column "product_code" is twice in your CSV. Only the second column data will be taken into account.
The column "product_parent_id" is twice in your CSV. Only the second column data will be taken into account.

I have tried my CSV file in various combinations. My most recent has double quotes with a semi-colon delimiter, attached.

Thanks,

Scott

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

More
13 years 1 month ago #118908 by Jerome
Hi,

CSV files are not allowed by our Kunena forum. Please put your CSV file in a zip.

Your messages indicates that the columns "product_code" and "product_parent_id" are twice in the file. So I want to say that the problem is that the columns "product_code" and "product_parent_id" are twice in your CSV file.
Please check the first line of your CSV file, checking the columns and remove the duplicates ones.

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.

More
13 years 1 month ago #118910 by piggybank
Thank you.

I've reattached the file...no duplicate first line/column names that I can see.

Scott

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

More
13 years 1 month ago #118948 by Jerome
Hi,

Please edit the file "administrator/components/com_hikashop/helper/import.php" and replace the code
Code:
foreach($this->columns as $otherColumn){ if($this->columns[$i] == strtolower($otherColumn)) {
By:
Code:
foreach($this->columns as $k => $otherColumn){ if($i != $k && $this->columns[$i] == strtolower($otherColumn)) {
It will solve your problem.
After that, the import should work properly, the warning message is just a warning, it does not affect the rest of the import.

Sorry for the inconvenient.

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.

More
13 years 1 month ago #119739 by piggybank
Thank you...this deed indeed remove the error message.

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

More
13 years 1 month ago #119949 by lionel75
piggybank, you say you have many mesage error but you don't say if the import of data is ok ?
Do you succeed to import all the data locate in the csv file even when all this messages occurs ?

Thank's

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

More
13 years 1 month ago #120026 by mad-q
Hello,

I can not find the code you list in my file.

Here is an example of my csv file.

product_name,product_description,product_quantity,product_code,product_published,product_tax_id,categories,price_value,price_currency_id,images,related
Tool box lock and keys N/A,"Sorry, no stock. If you order this we will put it on back order",-1,T2573,1,11,2,0,GBP,T2573.jpg,

Cheers
Iain

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

More
13 years 1 month ago #120048 by Eliot
Hi lain,

If you don't have the code in your file you''re either editing the wrong file or using an older version.
Try to download the last Hikashop version again an reinstall it.

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

More
13 years 1 month ago #120109 by mad-q
Hello
As per usual you are correct, many thanks.

Iain

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

Time to create page: 0.262 seconds
Powered by Kunena Forum