Php 如何使用marketplace多供应商扩展在magento的销售订单网格中创建自定义列
我正在尝试在我的销售订单网格中添加列。我的专栏将是产品的卖家名称。我有一个多供应商市场扩展。 我找到了卖方id,即客户id,但我可以在卖方id的帮助下找到全名 我试图解决它,这是我使用的代码Php 如何使用marketplace多供应商扩展在magento的销售订单网格中创建自定义列,php,mysql,magento,Php,Mysql,Magento,我正在尝试在我的销售订单网格中添加列。我的专栏将是产品的卖家名称。我有一个多供应商市场扩展。 我找到了卖方id,即客户id,但我可以在卖方id的帮助下找到全名 我试图解决它,这是我使用的代码 protected function _prepareCollection() { $collection = Mage::getResourceModel($this->_getCollectionClass()); $collection->getS
protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection->getSelect()->join('marketplace_saleslist', 'main_table.entity_id = marketplace_saleslist.mageorderid',array('mageproownerid'));
$this->setCollection($collection);
return parent::_prepareCollection();
}
现在我添加以下列
$this->addColumn('mageproownerid', array(
'header' => Mage::helper('sales')->__('Seller ID'),
'index' => 'mageproownerid',
));
Grid.php是:
}
我想使用“marketplace\u saleslist”字段“mageproownerid”上的联接将上表与“customer\u account”表关联起来
我们如何找到客户全名
请告诉我解决办法
谢谢大家。您可以在grid.php文件中创建helper函数并更改列
$this->addColumn('mageproownerid', array(
'header' => Mage::helper('sales')->__('Seller ID'),
'index' => 'mageproownerid',
'type' => 'options',
'options' => Mage::helper('yourmodule')->getCustomerName(),
));
$this->addColumn('mageproownerid', array(
'header' => Mage::helper('sales')->__('Seller ID'),
'index' => 'mageproownerid',
'type' => 'options',
'options' => Mage::helper('yourmodule')->getCustomerName(),
));