How to remove input field from ui component form Magento 2?

You can remove any input field or components using <visible>false</visible> in the <settings> node of the fieldset in ui component form.

Let’s assume you have created a custom form component in the admin panel UI or want to remove an existing field from the UI component, create a form XML file with the given code snippet. Continue reading “How to remove input field from ui component form Magento 2?”

How to override address/grid.phtml in Magento 2?

You can override the grid.phtml file to manage additional addresses of the customer.

If the customer has multiple addresses available, it will be displayed in the Additional Address Entries section of the Address book page. You can add/update the new column to the address list on the page using overriding grid template file.

Magento\Customer\Block\Address\Grid Block class is used to manage the grid template file. You can override using theme or module level,

1. Theme Level,

app/design/frontend/{Vendor}/{themename}/Magento_Customer/templates/address/grid.phtml

2. Module Level,
When you explore the customer_address_index.xml file from the customer module, You can see the address_book block that will be used to display an address book page on the frontend.

File Path: app/code/Jesadiya/Book/view/frontend/layout/customer_address_index.xml

<?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="address_grid">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Jesadiya_Book::address/grid.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

Create Template file to override grid.phtml,
app/code/Jesadiya/Book/view/frontend/templates/address/grid.phtml

Keep the required content from the Core template and modify your changes. You can also override Address book.phtml in Magento 2

Clear Cache to see changes,
php bin/magento cache:flush

How to override address/book phtml in Magento 2?

You can override the book.phtml file in Magento 2 using XML.
Book template used to display the address book of the customer with default billing and shipping address at the top of the Address book page.

Magento\Customer\Block\Address\Book

Book Block class contains the native method for the template.
You can override using theme or module level, Continue reading “How to override address/book phtml in Magento 2?”