Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Admin->Catalog->Manage Products - Add Category Column
 
gwatt
Jr. Member
 
Total Posts:  15
Joined:  2008-04-01
 

Hello;

I have a customer that has a large number of products and categories. When looking at the Admin->Catalog->Manage Products it is very confusing to know which product is which, as most of the products have similar names and attribute sets.

However they have a very good Hirearchy of categories, so the obvious solution would be to add a column beside the name field, that displayed the Category/sub-category/subcategory that each product has been assigned to, and a empty field if it has not been assigned to a category.

I have looked at a number of places in the code where Manage Products grid is generated, but can not seem to locate how you would do this.

Short version of the Question:
How Do You Add a Category/Subcategory column to the Admin->Catalog->Manage Products grid

 
Magento Community Magento Community
Magento Community
Magento Community
 
gwatt
Jr. Member
 
Total Posts:  15
Joined:  2008-04-01
 

Thought I would post my progress

By editing app\code\core\mage\Adminhtml\Block\Catalog\Product\Grid.php

and adding

->addAttributeToSelect('category_ids')

to the _prepareCollection() function

like this

protected function _prepareCollection()
    
{
        $store 
$this->_getStore();
        
$collection Mage::getModel('catalog/product')->getCollection()
            ->
addAttributeToSelect('sku')
            ->
addAttributeToSelect('name')
            ->
addAttributeToSelect('attribute_set_id')
            ->
addAttributeToSelect('type_id')
            ->
addAttributeToSelect('category_ids')
            ->
joinField('qty',

as well as adding to the _prepareColumns() function

$this->addColumn('category',
            array(
                
'header'=> Mage::helper('catalog')->__('Category'),
                
'index' => 'category_ids',
        ));

I can get the category ids to display in a category column.

Now my question is

How do i get the category Ids to display as the Category Paths?

 
Magento Community Magento Community
Magento Community
Magento Community
 
gwatt
Jr. Member
 
Total Posts:  15
Joined:  2008-04-01
 

Figured it most of the way out by following this tutorial

http://www.magentocommerce.com/boards/viewthread/8901/

Now I just need to figure out how to make the categories filter correctly

 
Magento Community Magento Community
Magento Community
Magento Community
 
gunjack07
Jr. Member
 
Total Posts:  7
Joined:  2009-12-18
 

i know it’s an old thread but this method works well!!! thx.. any luck with displaying the category names instead of the ids?

 
Magento Community Magento Community
Magento Community
Magento Community
 
wmcmusic
Member
 
Avatar
Total Posts:  56
Joined:  2009-02-12
 

Has anybody had any joy in getting this to work with 1.41 or a way of doing so?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mancourt
Member
 
Avatar
Total Posts:  34
Joined:  2010-08-03
 

Sort of stumped why this isn’t a core feature…

Wanted to check on a 1.41 solution as well…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

It is possible to display categories on the product grid (and also filter products by categories) with the help of Extended Product Grid with Editor extension.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jtechextensions
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2013-01-06
 

additionally a real simple solution here and more then 1/2 the price

http://www.magentocommerce.com/magento-connect/catalog/product/view/id/15880/s/category-filter-for-admin-products-grid-5447/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top