本文整理汇总了PHP中Mage_Sales_Model_Resource_Order_Abstract::_initVirtualGridColumns方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Sales_Model_Resource_Order_Abstract::_initVirtualGridColumns方法的具体用法?PHP Mage_Sales_Model_Resource_Order_Abstract::_initVirtualGridColumns怎么用?PHP Mage_Sales_Model_Resource_Order_Abstract::_initVirtualGridColumns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Sales_Model_Resource_Order_Abstract
的用法示例。
在下文中一共展示了Mage_Sales_Model_Resource_Order_Abstract::_initVirtualGridColumns方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _initVirtualGridColumns
/**
* Init virtual grid records for entity
*
* @return Mage_Sales_Model_Resource_Order_Invoice
*/
protected function _initVirtualGridColumns()
{
parent::_initVirtualGridColumns();
$adapter = $this->_getReadAdapter();
$checkedFirstname = $adapter->getIfNullSql('{{table}}.firstname', $adapter->quote(''));
$checkedLastname = $adapter->getIfNullSql('{{table}}.lastname', $adapter->quote(''));
$this->addVirtualGridColumn('billing_name', 'sales_flat_order_address', array('billing_address_id' => 'entity_id'), $adapter->getConcatSql(array($checkedFirstname, $adapter->quote(' '), $checkedLastname)))->addVirtualGridColumn('order_increment_id', 'sales_flat_order', array('order_id' => 'entity_id'), 'increment_id')->addVirtualGridColumn('order_created_at', 'sales_flat_order', array('order_id' => 'entity_id'), 'created_at');
return $this;
}
示例2: _initVirtualGridColumns
/**
* Init virtual grid records for entity
*
* @return Mage_Sales_Model_Resource_Order
*/
protected function _initVirtualGridColumns()
{
parent::_initVirtualGridColumns();
$adapter = $this->getReadConnection();
$ifnullFirst = $adapter->getIfNullSql('{{table}}.firstname', $adapter->quote(''));
$ifnullLast = $adapter->getIfNullSql('{{table}}.lastname', $adapter->quote(''));
$concatAddress = $adapter->getConcatSql(array($ifnullFirst, $adapter->quote(' '), $ifnullLast));
$this->addVirtualGridColumn('billing_name', 'sales_flat_order_address', array('billing_address_id' => 'entity_id'), $concatAddress)->addVirtualGridColumn('shipping_name', 'sales_flat_order_address', array('shipping_address_id' => 'entity_id'), $concatAddress);
return $this;
}