What are Webhooks in Magento 2
Discover webhooks in Magento 2: a powerful tool to reduce manual workload for business owners. Learn how they work, their key features, and easy configuration tips.
Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy
Cookie PolicyThese cookies are strictly necessary for the site to work and may not be disabled.
InformationThese cookies are strictly necessary for the site to work and may not be disabled.
Cookie name | Description | Lifetime | Provider |
---|---|---|---|
_ce.clock_data | Store the difference in time from the server's time and the current browser. | 1 day | Crazy Egg |
_ce.clock_event | Prevent repeated requests to the Clock API. | 1 day | Crazy Egg |
_ce.irv | Store isReturning value during the session | Session | Crazy Egg |
_ce.s | Track a recording visitor session unique ID, tracking host and start time | 1 year | Crazy Egg |
_hjSessionUser_2909345 | Store a unique user identifier to track user sessions and interactions for analytics purposes. | 1 year | HotJar |
_hjSession_2909345 | Store session data to identify and analyze individual user sessions. | 1 day | HotJar |
apt.uid | Store a unique user identifier for tracking and personalization. | 1 year | Mageplaza |
cebs | Store user preferences and settings. | Session | Mageplaza |
cf_clearance | Store a token that indicates a user has passed a Cloudflare security challenge. | 1 year | Cloudflare |
crisp-client | The crisp-client/session cookie is used to identify and maintain a user session within the Crisp platform. It allows the live chat system to recognize returning users, maintain chat history, and ensure continuity in customer service interactions. | Session | Crisp |
_ga | Store a unique client identifier (Client ID) for tracking user interactions on the | 2 years | |
_ga_7B0PZZW26Z | Store session state information for Google Analytics 4. | 2 years | |
_ga_JTRV42NV3L | Store session state information for Google Analytics 4. | 2 years | |
_ga_R3HWQ50MM4 | Store a unique client identifier (Client ID) for tracking user interactions on the website. | 2 years | |
_gid | Store a unique client identifier (Client ID) for tracking user interactions on the website. | 1 day | |
_gat_UA-76130628-1 | Throttle the request rate to Google Analytics servers. | 1 day |
Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.
InformationAdvertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.
Cookie name | Description | Lifetime | Provider |
---|---|---|---|
_gcl_au | The cookie is used by Google to track and store conversions. | 1 day | |
__Secure-3PAPISID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
HSID | This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data and protect visitor data from unauthorized access. | 2 years | |
__Secure-1PSID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
SID | This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data and protect visitor data from unauthorized access. | 2 years | |
APISID | This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions. | 2 years | |
__Secure-1PAPISID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
__Secure-3PSID | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 2 years | |
SSID | This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions. | 2 years | |
SAPISID | This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions. | 2 years | |
__Secure-3PSIDTS | This cookie collects information about visitor's interactions with Google services and ads. It is used to measure advertising effectiveness and deliver personalised content based on interests. The cookie contains a unique identifier. | 2 years | |
__Secure-1PSIDTS | This cookie collects information about visitor's interactions with Google services and ads. It is used to measure advertising effectiveness and deliver personalised content based on interests. The cookie contains a unique identifier. | 2 years | |
SIDCC | This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data, and protect visitor data from unauthorized access. | 3 months | |
__Secure-1PSIDCC | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 1 year | |
__Secure-3PSIDCC | This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising. | 1 year | |
1P_JAR | This cookie is a Google Analytics Cookie created by Google DoubleClick and used to show personalized advertisements (ads) based on previous visits to the website. | 1 month | |
NID | Show Google ads in Google services for signed-out users. | 6 months |
Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.
InformationAnalytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.
Cookie name | Description | Lifetime | Provider |
---|---|---|---|
_dc_gtm | Manage and deploy marketing tags through Google Tag Manager. | 1 year | |
1P_JAR | Gather website statistics and track conversion rates for Google AdWords campaigns. | 1 month | |
AEC | 1 month | ||
ar_debug | Debugging purposes related to augmented reality (AR) functionalities. | 1 month | Doubleclick |
IDE | The IDE cookie is used by Google DoubleClick to register and report the user's actions after viewing or clicking on one of the advertiser's ads with the purpose of measuring the effectiveness of an ad and to present targeted ads to the user. | 1 year | Doubleclick |
ad_storage | Enables storage, such as cookies (web) or device identifiers (apps), related to advertising. | 1 year | |
ad_user_data | Sets consent for sending user data to Google for online advertising purposes. | 1 year | |
ad_personalization | Sets consent for personalized advertising. | 1 year | |
analytics_storage | Enables storage, such as cookies (web) or device identifiers (apps), related to analytics, for example, visit duration. | 1 year |
Vinh Jacker | 11-11-2024
Depending on your role and objectives for delving into Magento, there are various perspectives to consider regarding its architecture.
For instance, a developer aiming to craft new modules or customize existing ones would seek insights into the module’s architecture and its integration within the broader framework of Magento and other components.
On the other hand, a merchant aspiring to swiftly establish an online storefront would prefer to examine the assembly of components from a broader standpoint. They aim to grasp the components influencing the aesthetics, functionality, and user interaction elements.
Application architecture refers to the methods and strategies employed in crafting and developing an application. It serves as a guide, offering a roadmap and recommended practices to ensure the creation of a properly organized and functional app.
In actuality, the Magento 2 request life cycle deviates from the standard MVC pattern and is more intricate. Here’s an overview of how interactions unfold:
Standard requests in Magento are directed through the pub/index.php file, serving as the entry point. This file orchestrates the loading of a bootstrap and subsequently initiates and executes the application. Following this, the front controller class navigates through all registered routers within the system to determine the appropriate routing destination. This routing decision can lead the request to controllers, resolvers, or API models.
Magento ensures that direct access to the database is avoided, relying instead on repositories, factories, and collections. These components serve as the means to manipulate entities, which are essentially represented as models. The actual database operations are exclusively carried out by the resource model. By utilizing a resource model, one can establish mappings between the properties of entities and their corresponding database structures.
Magento 2 employs a Model View ViewModel (MVVM) architecture, which enhances the separation between the Model and View layers, akin to the Model View Controller (MVC) pattern. Here’s a brief overview of MVVM:
Model: In MVVM, the Model serves as the data layer, defining the system’s business logic and representing the application’s state. Model objects handle data retrieval and storage in a database, applying rules to manipulate data that reflects the concepts managed by the application.
View: The View presents the graphical interface visible to users on the screen. It displays responses to user requests, structuring or formatting data in a specific layout. Views determine how data appears to users.
ViewModel: Acting as an intermediary between the Model and View layers, the ViewModel interacts with the Model to provide only necessary information to the View. It processes business logic, handles requests, manipulates data using the Model, and interacts with Views to produce the final output.
Magento 2’s architecture is structured into four distinct layers, each serving a specific purpose as outlined in the official documentation:
At the topmost level lies the presentation layer, which encompasses the code responsible for user interaction with Magento’s web interface. This layer houses controllers and View components such as layouts, templates, blocks, CSS, and JavaScript.
Interaction with the service layer, typically via service contracts, is common within the presentation layer. While primarily focused on user interaction, it may also encompass some business logic.
Users of the presentation layer include web users and system administrators.
Sitting between the presentation and domain layers, the service layer acts as a bridge facilitating communication between these two layers and handling resource-specific data.
Service contracts, defined through PHP interfaces, are implemented within this layer, allowing for the addition or modification of business logic without disrupting the system. Dependency injection configuration files (di.xml) facilitate this flexibility.
The service layer also provides access to APIs (such as REST or SOAP) and resides above the domain layer while lying below the presentation layer.
Responsible for housing business logic, the domain layer remains devoid of database-specific or resource-specific details. Here, generic Magento data objects or models are defined, encapsulating the business logic pertaining to various operations on specific types of data, such as Customer objects.
To interact with the database via MySQL calls, each model within the domain layer is associated with a resource model.
At the bottommost level, the persistence layer revolves around the resource model, tasked with data extraction and modification within the database through CRUD (Create, Read, Update, Delete) operations. This involves SQL code within the resource model to fulfill these requests, along with additional implementations of business logic capabilities.
In conclusion, Magento’s layered architecture offers distinct advantages for developers and merchants alike. By understanding its four layers, businesses can effectively manage business logic, presentation, and data flow to enhance their online storefronts.
Whether you’re crafting modules or focusing on user experience, Magento’s architecture provides a solid foundation for success in e-commerce.
With over a decade of experience crafting innovative tech solutions for ecommerce businesses built on Magento, Jacker is the mastermind behind our secure and well-functioned extensions. With his expertise in building user-friendly interfaces and robust back-end systems, Mageplaza was able to deliver exceptional Magento solutions and services for over 122K+ customers around the world.
Related Post
What are Webhooks in Magento 2
Discover webhooks in Magento 2: a powerful tool to reduce manual workload for business owners. Learn how they work, their key features, and easy configuration tips.
Discover Shopify App Store – A Comprehensive Handbook 2024
Explore the Shopify App Store for tailored solutions to grow your business. Discover your perfect app today!
Top 10+ Shopify Store Name Generators: Ultimate Review Guide
By exploring the top 10+ Shopify store name generators, we aim to help you create unique and meaningful store names.
Should I Hire A Shopify Expert? Reasons, How-tos
This article will focus on the question “Should I hire a Shopify expert?”, unlock major reasons & practical tips to find the perfect fit for your business.
How to Make FAQ Page Shopify For SEO: A Comprehensive Guide
Confused by customer questions? This article aims to guide you how to make faq page Shopify that saves your time and boosts sales.
What are Webhooks in Magento 2
Discover webhooks in Magento 2: a powerful tool to reduce manual workload for business owners. Learn how they work, their key features, and easy configuration tips.
Discover Shopify App Store – A Comprehensive Handbook 2024
Explore the Shopify App Store for tailored solutions to grow your business. Discover your perfect app today!
Top 10+ Shopify Store Name Generators: Ultimate Review Guide
By exploring the top 10+ Shopify store name generators, we aim to help you create unique and meaningful store names.
Should I Hire A Shopify Expert? Reasons, How-tos
This article will focus on the question “Should I hire a Shopify expert?”, unlock major reasons & practical tips to find the perfect fit for your business.
How to Make FAQ Page Shopify For SEO: A Comprehensive Guide
Confused by customer questions? This article aims to guide you how to make faq page Shopify that saves your time and boosts sales.
Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.
Get Started