7

We want to show extra fields in products ordered report. Extra fields are sku, cost_price(new attribute) and sold price(price)

I have found following class which handle this.

Mage_Adminhtml_Block_Report_Product_Sold_Grid

And also I found following controller class which handle this.

Mage_Adminhtml_Report_ProductController

I was failed to full fill this requirement. Can anyone help me on this? Thanks.

2

Open app\code\core\Mage\Adminhtml\Block\Report\Product\Sold\Grid.php and put the below code in _prepareColumns() function

You can move Grid.php in your local folder as well.

$this->addColumn('sku', array(
    'header'    => Mage::helper('reports')->__('Product Sku'),
    'index'     =>'sku'
));

Code Taken From: http://chandreshrana.blogspot.in/2016/08/add-sku-column-in-products-ordered.html

1

You need to add a field in sales_flat_order table and just use following code:-

for save data:

$orders = Mage::getModel('sales/order')->load($orderId);
$orders->setYourField($data);

for display

$orders = Mage::getModel('sales/order')->load($orderId);
$orders ->getYourField();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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