Author Topic: products not showing after CSV import (But AC says it imported OK)  (Read 4174 times)

Offline castigous

  • Newbie
  • *
  • Posts: 44
  • Karma: +3/-0
    • View Profile
Hi!

I've worked extensively on our list of products so it would be readable by AbanteCart (all folollowing the documentation on  and the CSV that are there as examples). I also checked that the [product_id] column was empty for every product.

Now after many hours, I did the procedure and the message AC was that the process was completed succesfully:
Total loaded: 3560. Updated: 0. Created: 3560. Errors: 0

But I return to the products list and I see no update, it's the same short old list.

So I eliminated the first column that says [action] and has [insert] in all the the cells below so I could try it as an update.

It also tells me it was OK:
Total loaded: 3560. Updated: 3560. Created: 0. Errors: 0

But the products still don't appear.

I checked the database with PhpMyAdmin and it seems they're there (table: abc_products) so I don't get get what is happening and I' getting frustrated after so many hours.

I cleaned AC's cache (System/Cache) and even deactivated it on the options.

Please help! I'm on a deadline and the professional support of AC is not even contacting after repeated attempts.

I don't know what to to do

Thanks!
« Last Edit: May 26, 2017, 10:41:03 AM by castigous »

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1600
  • Karma: +93/-1
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #1 on: May 26, 2017, 02:36:56 PM »
Did you assign products to any category?

Do you mind sharing a short sample of your file (2-3 first lines)?
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline castigous

  • Newbie
  • *
  • Posts: 44
  • Karma: +3/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #2 on: May 27, 2017, 09:49:02 AM »
Hi!

Thanks for your response!

Right now I can't access the spreadsheet but is true that I didn't include the variable(s)/column(s) referring to categories and brands (the one I imported had about 10 columns) as I intend to insert/update this list in phases because the spreadsheet requires still some cleaning and editing, besides the mapping of the variables I had done already.

I think it would help greatly to know which variables/columns must be filled and are indispensable to make the import work, and which are optional and can be filled later as an update.

Later I'll try to produce those first three lines!

Thank you!!

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4152
  • Karma: +251/-9
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #3 on: May 27, 2017, 10:57:32 PM »
If you see "Created: 3560" in the report, products are created.

Do you see new products in admin?

Make sure that your cache is actually working. Go to system/cache/ and delete all files and directories.


We need your help to build better free open source eCommerce platform for everyone.
See how you can help

Offline castigous

  • Newbie
  • *
  • Posts: 44
  • Karma: +3/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #4 on: May 28, 2017, 03:06:41 PM »
Thanks for your input!

If you see "Created: 3560" in the report, products are created.

Do you see new products in admin?

Make sure that your cache is actually working. Go to system/cache/ and delete all files and directories.

1- I got:
Total loaded: 3560. Updated: 3560. Created: 0. Errors: 0

So I guess they were not created (although they seem to be there according to phpMyAdmin)

2- No I don't see them in admin, that's the whole point of this post.

3- I cleared the whole AC's cache, re-tried with same result, then I deactivated the AC's cache.


Thanks, but I think it would help greatly to know which variables/columns must be filled and are indispensable to make the import work, and which are optional and can be filled later as an update.


Offline castigous

  • Newbie
  • *
  • Posts: 44
  • Karma: +3/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #5 on: May 29, 2017, 03:11:01 PM »
Did you assign products to any category?

Do you mind sharing a short sample of your file (2-3 first lines)?

Hello and thanks for your response!!

I attach a sample (3 frist lines) file derived from the one used to do the import.

It is true that I didn't include the variable(s)/column(s) referring to categories and brands (the one I imported had about 10 columns) as I intend to insert/update this list in phases because the spreadsheet requires still some cleaning and editing, besides the mapping of the variables I had done already.

I think it would help greatly to know which variables/columns must be filled and are indispensable to make the import work, and which are optional and can be filled later as an update.

I appreciate any comments after seeing the attached sample file.

Thanks!!

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4353
  • Karma: +204/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #6 on: May 30, 2017, 10:06:04 AM »
I think it would help greatly to know which variables/columns must be filled and are indispensable to make the import work, and which are optional and can be filled later as an update.

Hello. See my answer to you in another post http://forum.abantecart.com/index.php/topic,5678.msg24451.html#msg24451
Try to export your existing products and you will see correct format to update/insert product.

In the file you attached missing important columns for example store id. Without it your products loaded to database but not assigned to any store and in result when you visit admin to see Default store's products they are not show up  ;)
“Chuck Norris is so amazing.”
― Mother Teresa

Offline castigous

  • Newbie
  • *
  • Posts: 44
  • Karma: +3/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #7 on: May 30, 2017, 10:29:43 AM »
Thank you!

I did that last week for just a sample of 4 products, but doing that I get a CSV file which has columns that go up to [HJ] wich according to my calculations more than 200 variables/fields/columns.

I have analyzed some of them that includes dates and similar stuff that I guess are not required and that AC can fill later automatically?

That's why I've been asking for a list of the required variable/fields/columns that are INDISPENSABLE to fill to import succesfully, and the rest that would be OPTIONAL/blank.

