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

Add Custom Field in Cross-sells
 
dd_gustav
Jr. Member
 
Total Posts:  1
Joined:  2012-08-20
 

In the product listning under Cross-sells tab. I need to add an extra field called \\\"upsell type\\\”. Ive managed to add this field by modifying the code in:

app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crossell.php

By simply copying and modifying one of the code snippets in the _prepareColumns() function. The code looks like this:

$this->addColumn('upsell', array(
    
'header'            => Mage::helper('catalog')->__('Upsell'),
    
'name'              => 'upsell',
    
'width'             => 60,
    
'type'              => 'number',
    
'validate_class'    => 'validate-number',
    
'index'             => 'upsell',
    
'editable'          => !$this->isReadonly(),
    
'edit_only'         => !$this->_getProduct()->getId()      
));

This adds an extra “upsell” field in Cross-sells listning. But i need to be able to read/write to it as well. Can anyone show me how its done, or point me in the right direction?

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