Looks like there are a few people having the same issue I was having with Magento regarding the “Warning: PDO::quote() expects parameter 1 to be string…” error after updating to 1.4. Have no fear! There is a quick solution if you check the block code for the list Magento has created.
- Navigate to app/code/core/Mage/Catalog/Block/Product/List.php (There is a proper way to do this by over-riding the function using app/code/local directory but I’m assuming this will be fixed in the next release)
- On line 65 you will see:
// if this is a product view page if (Mage::registry('product')) { // get collection of categories this product is associated with $categories = Mage::registry('product')->getCategoryCollection() ->setPage(1, 1) ->load(); // if the product is associated with any category if ($categories->count()) { // show products from this category $this->setCategoryId(current($categories->getIterator())); } }
- Remove this block of code
- Voila. It’s working