0

I want to add a featured column just after position column in the following section

Catalog -> Manage Categories -> Category Products

This column should have checkboxes. The products for which checkboxes are checked will be considered as featured products for that specific category and will be listed in the frontend.

Any help or clue will be highly appreciated.

Thanks.

2 Answers 2

0

To add the new column, you will need to override the Core Block Mage_Adminhtml_Block_Catalog_Category_Tab_Product that lists the products in the category You can use the same method as Position column

$this->addColumn('position', array( 'header' => Mage::helper('catalog')->__('Position'), 'width' => '1', 'type' => 'number', 'index' => 'position', 'editable' => !$this->getCategory()->getProductsReadonly() //'renderer' => 'adminhtml/widget_grid_column_renderer_input' ));

You will need to change the 'index' and editable

And add an attribute called featured in the product

2
  • This way I can only make a checkboxes column visible in the backend. Data will not be saved. I have already tried this. It is not working for me. Mar 11, 2015 at 7:27
  • You can add an observer for category save event, and save the data from observer Mar 11, 2015 at 7:41
0

I understand it's a common way to think of featured being an attribute of a product, but if all you want is create a collection of featured products, then think of that collection as a category.

For the backend there's little difference in workflow and you don't need custom attribute and code. All the tools to render such a category can be done in layout XML, including the homepage.

This message is sponsored by the KISS foundation. ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.