3

I want to hide or remove Purchase Point column from sales order grid in backend using custom module, how do i do this?

enter image description here

2

You need to override the layout for sales order grid, in order to do this create the sales order grid layout file inside your custom module

Namespace/Module/view/adminhtml/ui_component/sales_order_grid.xml

To hide element in this grid you have to set componentDisabled item argument to true , you'll also need to disable purchase point filter if you want to hide purchase point column. So the sales_order_grid.xml will look like this:

<?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">
    <listingToolbar name="listing_top">
        <filters name="listing_filters">
            <filterSelect name="store_id" provider="${ $.parentName }">
              <argument name="data" xsi:type="array">
                  <item name="config" xsi:type="array">
                      <item name="componentDisabled" xsi:type="boolean">true</item>
                  </item>
              </argument>
            </filterSelect>
        </filters>
    </listingToolbar>
    <columns name="sales_order_columns">
        <column name="store_id" class="Magento\Ui\Component\Listing\Columns\Date">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="componentDisabled" xsi:type="boolean">true</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>
  • This doesn't work. It only shifts colums. – Abid Malik Jan 16 at 13:58

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.