-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add the phone to the subscribers grid #1834 for magento 2.4
- Loading branch information
1 parent
7f18269
commit c4bd65c
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Ebizmarts\MailChimp\Model\ResourceModel\Newsletter; | ||
|
||
class Collection extends \Magento\Newsletter\Model\ResourceModel\Subscriber\Collection | ||
{ | ||
protected function _initSelect() | ||
{ | ||
parent::_initSelect(); | ||
$this->showCustomerInfo(true)->addSubscriberTypeField()->showStoreInfo(); | ||
$this->_map['fields']['phone'] = 'main_table.phone'; | ||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Ebizmarts_MailChimp Magento JS component | ||
* | ||
* @category Ebizmarts | ||
* @package Ebizmarts_MailChimp | ||
* @author Ebizmarts Team <[email protected]> | ||
* @copyright Ebizmarts (http://ebizmarts.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
--> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> | ||
<preference for="Magento\Newsletter\Model\ResourceModel\Subscriber\Grid\Collection" type="Ebizmarts\MailChimp\Model\ResourceModel\Newsletter\Collection" /> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0"?> | ||
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | ||
<body> | ||
<referenceBlock name="adminhtml.newslettrer.subscriber.grid.columnSet"> | ||
<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.newslettrer.subscriber.grid.columnSet.name" as="name"> | ||
<arguments> | ||
<argument name="header" xsi:type="string" translate="true">Phone</argument> | ||
<argument name="index" xsi:type="string">phone</argument> | ||
<argument name="header_css_class" xsi:type="string">phone</argument> | ||
<argument name="column_css_class" xsi:type="string">phone</argument> | ||
</arguments> | ||
</block> | ||
</referenceBlock> | ||
</body> | ||
</page> |