小编Abo*_*ed1的帖子

如何在使用Github Revert Button恢复PR后再次进行PR和合并

基本上我使用Github还原按钮功能分支的先前PR恢复为master,然后我决定合并我之前恢复的相同功能分支,但我无法这样做.步骤如下:

  1. PR将功能分支合并到master
  2. 从(master)恢复PR合并
  3. 试图创建新的PR以master再次合并功能分支.
  4. 得到这条消息:

没有什么可比的.

master是来自feature-branch的所有提交的最新版本.尝试切换底座以进行比较.

有关如何将功能分支再次合并到的任何建议master

git merge github

30
推荐指数
4
解决办法
1万
查看次数

添加名称和Skus列时,Magento销售订单网格显示错误的记录数

我正在使用Magento 1.4版,我在Sales Order Grid中添加了额外的网格列(名称和skus),返回的数据是正确的,但是我遇到了分页和记录总数的问题,我的代码如下:

首先我编辑了Mage_Adminhtml_Block_Sales_Order_Grid

protected function _prepareCollection()
{
    $collection = Mage::getResourceModel($this->_getCollectionClass())
    ->join(
        'sales/order_item',
        '`sales/order_item`.order_id=`main_table`.entity_id',
        array(
            'skus'  => new Zend_Db_Expr('group_concat(`sales/order_item`.sku SEPARATOR ", ")'),
            'names' => new Zend_Db_Expr('group_concat(`sales/order_item`.name SEPARATOR ", ")'),
            )
        );
    $collection->getSelect()->group('entity_id');

    $this->setCollection($collection);
    return parent::_prepareCollection();
}
Run Code Online (Sandbox Code Playgroud)

然后我重写此方法,以便在按名称或skus过滤时返回正确的结果

    protected function _addColumnFilterToCollection($column)
{
    if($this->getCollection() && $column->getFilter()->getValue()) 
    {
        if($column->getId() == 'skus'){
            $this->getCollection()->join(
                'sales/order_item',
                '`sales/order_item`.order_id=`main_table`.entity_id',
                array(
                    'skus'  => new Zend_Db_Expr('group_concat(`sales/order_item`.sku SEPARATOR ", ")'),
                )
            )->getSelect()
                ->having('find_in_set(?, skus)', $column->getFilter()->getValue());

            return $this;
        }

        if($column->getId() == 'names'){
            $this->getCollection()->join(
                'sales/order_item',
                '`sales/order_item`.order_id=`main_table`.entity_id',
                array(
                    'names' => new Zend_Db_Expr('group_concat(`sales/order_item`.name SEPARATOR …
Run Code Online (Sandbox Code Playgroud)

grid zend-framework magento

5
推荐指数
1
解决办法
6499
查看次数

标签 统计

git ×1

github ×1

grid ×1

magento ×1

merge ×1

zend-framework ×1