Skip to content

Instantly share code, notes, and snippets.

@drobinson
Last active December 23, 2015 20:19
Show Gist options
  • Save drobinson/6688912 to your computer and use it in GitHub Desktop.
Save drobinson/6688912 to your computer and use it in GitHub Desktop.
Fixes problem with loading a product list block while there is a "product" entity set on the registry
Index: app/code/core/Mage/Catalog/Block/Product/List.php
===================================================================
--- app/code/core/Mage/Catalog/Block/Product/List.php
+++ app/code/core/Mage/Catalog/Block/Product/List.php
@@ -71,7 +71,7 @@
// if the product is associated with any category
if ($categories->count()) {
// show products from this category
- $this->setCategoryId(current($categories->getIterator()));
+ $this->setCategoryId(current($categories->getIterator())->getId());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment