dompdf is (mostly) a CSS 2.1-compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer: it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes. Limitations (Known Issues) Table cells are not pageable, meaning a table… Continue reading DOMPDF: HTML to PDF converter for PHP
Category: Magento
Magento 2.4 Custom form validation mage error duplication
Mage error component is duplicating error warnings on form inputs. Steps to reproduce-Submit blank login form;-Fill the input and submit again;-Remove the input field and submit blank form again.-Click one more time on submit button. Solution:- When we write a js for the submission of the please confirm that the form is valid or not.… Continue reading Magento 2.4 Custom form validation mage error duplication
How can I prevent the page from submitting when I click a tab?
So instead of, It should be: You can also remove onsubmit=”return false;” as it is no longer necessary.
Difference between Synchronous and Asynchronous Ajax request
Synchronous ( async: false ) – Script stops and waits for the server to send back a reply before continuing. There are some situations where Synchronous Ajax is mandatory. In standard Web applications, the interaction between the customer and the server is synchronous. This means that one has to happen after the other. Synchronous part:… Continue reading Difference between Synchronous and Asynchronous Ajax request
To Create Admin Menu in Magento 2
Step 1: Create menu.xml Create an admin menu file called: menu.xml file with the following content: Step 2: Add admin menu item Step 3: Flush Magento cache
How to get a URL parameter in the Magento controller?
If your URL is the following structure: http://yoursiteurl.com/index.php/admin/sales_order_invoice/save/order_id/1795/ then use: If you want to get All Url Value or Parameter value then use the below code. If your URL is like this: http://magentoo.blogspot.com/magentooo/userId=21 then use this to get the value of the URL
Adding the validation for a form
Adding a new field to API calls (Extension Attributes)
For adding a new field to the API call as an extension attribute we need to create a Plugin Firstly Create extension_attributes.xml inside the etc for your module here I’m adding a request quote id field to the sales order table. Create a webapi_rest folder and di.xml to initialize the plugin webapi_rest/di.xml now create a… Continue reading Adding a new field to API calls (Extension Attributes)
API to fetch the statements
Configuring Shipping Method in Magento
Shipping methods are managed in Stores > Configuration > Sales > Shipping Methods. Flat Rate Shipping Method Flat Rate is the standard Magento 2 shipping method that can be applied per single item or per order regardless of the product attributes such as size or weight etc. Set the values in each field as per our… Continue reading Configuring Shipping Method in Magento