How to create and call modal popup widget in Magento 2

First, we have a button. Clicking it will display a pop-up. <button id=”modal-btn”>Open Modal</button> Create content for popup <div id=”modal-content”> <div class=”modal-inner-content”> <h2>Modal Title</h2> <p>Modal content…..</p> </div> </div> Use Magento 2 modal widget We now need to require both jQuery and jQuery UI. To do this, within your JS script, add the following code: <script>… Continue reading How to create and call modal popup widget in Magento 2

Published
Categorized as Magento

Check the user logged in or Not in a custom block layout

To work out the customer id and customer details in a custom module we need to call a reference container in the layout page. Here an example showing a reference container of custom Quote Block Use Cacheable to fetch each customer logged in or not and get the customer Id to custom module.

Enable temporarily disabled admin account

Sometimes our admin account will be disabled when we try several times with the wrong credentials. So to enable this account we could use the commands.php bin/magento admin:user:unlock ADMINUSERNAME Thank you.

Published
Categorized as Magento