Just another WordPress.com weblog

Archive for June, 2011

Magento Transactional Email not working

Magento Transactional emails not working

IF you installed wysiwyg editor ,, then try to disable from etc/modules/Namespace_Modulename.xml

Thanks
vishal surani

Advertisements

Integrity constraint violation: 1052 Column in where clause is ambiguous”

For example in our custom module we have to add order_id in grid, if we search by order id in grid than such type of error occurs.

SQLSTATE[23000]: Integrity constraint violation: 1052 Column ‘Order_id’
in where clause is ambiguous

to resolve such error we can add ‘filter_index’=>’main_table.order_id’ in $this->addColumn() function


$this->addColumn('order_id', array(
'header' => Mage::helper('couponcode')->__('Order Id'),
'align' =>'left',
'index' => 'order_id',
'filter_index'=>'main_table.order_id', // This parameter helps to resolve above error
));

Thanks,
Bijal Bhavsar 🙂