data-bind attribute

The data-bind attribute in HTML is used in various JavaScript frameworks, libraries, and tools to establish data binding between the user interface (HTML elements) and the underlying data or behavior (JavaScript code). Different libraries may offer slightly different syntax and capabilities for data binding. Here are some common types of data-binding expressions you might encounter:… Continue reading data-bind attribute

API to update the inventory to Magento without manging stock

Here we’re having a REST API which is used to update the inventory from any external Source of integrationHere we have considered NetSuite API: https://example.com/rest/default/V1/inventory/stocks/{stockId} body { “stock”: { “stock_id”: 0, “name”: “string”, “extension_attributes”: {} } } Response Example

Add a row count to the order sales view items table – Magento 2.4

We want to add a row count in the order sales view items table. There are 2 ways to achieve this: Let’s start by creating a module Vendor_RowCounter, with the required files, and shared files for both solutions: Add registration.php: Add etc/module.xml: Create a block file, Block/Adminhtml/Items/Column/Row.php: Create a template file, view/adminhtml/templates/items/column/row.phtml: By adding a column via sales_order_view.xml Create view/adminhtml/layout/sales_order_view.xml: The drawback… Continue reading Add a row count to the order sales view items table – Magento 2.4

InstallSchema and InstallData

In Magento 2, both InstallSchema and InstallData are used to set up the database schema and initial data for your custom module during installation. However, they serve slightly different purposes: InstallSchema:The InstallSchema script is used to define and modify the database schema, including creating new tables or modifying existing ones. It runs only once during… Continue reading InstallSchema and InstallData

Published
Categorized as Magento

setup_version

The setup_version attribute in the module.xml file specifies the version number of your module. This version number is used to track the current version of your module’s database schema and data. setup_version=”1.0.1″. This means that the current version of your module is 1.0.1. When you make changes to your module’s database schema, such as adding… Continue reading setup_version

Published
Categorized as Magento