Post by Fredf » Fri Nov 13, 2015 12:15 pm

I have an unusual problem where I can add a product through admin and everything is fine. After being added, the product appears in the admin product list and shows as 'active'. This is the one and only product currently in the db.

However, the product does not appear in the front end catalog in the category it is assigned to or anywhere else. In fact I can even search for it and no results are found.

I looked in the db and everything looks to be right.

the product exists with all the correct data in all product tables.

product_to_category holds the product_id and the correct category id it is assigned to.
product_to_layout holds the product_id and a store_id of 0 and a layout_id of 0.
product_to_store holds the product_id and a store_id of 0.

As for the categories they too all appear normal and are enabled. But I don't think it would be a category issue anyway since search also returns no results.

Anyone have any ideas?

edited to add running environment:
OC v2.1.01 running locally on xampp with MySQL 5.5.32 (Community Server)
+ PHP 5.6.3

Newbie

Posts

Joined
Fri Nov 13, 2015 12:04 pm

Post by Fredf » Fri Nov 13, 2015 10:23 pm

I've narrowed this down to a problem w/the sql query in catalog/model/catalog/product.php with the function getProducts().

I can comment out the entire query and add:

$sql = "SELECT p.product_id FROM " . DB_PREFIX . "product p
LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) ";

just before:

$product_data = array();

and all of my products then show like they should - on the homepage, in the desired category and from the search function.

To actually fix this the right way I will have to dissect the entire query though using trial and error and that is going to take some time. If anyone has any ideas where to look/start that would be helpful.

Newbie

Posts

Joined
Fri Nov 13, 2015 12:04 pm

Post by raynyumu » Wed Jul 21, 2021 11:29 am

I have the same Issue... Tried editing the as suggested but still the same problem.
Anyone with a solution... I have tried the date fix still no progress.

Newbie

Posts

Joined
Mon May 24, 2021 11:43 pm

Post by Lorigarris » Wed May 25, 2022 12:09 pm

If you’re not seeing the “no products available “ message then the products are actually in the collection but being hidden by something in the code. If they’re hidden by CSS you could probably inspect the page and see what is hiding them. Else it could be something in the liquid preventing them from being rendered. Would be hard to know what exactly is happening without seeing the page in the browser and/or the liquid template.
YourTexasBenefits

Newbie

Posts

Joined
Thu May 12, 2022 2:49 pm
Who is online

Users browsing this forum: No registered users and 127 guests