0

I'm using Marketplace and there is separate dashboard for each seller from where seller can manage their sections e.g-products,stores,orders etc.

for now,on order grid seller can't export the order but we want to add order export here.

enter image description here

As i tried and added following code one by one on the marketplace UI component file marketplace_orders_listing.xml under the "listingToolbar" tag but it doesn't works:-

<exportButton name="export_button">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="selectProvider" xsi:type="string">sales_order_grid.sales_order_grid.sales_order_columns.ids</item>
                </item>
            </argument>
        </exportButton>

OR

 <exportButton name="export_button">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="selectProvider" xsi:type="string">marketplace_orders_listing.marketplace_orders_listing.orders_columns.order_id</item>
        </item>
      </argument>
     </exportButton>

OR

<exportButton name="export_button"/>

All three above code are adding a Export button:-

enter image description here

But after clicking on export button,it's redirecting me on 404 Page so please help me to add this feature.

Expected Result:-

enter image description here

0

I've used following code on the file:-

app/code/NameSpace/mnarketplace/view/frontend/ui_component/mnarketplace_orders_listing.xml

<exportButton class="Magento\Ui\Component\ExportButton">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="options" xsi:type="array">
                        <item name="cvs" xsi:type="array">
                            <item name="url" xsi:type="string">marketplace/order_export/gridToCsv</item>
                        </item>
                        <item name="xml" xsi:type="array">
                            <item name="url" xsi:type="string">marketplace/order_export/gridToXml</item>
                        </item>
                    </item>
                    <item name="selectProvider" xsi:type="string">marketplace_orders_listing.marketplace_orders_listing.orders_columns.ids</item>
                </item>
            </argument>
        </exportButton>

And it's working for me!

To export CSV,I'm calling a controller "marketplace/order_export/gridToCsv",and everything is working fine.

Thanks!!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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