Entries by puneetk00

Adding TIMESTAMP_INIT as a Default Value in Declarative Schema

 Introduction: When working with databases, it’s often essential to track the timestamp of various operations such as record creation or modification. Magento 2, a popular e-commerce platform, introduced the Declarative Schema approach to simplify database setup and maintenance. In this article, we will explore how to add the TIMESTAMP_INIT value as a default value using […]

To call a static block into a GraphQL query in the Alpine.js

 To call a static block into a GraphQL query in the Alpine.js framework within Magento 2, you would need to follow these steps: Create a GraphQL query: Define your query in the app/code/{Vendor}/{Module}/etc/graphql/schema.graphqls file. For example: graphqlCopy codetype Query { staticBlock(identifier: String!): String @resolver(class: “{Vendor}\{Module}\Model\Resolver\StaticBlock”) @doc(description: “Retrieve the content of a static block by identifier”) […]

Magento 2 Design patterns | pk magento 2

 My youtube channel : https://www.youtube.com/channel/UChb7DM9SspzrUVh4hnWL50A REQUESTED BY : ANKUR PORWAL 01 (MVC)  MODEL VIEW CONTROLLER PATTERN (MVVM) MODEL VIEW VIEWMODEL PATTERN  Model View Controller, MVC in short. This is a design pattern where business, presentation and coupling logic are separated. Magento utilizing a DOM based configuration layer. It is used xml to drive the configuration and […]

Mysql create user and privileges assign.

 Remove privileges REVOKE ALL PRIVILEGES ON aws_oxtoolstaging.* FROM ‘aws_oxtoolstaging’@’localhost’; Assign privileges CREATE USER ‘username’@’localhost’ IDENTIFIED BY ‘S1@gingin’; GRANT ALL PRIVILEGES ON databases . * TO ‘username’@’localhost’; show privileges show grants for ‘username’@’localhost’; Puneet Kumar Magento Developer