Description field (column) in an import.csv file

  • Posts: 152
  • Thank you received: 0
13 years 1 month ago #27542

I often use make bulk changes to products by exporting the products, amending the csv file and importing it.

But blank descriptions show up as 0 in the product_description field, even when I blank it in the import.csv file. And it I leave teh zeros in the import file they show up a zeros on the product page.

What is the best entry for a blank product_description cell in an import.csv file so that it does not show as a zero in the export file.

I need the product_description column in the import file because some products do have a description entry.

Thanks

Jim

Last edit: 13 years 1 month ago by Jims.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 1 month ago #27549

We don't have such behavior on our end. You can try on our demo website, the CSV you can export from HikaShop does not put 0 in the product_description column when the description is empty.

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

  • Posts: 152
  • Thank you received: 0
13 years 1 month ago #27556

Yes, I see that blanks are just "".

Those zeros can only have got into the database through my import files.

Here's what a few lines and columns from my export csv show, I traditionally use comma to separate.

"product_id","product_parent_id","product_name","product_description","product_quantity","product_code"
"3648","parent-ASO-Y40401","Yellow 20 cm","0","-1","ASO-Y40403"
"3649","parent-ASO-Y40401","Yellow 25 cm","0","-1","ASO-Y40404"
"3631","parent-ASO-Y40401","Green 25 cm","0","-1","ASO-G40404"
"3630","parent-ASO-Y40401","Green 20 cm","0","-1","ASO-G40403"

I've done so much importing and exporting that I must have included the zeros at some point.

I'll be more careful :-))

Thanks

Jim

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

  • Posts: 152
  • Thank you received: 0
13 years 1 month ago #27594

Looking at the import.csv file generated by Excel 2010, I noticed that I use different settings for the empty fields.

The export file uses ,"", for an empty field, but my settings for Excel use ,,
See
3601,parent-ASO-Y40401,Beige - 14 cm wide,,-1,ASO-BE40401,variant,cm,0,0,0,0,0,8.95,CAD,aso-be40401.jpg,Beige,14,,,,,
3602,parent-ASO-Y40401,Beige - 17 cm wide,,-1,ASO-BE40402,variant,cm,0,0,0,0,0,11.95,CAD,aso-be40402.jpg,Beige,17,,,,,
3603,parent-ASO-Y40401,Beige - 20 cm wide,,-1,ASO-BE40403,variant,cm,0,0,0,0,0,13.95,CAD,aso-be40403.jpg,Beige,20,,,,,
for three items from my import file.

Before I do a complete import of all items into the Production website, I just wanted to check to see if this format would present any problems to HikaShop. The documentation says that any separator can be used, but does not mention the use of " ".

Thanks again

Jim

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 1 month ago #27595

Double quotes are optional with the CSV format so no problem on that.

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

  • Posts: 152
  • Thank you received: 0
13 years 1 month ago #27598

Thanks very much, Nicolas.

That's good news because I don't think Excel can save as a csv using double quotes.

Jim

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

  • Posts: 152
  • Thank you received: 0
13 years 1 month ago #27694

Sorry, hope I edited this before anyone saw it, I could not see a way to remove the post.

I made a silly error.

Jim

Last edit: 13 years 1 month ago by Jims.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
13 years 1 month ago #27696

I don't know about that. I couldn't find more information about that on google.
But if the semi colon solves the problem then that's great :)

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

  • Posts: 152
  • Thank you received: 0
13 years 1 month ago #27705

I'm sorry for the mixup in the previous post,Nicolas. I did not withdraw the question before you replied. It was a very tough day yesterday with a family emergency and I made a silly error.

Problem is now solved and for others who may run into the same problem, here's what happened.

I have a two page spreadsheet, called ExportEditor.
Page 1 is the current hikashopexort.csv (copied and pasted)
Page two are just the columns of page 1 that I need for the import file linked to page1 by =hikashopexport!A1 etc. I save this page as my import.csv file.

That's where the zeros show up. It has nothing to do with Hikashop.

A blank entry on page 1 is shown as a zero on page 2! This is because there is a default setting in Excel to "show a zero in cells which have a zero value" When I uncheck this, the problem is resolved.

The setting is the options/advanced under the File menu in Excel 2010. It can be set on a sheet by sheet basis.

Hope this save someone some time!!

Jim

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

Time to create page: 0.067 seconds
Powered by Kunena Forum