magento sales_flat_order_grid集合按自定义字段过滤

时间:2018-06-12 05:15:17

标签: php magento

我在magento 1.9.3.4管理面板中的订单列表中创建了一个新列,但是当我们过滤列表时,它显示以下sql查询

enter image description here

以下是显示订单列表的自定义功能

    protected function _prepareCollection()
{
    $collection = Mage::getResourceModel($this->_getCollectionClass());
     $collection->getSelect()->joinLeft(array('gr_order'=>'webtexgiftregistry_orders'), 'main_table.entity_id = gr_order.order_id','gr_order.order_id');
    $collection->getSelect()->joinLeft(array('gift' => 'webtexgiftregistry'), 'gift.registry_id = gr_order.giftregistry_id','gift.giftregistry_id');
    $collection->getSelect()->group('main_table.increment_id');
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

我如何显示过滤列表

0 个答案:

没有答案