1

I've been trying to import products from Magento 1.7 to 1.9, but have been running into a lot of problems.

When trying to export with System-Import/Export-Export and then Importing through Dataflow Profiles I'm getting the error:

Skipping import row, required field "sku" is not defined.

I tried saving with encoding UTF-8 in Sublime Text 2, but that didn't work.

When trying to export through dataflow profile and then import through dataflow profile the products don't show up, but it does finish the import without errors.

Processed 100% 241/241 records 
Imported 241 records

Here a person found a solution, but I do not really understand what he did there: https://stackoverflow.com/questions/12953584/product-is-not-displaying-in-listing-in-magento-after-import

EDIT: Products appear under category products and when making new product, you can select them as related product.

1
  • is it the first time you do this? or did you change something regarding flat tables for products? Jul 22, 2014 at 8:23

7 Answers 7

6

I'm not 100 sure but I think it has something to do with the status or visibility or the product.
In the products grid, when retrieving the collection there are 2 inner joins for selecting the status and visibility. (actually there is a third one, for the name but I doubt this is the problem).
If there are no values for visibility and status the product does not appear in the grid.
To test this, edit any product in the backend, then look in the table catalog_product_entity for a record that does not appear in the grid.
Change the id in the url with the one from the product that does not appear and you should be able to edit it. Set a visibility and status and save. If it appears after that int he grid then this is the problem for sure.

TO solve it, make all your products enabled and visible with this script. You can disable later the ones you don't need.

Crete a file called fix.php in the root of the magento instance with this code

<?php
error_reporting(E_ALL | E_STRICT);
define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;
Mage::app();
$ids = Mage::getModel('catalog/product')->getCollection()->getAllIds();
Mage::getSingleton('catalog/product_action')->updateAttributes(
    $ids,
    array('status'=>1, 'visibility'=>4),
    0
);
12
  • Thank you for your reply, I think that's the problem, but how do I run the script?
    – Vasar
    Jul 22, 2014 at 11:13
  • @Vasar. See the update to my answer.
    – Marius
    Jul 22, 2014 at 11:18
  • Alright, I did that, but nothing happened, still when I look under related products of my test product I created, it shows all the products not visible individually. But the products don't show up under Catalog-Manage Products.
    – Vasar
    Jul 22, 2014 at 11:28
  • This means I was wrong. I had this issue before, but this is how I solved it. Maybe in your case the issue is different.
    – Marius
    Jul 22, 2014 at 11:30
  • Thank you still! But is there any way to change visibility through database?
    – Vasar
    Jul 22, 2014 at 11:36
3

I had a similar issue. My problem was the file encoding. Switching from ANSI to UTF-8 resolved it. Magento says import successful, and the query logs showed movements.

4
  • The answer is not clear please do mention where you made the change in Database or In Code? If it is in code do mention the file name. May 19, 2016 at 13:41
  • The encoding of the CSV file has to be UTF-8
    – Raffael
    May 20, 2016 at 17:06
  • how can i change ansi to utf-8
    – Gem
    Nov 18, 2016 at 9:48
  • Hi guys, using notepad ++ you can switch encoding @Rathinam Sep 13, 2017 at 17:47
2

You must have next fields in CSV

sku _attribute_set _type _category description image name price short_description status tax_class_id thumbnail visibility weight qty _product_websites is_in_stock

Please note that field is_in_stock is mandatory even if qty more than 1

1
  • I had other things done, except is_in_stock, this one solved my issue.
    – ImtiazeA
    Mar 20, 2019 at 2:14
1

Create a new product via the backend and export it using a (newly created) Dataflow export profile. Then compare the format of this file - columns and content - to the one you are trying to import. You probably missed a required column.

You can also remove all products directly from your database:

DELETE FROM catalog_product_entity

and import the file you just exported to check if the same problems occur.

1
  • Thanks for the answer, what would be good program to view csv files. I'm guessing just viewing it with Sublime Text isn't the right way?
    – Vasar
    Jul 22, 2014 at 11:33
0

I think store id is the main issue..you can try to setup store id using CSV or by coding you can set the store id for the product to be import..

1
  • i have one store, when i export products, _store column is empty, what can i do ??
    – Gem
    Nov 18, 2016 at 9:46
0

Check you have the field "status" in you CSV file is set to either Enabled or Disabled.

It happened to me after I forgot to save my CSV file with all values enclosed in " ". The dataflow profiles import returned an error. And even after I tried to feed the correct CSV later, all products have disappeared from product grid (but remained in Catalogs related product list)

The way I solved it - was to create a temporary product and fill as many fields as possible. Perform an dataflow profile export selecting "Export: All Fields"

When I got my new CSV file, I compared fields of my new product with the ones of the hidden ones. The field "status" simply had no value. And it must be either Enabled or Disabled

0

To solve this issue in a short span of time I recommend you to create the products in your new Magento site and export it to XML or Excel format and then input your products once again in the new file and import it.

Ensure that you are not missing any columns. it hardly takes 30 minutes of your patience to rectify this problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.