Copy:
app/code/core/Mage/Catalog/Block/Product/List.php
(create the appropriate folder):
app/code/local/Mage/Catalog/Block/Product/List.php
Find the following line in List.php:
$this->_productCollection = $layer->getProductCollection();
add the following line below:
$this->_productCollection->joinField('category_product', 'catalog/category_product', 'product_id', 'product_id=entity_id', array('store_id'=> Mage::app()->getStore()->getId()), 'left'); // Here is the explain /* * @param string $alias 'category_product' * @param string $table 'catalog/category_product' * @param string $field 'name' * @param string $bind 'PK(product_id)=FK(entity_id)' * @param string|array $cond * @param string $joinType 'left' * * default definition * joinField($alias, $table, $field, $bind, $cond=null, $joinType='inner') * */
Copy
app/code/core/Mage/Catalog/Model/Config.php
in
app/code/local/Mage/Catalog/Model/Config.php
Locate the following line in the Config.php line:
'position' => Mage::helper('catalog')->__('Position')
Replaced by:
$options = array( 'position' => Mage::helper('catalog')->__('Position'), 'product_id' => Mage::helper('catalog')->__('Product ID') );
PS: I am writing this article from home on which I do not have Magento installed on my machine, so I have not tested it, but the structure is fine. If you encounter any problem, make sure the name of the field and table.