Adding new column in Sales Order View Items in Magento Admin

前端 未结 6 1660
难免孤独
难免孤独 2021-02-06 17:12

In the admin interface of Magento I need to modify the tables in the Sales / Order / View order so that it shows, besides the products name, their manufacturer as well.

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-06 17:36

    For adding the table header and it's value add layout sales_order_view.xml in your theme or module with new argument.

    
    
    
        
            
                
                    Product
                    Item Status
                    Original Price
                    Price
                    Qty
                    Subtotal
                    Tax Amount
                    Tax Percent
                    Discount Amount
                    Row Total
                    Repair
                
            
            
            
                
                    col-product
                    col-status
                    col-price-original
                    col-price
                    col-ordered-qty
                    col-subtotal
                    col-tax-amount
                    col-tax-percent
                    col-discont
                    col-total
                    col-repair
                
            
               
             
    
    

    ` I have added new column with name repair. now you have to add value for that column. so you have to override '\Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer' file in your block and in getColumnHtml() method you have to add your value for that column.

提交回复
热议问题