导出csv不适用于自定义属性客户网格Magento2

时间:2018-12-04 09:26:55

标签: attributes magento2 export-to-csv custom-attributes customer

下面的代码是我的customer_listing.xml,当选中复选框从网格中导出时,导出csv不起作用。

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
            <columns name="customer_columns" class="Magento\Customer\Ui\Component\Listing\Columns">         
                <column name="customer_clv" class="Vendorname\Modulename\Ui\Component\Listing\Column\Customerclv">
                    <argument name="data" xsi:type="array">
                        <item name="config" xsi:type="array">
                            <item name="indexField" xsi:type="string">entity_id</item>
                            <item name="filter" xsi:type="boolean">true</item>
                            <item name="sorting" xsi:type="string">asc</item>
                            <item name="sortable" xsi:type="boolean">true</item>
                            <item name="editor" xsi:type="string">text</item>
                            <item name="label" xsi:type="string" translate="true">Customer Lifetime Value</item>
                            <item name="sortOrder" xsi:type="number">81</item>
                        </item>
                    </argument>
                </column>
                <column name="predicted_average_profit" class="Vendorname\Modulename\Ui\Component\Listing\Column\Customerclv">
                    <argument name="data" xsi:type="array">
                        <item name="config" xsi:type="array">
                            <item name="indexField" xsi:type="string">entity_id</item>
                            <item name="filter" xsi:type="boolean">true</item>
                            <item name="sorting" xsi:type="string">asc</item>
                            <item name="sortable" xsi:type="boolean">false</item>
                            <item name="editor" xsi:type="string">text</item>
                            <item name="label" xsi:type="string" translate="true">Predicted Average Transaction Value</item>
                            <item name="sortOrder" xsi:type="number">82</item>
                        </item>
                    </argument>
                </column>
                <column name="predicted_no_of_purchases" class="Vendorname\Modulename\Ui\Component\Listing\Column\Customerclv">
                    <argument name="data" xsi:type="array">
                        <item name="config" xsi:type="array">
                            <item name="indexField" xsi:type="string">entity_id</item>
                            <item name="filter" xsi:type="boolean">true</item>
                            <item name="sorting" xsi:type="string">asc</item>
                            <item name="sortable" xsi:type="boolean">false</item>
                            <item name="editor" xsi:type="string">text</item>
                            <item name="label" xsi:type="string" translate="true">Predicted No Of Purchases for next 10 weeks</item>
                            <item name="sortOrder" xsi:type="number">83</item>
                        </item>
                    </argument>
                </column>
                <column name="probability_no_of_purchases" class="Vendorname\Modulename\Ui\Component\Listing\Column\Customerclv">
                    <argument name="data" xsi:type="array">
                        <item name="config" xsi:type="array">
                            <item name="indexField" xsi:type="string">entity_id</item>
                            <item name="filter" xsi:type="boolean">true</item>
                            <item name="sorting" xsi:type="string">asc</item>
                            <item name="sortable" xsi:type="boolean">false</item>
                            <item name="editor" xsi:type="string">text</item>
                            <item name="label" xsi:type="string" translate="true">Probability</item>
                            <item name="sortOrder" xsi:type="number">84</item>
                        </item>
                    </argument>
                </column>
                <actionsColumn name="actions" class="Vendorname\Modulename\Ui\Component\Listing\Column\ClvActions">
                    <settings>
                        <indexField>entity_id</indexField>
                    </settings>
                </actionsColumn>       
            </columns> </listing>

0 个答案:

没有答案