Category: Magento
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
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.