You just mentioned the store_id variable and someone else mentioned categories --which are 2 that i can see: products_to_categories[0].category_id & products_to_categories[1].category_id both have different values which I guess the 1st one is the main category and 2nd one is a sub-category?

What If have more categories? would they go in different columns:
products_to_categories[2].category_id
products_to_categories[3].category_id
products_to_categories[4].category_id and so on?

I guess only the 1st one products_to_categories[0].category_id is indispensable and the other(s) can be updated later after I have mapped them correctly?

Any other(s) that are indispensable?

Thanks
« Last Edit: May 30, 2017, 10:50:35 AM by castigous »

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1600
  • Karma: +93/-1
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #8 on: May 30, 2017, 10:55:53 AM »
For Admin visibility:

products_to_stores[0].store_id will be important. For most cases it is 0 (unless you have multiple stores)
products.model
product_descriptions[0].name

If you update, you need to have products.product_id

For Storefront, there are many conditions that can cause product to be visible.

products_to_categories[0].category_id is required to show product on a storefront.

Other related to your stock settings, status, etc.
“If you’re in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent.”
― Warren Buffett

Offline castigous

  • Newbie
  • *
  • Posts: 44
  • Karma: +3/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #9 on: May 30, 2017, 01:25:53 PM »
Hi!

So I added this columns that were missing:

products_to_stores[0].store_id (0 in all)
products.model (empty in all)
product_descriptions[0].language_id (1 in all)

But now I'm getting a message "Missing relation ID language_id for update_or_insert action in table product_descriptions. Skipping." at importing which mentions the 3rd column I just described.

Also the column products.product_id I'm leaving it empty because it seems AC don't like to be told which ID to use and prefer to assign it itself?

Still stuck even after all suggestions.


Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4353
  • Karma: +204/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #10 on: May 31, 2017, 01:56:36 AM »
Hello, castigous.
Each product in AbanteCart have a lot of configuration settings, options, option values, half of the configs are multilanguage supported that's why if export everything about product you will see so many columns.

Please see attached very minimum working Tab delimeted CSV file with only 18 columns allowing you to insert product with basic settings like name, weight, price, description, blurb, category id to assign, store id, tax class, quantity etc

Please note it is Example!
“Chuck Norris is so amazing.”
― Mother Teresa

Offline castigous

  • Newbie
  • *
  • Posts: 44
  • Karma: +3/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #11 on: June 01, 2017, 05:56:04 PM »
Hi!

Thank you all and specially Basara for the attached product csv file. Yesterday after adpating it to a very small subset of my product list the CSV data was inserted fine and without issues.

Now I'm having trouble trying to update this same subset of products. It seems AC is expecting the columns to be in a pre-determined order and if one tries to reorganize columns, AC gives error at updating.

So I created an update file with the columns in the exact same order of Basara's example file --changing the first 2 columns:
- action   - with all cells [update]
- products.product_id    - with the corresponding id for the product files I imported.

But now AC is giving this message after uploading the file:
Total loaded: 1. Updated: 0. Created: 0. Errors: 1
There are some errors. Show details
Incorrect structure of main Array node. Only table nodes are expected


I attach the file to have a look

Many many thanks!

Offline castigous

  • Newbie
  • *
  • Posts: 44
  • Karma: +3/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #12 on: June 01, 2017, 06:18:58 PM »
Hi!

A new question!

Of all the columns in Basara's example file I get where everything goes in each product's edit page except for the column products.subtract. What is its function?

Thanks!

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 4353
  • Karma: +204/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #13 on: June 02, 2017, 01:32:34 AM »

But now AC is giving this message after uploading the file:
Total loaded: 1. Updated: 0. Created: 0. Errors: 1
There are some errors. Show details
Incorrect structure of main Array node. Only table nodes are expected



Hello. Please set correct CSV delimiter when you import. In the file attached you have TAB delimiter
“Chuck Norris is so amazing.”
― Mother Teresa

Offline castigous

  • Newbie
  • *
  • Posts: 44
  • Karma: +3/-0
    • View Profile
Re: products not showing after CSV import (But AC says it imported OK)
« Reply #14 on: June 02, 2017, 03:27:50 PM »
Thanks you´re correct.

All day I have been saving with commas and this file for some reason saved without it  :o :-[

Now, I´m trying to update the info for the already entered products.

To do that I exported the products I entered manually to check their variables and copy to the Update CSV file.

I guess in general to do an update only the action and products.product_id columns are required, right?

So I added the columns I wanted to modify and to add (images URLs)

But AC is giving this message spite that columns added are copied verbatim from the export:
There are some errors. Show details
Unknown table: "" requested in relation to table products. Exit this node

I add a sample CSV file of 3 lines to have a look.

UPDATE: I tried also a file without the images URL but with added categories but I get error too. These are the variables I used for that:
products_to_categories[0].category_id
products_to_categories[1].category_id
products_to_categories[2].category_id
products_to_categories[3].category_id


Should to add more variables to have multiple categories added to a product?

Thanks and have a nice weekend!
« Last Edit: June 02, 2017, 03:55:39 PM by castigous »

 

Powered by SMFPacks Social Login Mod