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
Category: Magento
Store Data as Json Encode in Magneto
Here we are storing a group data as json encode to database.Since Json Encode is inbuilt with magento. We have two values that must stored as value and key .So its a array here we get the values stored as ‘length’ and key as ‘qty’. this can be written with json_encode($lengtharray) into a database field.… Continue reading Store Data as Json Encode in Magneto
How to create newpage using extension and Create a section in it?
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.
Create new page using extension and also create button on the page and by clicking on it an ajax call should be triggered to the controller and fetch the output from the controller and show it to the website through the JS.
Simple method to create extension and New section
Develop the form section on the homepage.
How to create new extension in Magento
How to Create a Block Section in Home Page,Using Magento Frontend ?.
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.