I want to add custom column to admin grid on Marketing → All Review page (Magento_Review module). I create module


<?xml version="1.0" encoding="utf-8" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_Module" setup_version="1.0.0">
            <module name="Magento_Review"/>


<?xml version="1.0" encoding="utf-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="review_columns" class="Magento\Ui\Component\Listing\Columns">
        <column name="review_child" class="Vendor\Module\Ui\Component\Listing\Column\MyColumn">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="sortable" xsi:type="boolean">false</item>
                    <item name="label" xsi:type="string" translate="true">My Column</item>
                    <item name="sortOrder" xsi:type="number">95</item>




use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Vendor_Module', __DIR__);


<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

    <preference for="Vendor\Module\Block\Adminhtml\ReviewGrid" type="Magento\Review\Block\Adminhtml\Grid" />




namespace Vendor\Module\Block\Adminhtml;

class ReviewGrid extends \Magento\Review\Block\Adminhtml\Grid
    protected function _prepareColumns()
                'header' => __('review child'),
                'type' => 'text',
                'index' => 'review_child',
                'escape' => true
        return $this;



namespace Vendor\Module\Ui\Component\Listing\Column;

use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;

class MyColumn extends Column
    public function __construct(
        ContextInterface $context,
        UiComponentFactory $uiComponentFactory,
        array $components = [],
        array $data = []
    ) {
        parent::__construct($context, $uiComponentFactory, $components, $data);

    public function prepareDataSource(array $dataSource)
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as & $item) {
                $item[$this->getData('name')] = "MY DATA";
        return $dataSource;

Execute the command bin/magento setup:upgrade but I don`t see the column. How can I add my custom column to Magento_Review module?

1 Answer 1


I have create email field in Magento_Review module in front end review form as well as stored value in database and shown in admin as per your requirement.

I have created custom module for that. Same according to my module you can do for your custom field.

you can download whole module from my google drive link - https://drive.google.com/file/d/1UqTENlYtThPuLnOqpSLhuIwfg8RJqqv2/view?usp=sharing
  • 1
    Can you please upvote this as well? So other community members can refer it
    – ZealousWeb
    Commented Apr 26, 2021 at 7:46
  • Thank you so much! All work is good!
    – shohol
    Commented Apr 26, 2021 at 8:15
  • Thanks! Can you please upvote my answer? @shohol
    – ZealousWeb
    Commented Apr 26, 2021 at 8:23
  • I've clicked on "This answer is useful", but I'm new and have not 15 reputation to cast a vote @ZealousWeb
    – shohol
    Commented Apr 26, 2021 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.