How to remove admin newsletter tabs from the Customer edit Page Magento 2?

Remove Newsletter tabs from the Customer Edit page admin panel in Magento 2 using a layout XML file.

You can delete the newsletter tabs from the Admin panel Customer Edit page left sidebar section. The Tab displays the Subscribed information with the checkbox.

If Project doesn’t need to use newsletter functionality or admin can’t able to manage customer newsletter, You need to remove tabs from the admin panel. Continue reading “How to remove admin newsletter tabs from the Customer edit Page Magento 2?”

How to use if else conditions in Knockout JS Magento 2?

You can use knockout if-else conditions in Magento 2 with knockout way or Magento 2 approaches.

You have to use ifnot for the else conditions. else is not supported in knockout.

Knockout if and ifnot conditions same as if and else conditions in javascript.

Using Default Knockout JS
1. First Way Continue reading “How to use if else conditions in Knockout JS Magento 2?”

How to set default shipping address of the customer Magento 2?

Set Default shipping address id of the customer in Magento 2 using Address Repository Interface.

You required Customer Id to set shipping address and address id you want to assign it.

First, load the existing address by the getById method of the address repository interface with the set customer. Continue reading “How to set default shipping address of the customer Magento 2?”