I uploaded around 100 new products by CSV but cannot see them in "Manage Products" in the admin (having no filters on the search). Strangely I can see them in the tables in the database and when I look at a category can also see them in "Products in Category". I have flushed the cache and reindexed the products.

I have used this technique many times before so it is quite baffling. I cannot find anything out there with these symptoms of this problem. Thanks to anyone that has either previously had this problem or can shed some light - suggestions, etc damn I'll take anything. Thanks.

  • when you import product using csv then make sure you set store view and status
    – Keyul Shah
    Apr 20 '14 at 12:37
  • Did do - thanks though. Any more? Apr 20 '14 at 16:55
  • Must check product visibilty
    – Keyul Shah
    Apr 21 '14 at 4:24
  • How are you uploading the products? By using an extension or default magento product upload?
    – Sukeshini
    Apr 21 '14 at 5:16
  • @Keyul Shah - I cannot find the products in "Manage Products" in the admin so I cannot. Apr 22 '14 at 9:56

The sql select that is executed when viewing the product grid is this:

SELECT `e`.*, `at_qty`.`qty`, `at_status`.`value` AS `status`, `at_visibility`.`value` AS `visibility` FROM `catalog_product_entity` AS `e`
 LEFT JOIN `cataloginventory_stock_item` AS `at_qty` ON (at_qty.`product_id`=e.entity_id) AND (at_qty.stock_id=1)
 INNER JOIN `catalog_product_entity_int` AS `at_status` ON (`at_status`.`entity_id` = `e`.`entity_id`) AND (`at_status`.`attribute_id` = '273') AND (`at_status`.`store_id` = 0)
 INNER JOIN `catalog_product_entity_int` AS `at_visibility` ON (`at_visibility`.`entity_id` = `e`.`entity_id`) AND (`at_visibility`.`attribute_id` = '526') AND (`at_visibility`.`store_id` = 0)

The attribute ids may be different depending on your instance, but the idea is that the main table (catalog_product_entity) is INNER JOIN-ed with the catalog_product_entity_int twice. Once for showing the status and once for showing the visibility.
If you don't have values in the catalog_product_entity_int for status and visibility for some products they won't appear in the grid.
But you can still edit the product. Just click on any edit link and then change the id in the url to the one you need. If click save on it you will be able to see that on the grid.

I guess you cannot do that for 100 products manually.
but you can run this script that will automatically add status and visibility to the imported products.
Identify the product ids that are missing in the grid but they are present in the catalog_product_entity table and put them all in an array. Let's call that $productIds.
Then run this:

    array('status'=>1, 'visibility'=>4),

This should solve your issue.
If you modified the default grid and added your own attributes then you might need to add them in this script also.
Try it first for one product and see if it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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