How to add Category Custom Layout Update XML file in Magento 2.3.4?

From Magento 2.3.4, Custom Layout Update Textarea removed from the admin panel category edit page, product edit page and cms edit page to remove the opportunity of Remote Code Execution (RCE). Replace Textarea with a selector.

Earlier you can add directly XML code snippet for the specific entity from the backend but from Magento 2.3.4 new feature was added. You need to create an XML file in your theme or module level and assign an XML file to the Custom Layout Update selector. Continue reading “How to add Category Custom Layout Update XML file in Magento 2.3.4?”

How to Move Category position programmatically in Magento 2?

Move Category from one position to another using the move() method from the catalog module.

Function Definition from the interface Magento\Catalog\Api\CategoryManagementInterface, Continue reading “How to Move Category position programmatically in Magento 2?”

How to Get Category Tree Collection in Magento 2?

Get Category tree collection by the specific root category id Magento 2.

Magento has the interface to get the category tree by the Magento\Catalog\Api\CategoryManagementInterface with getTree() method. Continue reading “How to Get Category Tree Collection in Magento 2?”