Magento Products Not Showing Up After Import – Troubleshooting Guide

importexportmagento-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.

Best Answer

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
);
Related Topic