cancel
Showing results for 
Search instead for 
Did you mean: 

Add Custom Tab In Product Edit Page In Admin Magento 2.X For Selecting Review Of Product

Add Custom Tab In Product Edit Page In Admin Magento 2.X For Selecting Review Of Product

How to add a custom tab in the product edit page in admin version Magento 2.x for selecting a review of a product?

2 REPLIES 2

Re: Add Custom Tab In Product Edit Page In Admin Magento 2.X For Selecting Review Of Product

Hi @tinasabri4af7d,

Can you please tell me if you want to add a grid or column?

Moreover, here is step-by-step guidance for how to add grid

Firstly, override Magento\Review\Block\Adminhtml\Grid.php using preference in di.xml. Then, create file VendorName\ModuleName\Block\Adminhtml

<?php

namespace VendorName\ModuleName\Block\Adminhtml;

class ReviewGrid extends \Magento\Review\Block\Adminhtml\Grid
{
    protected function _prepareColumns()
    {
        parent::_prepareColumns();
        $this->addColumn(
            'review_child',
            [
                'header' => __('name of tab'),
                'type' => 'text',
                'index' => 'review_child',
                'escape' => true
            ]
        );
        return $this;
    }
}

 

Let me know if you have any doubts regarding this.

If solved? Click KUDOS and accept it as a solution.

 

Thank you! 

Re: Add Custom Tab In Product Edit Page In Admin Magento 2.X For Selecting Review Of Product