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
These 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
Google
_ga_7B0PZZW26Z
Store session state information for Google Analytics 4.
2 years
Google
_ga_JTRV42NV3L
Store session state information for Google Analytics 4.
2 years
Google
_ga_R3HWQ50MM4
Store a unique client identifier (Client ID) for tracking user interactions on the website.
2 years
Google
_gid
Store a unique client identifier (Client ID) for tracking user interactions on the website.
1 day
Google
_gat_UA-76130628-1
Throttle the request rate to Google Analytics servers.
1 day
Google
Advertising cookies
Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.
Advertising 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
Google
__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
Google
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
Google
__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
Google
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
Google
APISID
This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions.
2 years
Google
__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
Google
__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
Google
SSID
This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions.
2 years
Google
SAPISID
This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions.
2 years
Google
__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
Google
__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
Google
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
Google
__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
Google
__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
Google
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
Google
NID
Show Google ads in Google services for signed-out users.
6 months
Google
Analytics cookies
Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.
Analytics 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
Google
1P_JAR
Gather website statistics and track conversion rates for Google AdWords campaigns.
1 month
Google
AEC
1 month
Google
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
Google
ad_user_data
Sets consent for sending user data to Google for online advertising purposes.
1 year
Google
ad_personalization
Sets consent for personalized advertising.
1 year
Google
analytics_storage
Enables storage, such as cookies (web) or device identifiers (apps), related to analytics, for example, visit duration.
How to Create a Custom Theme in Magento 2? - Mageplaza
How to Create a Custom Theme in Magento 2?
Vinh Jacker|03-17-2025
A theme determines how the elements and the entire website are presented to the user. It combines a combination of custom templates, layouts, styles, and graphics to give a Magento store an uniform experience. There are number of ways to create a custom themes in Magento 2. You can either use a Magento Theme Builder Software like TemplateToaster to create your Magento Themes or create them by manual coding. It uses theme.xml, introduced in Magento 1.9, and a new folder structure in Magento 2 that works in a similar way to Magento 1.x, but has the added advantage that you can select unlimited parent themes to inherit from, and you can configure the theme.xml file in your theme.
Let’s say you want to create a brand new theme based on the new Magento “Blank”
theme. First, you would create a new folder in app/design/frontend, for example
Mageplaza/simple. You would then create a theme.xml file in this directory, path: app/design/frontend/Mageplaza/simple (it is probably
best to copy it from app/design/frontend/Magento/blank/theme.xml), In this case, we want to base on Magento 2’s Blank theme.
Now we have folder app/design/frontend/Mageplaza/simple , now create a file named theme.xml that define basic information about theme such as: Name, parent theme (in case your theme inherits from an existing theme), preview image
<themexmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd"><title>Mageplaza Simple</title><!-- your theme's name --><parent>Magento/blank</parent><!-- the parent theme, in case your theme inherits from an existing theme --><media><preview_image>media/preview.jpg</preview_image><!-- the path to your theme's preview image --></media></theme>
3. Composer package
Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
To distribute your theme as a package, add a composer.json file to the theme directory and register the package on a packaging server.
If you’d rather focus on your business and let experts handle the technical work, consider our custom Magento development services for reliable theme implementation and ongoing support.”
5. Creating static files, folders
In a design, there are many static files such as javascript, css, images and fonts. They are stored in separate folders in web of theme package.
In Magento 2, theme or extension development, when you update any files in app/design/<area>/Mageplaza/simple/web folder, you have to static folders which located at pub/static and var/view_preprocessed Otherwise, you still there is no change in frontend.
6. Configure catalog product images
As you can see in the theme structure I mentioned above, there is a file called etc/view.xml. This is configuration file. This file is required for the Magento 2 theme but it is optional if it exists in the parent theme.
Go to app/design/<area>/Mageplaza/simple/ and create a folder etc and file view.xml
You can copy the view.xml file in parent theme such as Blank themeapp/design/frontend/Magento/blank/etc/view.xml
Ok, let update the image configuration for catalog product grid page.
In view.xml, image properties are configured in the scope of element:
<imagesmodule="Magento_Catalog">
...
<images/>
Image properties are configured for each image type defined by the id and type attributes of the <image> element:
<imagesmodule="Magento_Catalog"><imageid="unique_image_id"type="image_type"><width>100</width><!-- Image width in px --><height>100</height><!-- Image height in px --></image><images/>
7. Declare Theme Logo
In Magento 2 default, it uses <theme_dir>/web/images/logo.svg, in your theme, you can change to different file formats such as png, jpg but you have to declare it.
Logo size should be sized 300x300px and you open file <theme_dir>/Magento_Theme/layout/default.xml
The basic components of Magento page design are blocks and containers.
A container exists for the sole purpose of assigning content structure to a page. A container has no additional content except the content of included elements. Examples of containers include the header, left column, main column, and footer.
9. Layout files types and conventions
Module and theme layout files
The following terms are used to distinguish layouts provided by different application components:
Base layouts: Layout files provided by modules. Conventional location:
Page configuration and generic layout files: <module_dir>/view/frontend/layout
Rather than copy extensive page layout or page configuration code and then modify what you want to change, in the Magento system, you only need to create an extending layout file that contains the changes you want.
To add an extending page configuration or generic layout file:
For example, to customize the layout defined in <Magento_Catalog_module_dir>/view/frontend/layout/catalog_product_view.xml, you need to add a layout files with the same name in your custom theme, like following:
Overriding is not necessary if a block has a method that cancels the effect of the originally invoked method. In this case, you can customize the layout by adding a layout file where the canceling method is invoked.
To add an overriding base layout file (to override a base layout provided by the module):
Put a layout file with the same name in the following location:
- Changing block name or alias. The name of a block should not be changed, and neither should the alias of a block remaining in the same parent element.
- Changing handle inheritance. For example, you should not change the page type parent handle.
Static Block for Magento 2
Mageplaza Better Static Block is a helpful solution to manage the content of store sites properly.
Jacker is the Chief Technology Officer (CTO) at Mageplaza, bringing over 10 years of experience in Magento, Shopify, and other eCommerce platforms. With deep technical expertise, he has led numerous successful projects, optimizing and scaling online stores for global brands. Beyond his work in eCommerce development, he is passionate about running and swimming.
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.