4
votes

I've been battling with this issue for the last week now, and am really hoping someone here might be able to help me with it.

After repeatedly importing products from a CSV generated by a different (and slightly older) Magento store, using both the Import and the Dataflow/Import All Products tools, I can get them to show up in the backend, seemingly with all the data intact and with images and everything, but they simply will not show up in the frontend.

It seems that the only way to make them show up in the frontend is to save them from the admin product page, which I'd rather not make the client do on 1922 products. They do not show up if I add them to categories from the category manager, only (as far as I know) if I save them from the product manager page.

Also note that all products

  • are enabled
  • have stock quantity > 0, weight > 0 and price > 0
  • have stock availability = In Stock
  • have visibility = "Catalog, search"
  • have the correct website assigned to them
  • have the right tax class associated with them

In addition, the cache has been entirely disabled and I've re-indexed everything at least two dozen times. I've also tried running the following snippet of PHP:

$products = Mage::getModel('catalog/product')
                    ->getCollection()
                    ->addAttributeToSelect('*');
foreach ($products as $product) {
    if ($product->isSaleable())
        Mage::log("Sellable product: {$product->getId()}");
    else
        Mage::log("Unsellable product: {$product->getId()}");
}

and the log file subsequently contains nothing but "Sellable product: ...". I've also used the same product loop to set the website ID of the product and then save it, which also makes no difference. I've tried outputting the attribute values of various invisible products (using $product->getData()) both before and after saving through the product manager, but I cannot locate any differences whatsoever. I have not examined every MySQL table before and after saving, and frankly, I'd rather not have to do that.

I'm at wits' end. I don't know what else to try. I could re-import the product list for the umpteenth time, but I doubt it'll make a difference. I could try mass-updating the products again (using the product manager's "Actions" dropdown set to "Update Attributes"), but it's probably not going to help this time either. Does anyone have any ideas whatsoever?

My apologies if this is not the correct venue for this kind of question; feel free to point me in the right direction if that's the case.

UPDATE

Turns out that the products did not actually have the right website set, even though the admin panel clearly claimed so for all the products I looked at (none of which showed up in the frontend).

Solution: Manage Products > Select All, then select the action Update Attributes and add the products to the correct website(s). Don't forget to rebuild the indexes.

3
check your store id, is must be same on frontend store id.Josua Marcel C
rather than put your own answer on your question, it will be better to answer it below and mark your own answer as the correct answerivantedja
@ivantedja Ah, yes, you're right about that. Sorry. :) I'm still fairly new to SO. Thanks for reminding me.Adam Heurlin

3 Answers

5
votes

I had the same problem, so thank you for this answer you provided in your post:

UPDATE

Turns out that the products did not actually have the right website set, even though the admin panel clearly claimed so for all the products I looked at (none of which showed up in the frontend).

Solution: Manage Products > Select All, then select the action Update Attributes and add the products to the correct website(s). Don't forget to rebuild the indexes.

0
votes

Just to add to this - I also had the same problem, however mine turned out to be the is_in_stock was either 0 or set to a qty value. Needs to be 0 or 1.

Just incase anyone has that issue.

0
votes

Do you have gd php extension?

Install it (in CentOS):

yum install gd gd-devel php-gd

After execute this

service httpd restart

Best Regards