DOMPDF: HTML to PDF converter for PHP

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

Published
Categorized as 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

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

Published
Categorized as Magento

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

Published
Categorized as Magento

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)