Magento2 – Write Custom Mysql Query (Without Using Model)

How to create custom “Duplicate” buttons for Adminhtml Edit Form and save custom module in Magento2.?

Create file to add button in VenderName/ModuleName/Block/Adminhtml/Edit/SaveAndDuplicateButton.php

Modify _construct function in Edit class to add button in

Add sub-query Magento 2 Collection

Magento 2 how to add new column in quote_item table?

You can add column like this


Add custom Javascript in Magento admin form

Magento is flexible enough to insert your custom JavaScript code snippets in forms created by your very own Magento modules & extensions.


How to bind an action after customer login success using Magento?

Add the event to your module’s config.xml file

Now create a model Namespace_Modulename_Model_Observer

Add a customerLogin() method to the class:


Add Magento Admin User Using MySQL Script

Database adapter in Magento

To read:

To write: