<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>adobe commerce theme development Archives - Tricky Enough</title>
	<atom:link href="https://www.trickyenough.com/tag/adobe-commerce-theme-development/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.trickyenough.com/tag/adobe-commerce-theme-development/</link>
	<description>Explore and Share the Tech</description>
	<lastBuildDate>Thu, 31 Oct 2024 11:20:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.trickyenough.com/wp-content/uploads/2021/05/favicon-32x32-1.png</url>
	<title>adobe commerce theme development Archives - Tricky Enough</title>
	<link>https://www.trickyenough.com/tag/adobe-commerce-theme-development/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">100835972</site>	<item>
		<title>How To Create Custom Theme In Adobe Commerce?</title>
		<link>https://www.trickyenough.com/how-to-create-custom-theme-in-adobe-commerce/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-create-custom-theme-in-adobe-commerce</link>
					<comments>https://www.trickyenough.com/how-to-create-custom-theme-in-adobe-commerce/#respond</comments>
		
		<dc:creator><![CDATA[Junaid Mohsin]]></dc:creator>
		<pubDate>Wed, 07 Dec 2022 06:17:20 +0000</pubDate>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Adobe Commerce]]></category>
		<category><![CDATA[adobe commerce theme development]]></category>
		<category><![CDATA[Custom Theme development]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web development]]></category>
		<guid isPermaLink="false">https://www.trickyenough.com/?p=68063</guid>

					<description><![CDATA[<p>Adobe Commerce, previously known as Magento, is a scalable, feature-rich, platform used to develop and power B2B (Business-to-Business) and B2C (Business-to-Customer) eCommerce stores. A theme is simply a component of Adobe Commerce that, by combining different and unique elements such as templates, layouts, styles, or images, creates a visually unified design for the entire application...</p>
<p>The post <a href="https://www.trickyenough.com/how-to-create-custom-theme-in-adobe-commerce/">How To Create Custom Theme In Adobe Commerce?</a> appeared first on <a href="https://www.trickyenough.com">Tricky Enough</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><br />
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></p>


</head><body><p>Adobe Commerce, previously known as Magento, is a scalable, feature-rich, platform used to develop and power B2B (Business-to-Business) and B2C (Business-to-Customer) eCommerce stores.</p>



<p>A theme is simply a component of Adobe Commerce that, by combining different and unique elements such as templates, layouts, styles, or images, creates a visually unified design for the entire application e.g. your storefront. You either choose from a wide variety of existing, prebuilt themes, or opt for a completely custom and tailored theme.</p>



<p>Adobe Commerce comes preloaded with two themes, Luma and Blank. Luma is like a demo theme, while Blank is well&#8230; more like a blank canvas for you to create your own custom theme.</p>



<p>There are no limitations on using the sample theme, Luma, for your live eCommerce store, but if you wish to modify the default layout, you must develop a &#8220;new theme&#8221;. Any modifications or changes you make to Luma and Blank will likely be replaced or overwritten during updates, so we suggest not altering the existing or default files or settings.</p>



<p>Your new theme can stand alone or derive from another theme already in use or from the default. The concept of theme inheritance used by the Adobe Commerce system enables you to change only specific theme files while retaining access to other necessary files from a parent theme.</p>



<h2 class="wp-block-heading" id="h-prerequisites-for-adobe-theme-development"><b>Prerequisites for Adobe Theme Development</b></h2>



<p>Prior to initiating <a href="https://trangotech.com/ecommerce/adobe-commerce-development-services/" target="_blank" rel="noreferrer noopener nofollow">Adobe Commerce development</a>, there exist certain conditions you need to meet to be able to successfully develop your own Adobe Theme.</p>



<ol start="1" style="list-style-type:1" class="wp-block-list">
<li>Familiarity with the Adobe Commerce.</li>



<li>Experience in coding Adobe Commerce.</li>



<li>Access to frontend and backend of your Adobe Commerce Store as well as access to<br>hosting.</li>
</ol>



<p>Once all three of these prerequisites are met, you may begin on your journey to develop an adobe commerce theme.</p>



<h3 class="wp-block-heading" id="h-step-1-creating-a-theme-directory"><b>Step 1: Creating a Theme Directory</b></h3>



<p>i) Here is what you need to follow to create a directory for your <a href="https://developer.adobe.com/commerce/frontend-core/guide/themes/create-storefront/" target="_blank" rel="nofollow noopener">Adobe Commerce theme</a></p>



<p>ii) Start by opening <i>&lt;adobe_commerce_root&gt;/app/design/frontend</i>.</p>



<p>iii) After you&#8217;ve opened it, create the new folder according to the name of your Vendor: <i>/app/design/frontend/&lt;Vendor&gt;</i>.</p>



<p>iv) Followed by creating a new directory of your theme under the <i>&lt;Vendor&gt;</i> directory.</p>



<h3 class="wp-block-heading" id="h-step-2-declaring-the-theme"><b>Step 2: Declaring the Theme</b></h3>



<p>i) Once you&#8217;re finished creating a theme directory, you must declare it by creating theme.xml containing your chosen theme&#8217;s name in <i>app/design/frontend/&lt;Vendor&gt;/&lt;theme&gt;</i>.</p>



<p>ii) Configure it using the following code:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://www.trickyenough.com/wp-content/uploads/2022/11/5555.PNG" alt=""/><figcaption class="wp-element-caption">Image Credits: Screenshot taken from the website</figcaption></figure></div>


<p>iii) Add the <i>preview.jpg</i> file to the <i>app/design/frontend/&lt;Vendor&gt;/&lt;theme&gt;/media/</i> directory.</p>



<h3 class="wp-block-heading" id="h-step-3-forming-a-composer-package-for-your-theme"><b>Step 3: Forming a Composer Package for your Theme</b></h3>



<p>Composer packages are used to distribute the default themes.</p>



<p>Add a <i>composer.json</i> file to the theme directory and register the package on a packaging server to distribute your theme as a package. <i>https://packagist.org</i> is the standard website for public packaging servers.</p>



<p>The <i>composer.json</i> file contains information on theme dependencies. For the correct dependencies and their versions, consult a recent <i>theme.xml</i> file. You might need more modules in the <i>&#8220;require&#8221;</i> section if your parent theme isn&#8217;t <i>Magento/Blank</i>.</p>



<h3 class="wp-block-heading" id="h-step-4-adding-a-registration-php-into-your-theme"><b>Step 4: Adding a registration.php into your theme</b></h3>



<p>Now add a <i>registration.php</i> file with the following contents to your theme directory to register your theme with the system:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://www.trickyenough.com/wp-content/uploads/2022/11/44444.PNG" alt=""/><figcaption class="wp-element-caption">Image Credits: Screenshot taken from the website</figcaption></figure></div>


<h3 class="wp-block-heading" id="h-step-5-configuring-your-store-s-images"><b>Step 5: Configuring Your Store&#8217;s Images</b></h3>



<p>A <i>view.xml</i> configuration file is used to set up the storefront&#8217;s product image sizes and other properties. It is necessary for a theme but not essential if it already exists in the parent theme.</p>



<p>The following steps should be followed to add <i>view.xml</i> if your theme&#8217;s product image sizes are different from those of the parent theme or if your theme does not inherit from any other themes:</p>



<p>1. Access your application server by logging in as a user who has the ability to create folders and files in the installation directory.</p>



<p>2. In your theme folder, create the, <i>etc</i> directory.</p>



<p>3. Copy the <i>view.xml</i> file from either the Blank theme or the <i>etc</i> directory of the parent theme. i.e. move the file <i>view.xml</i> from <i>theme-frontend-blank/etc</i> to your theme&#8217;s <i>etc</i> directory.</p>



<p>4. Adjust the sizes of each product picture for the storefront in the <i>view.xml</i> file. E.g. you can specify a size of 250 x 250 pixels to make the product images in the category grid view square:<i></i></p>



<p><i> &lt;image id=&#8221;category_page_grid&#8221; type=&#8221;small_image&#8221;&gt;</i></p>



<p><i> &lt;width&gt;250&lt;/width&gt;</i></p>



<p><i> &lt;height&gt;250&lt;/height&gt;</i></p>



<p><i> &lt;/image&gt;</i></p>



<h3 class="wp-block-heading" id="h-step-6-creation-of-directories-for-static-files"><b>Step 6: Creation of Directories for Static Files</b></h3>



<p>Your theme probably includes a variety of static file formats, including:</p>



<p>Styles</p>



<p>Fonts</p>



<p>JavaScript</p>



<p>Images</p>



<p>Each type needs to be kept in its own web subdirectory in your theme folder:</p>



<p><i>app/design/&lt;area&gt;/&lt;Vendor&gt;/&lt;theme&gt;/</i></p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://www.trickyenough.com/wp-content/uploads/2022/11/3333.PNG" alt=""/><figcaption class="wp-element-caption">Image Credits: Screenshot taken from the website</figcaption></figure></div>


<p>You keep all of the static files that are generally relevant to the theme in the directory<i>&#8230;/theme&gt;/web/images</i>. A theme logo, for instance, is kept in<i>&#8230;theme&gt;/web/images</i>.</p>



<p>Your theme most certainly contains module-specific files as well. These files are kept in the respective subdirectories, such as<i>&#8230;/theme/Namespace Module&gt;/web/css</i> and similar ones. The next portions of this article go through managing the module-specific theme files.</p>



<p><u>NOTE:</u> You must first clear the <i>pub/static</i> and <i>var/view_preprocessed</i> directories before making changes to the files stored here while developing a theme. Otherwise, the storefront displays the previous iterations of the files.</p>



<p>Execute <i>rm -r &lt;magento_root&gt;/pub/static/*/*</i> to clear the <i>pub/static</i> directory. Then execute <i>rm -r &lt;magento_root&gt;/var/view_preprocessed/*</i> to clear the <i>var/view_preprocessed</i> directory.</p>



<h3 class="wp-block-heading" id="h-step-7-adding-a-theme-logo"><b>Step 7: Adding a Theme Logo</b></h3>



<p>A logo image&#8217;s name and default format in the program are <i>logo.SVG</i>. A <i>logo.svg</i> picture is automatically identified as the theme logo when it is placed in the standard location, which is the <i>&lt;theme_dir&gt;/web/images</i> directory. Once the theme is applied, it appears in the header of your store page.</p>



<p>You can use a logo file with a different name and format in your custom theme, but you might need to declare it.</p>



<p>If or whether your theme has a parent theme and its logo picture determines whether a declaration is necessary. These scenarios are conceivable:</p>



<p>There is no parent theme for your theme.</p>



<p>There is no need to specify your logo picture if its name and format follow the default naming scheme (logo.svg).</p>



<p>If the name or format of your logo picture deviates from the standard naming practice, you must indicate it in the layout.</p>



<p>The parent theme of your theme exists:</p>



<p>There is no need to define a theme logo if it has the same name and format as the parent&#8217;s theme logo.</p>



<p>Declare it in the layout if your logo picture has a different name or format.</p>



<h3 class="wp-block-heading" id="h-step-8-declaration-of-the-theme-logo"><b>Step 8: Declaration of the Theme Logo</b></h3>



<p>Add an extending <i>&lt;theme_dir&gt;/Magento_Theme/layout/default.xml</i> layout to declare a theme logo.</p>



<p>For instance, if the size of your logo file is 300&#215;300 pixels, you must declare it as follows:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://www.trickyenough.com/wp-content/uploads/2022/11/22222.PNG" alt=""/><figcaption class="wp-element-caption">Image Credits: Screenshot taken from the website</figcaption></figure></div>


<p><u>NOTE:</u> Declaring the size of the logo is optional and can be skipped.</p>



<h3 class="wp-block-heading" id="h-step-9-designing-the-theme"><b>Step 9: Designing the Theme </b></h3>



<p>Applications for Adobe Commerce employ a model view controller architecture. The major focus will be style, which in this case mostly entails changing the CSS or LESS. We will start changing the theme using LESS as that is how Adobe Commerce was created.</p>



<p>There are three different ways to style a website before you start styling the theme:</p>



<p>Server-Side Compilation</p>



<p>Using Grunt for Server-Side Compilation</p>



<p>Client-Side Compilation</p>



<p>We&#8217;re gonna use Client-Side to explain but fret not, the result is the same, no matter which methodology you use.</p>



<p>Begin by uncommenting the line <i>SetEnv MAGE_MODE developer</i> which can be found in the .htaccess file.</p>



<p>The LESS compilation mode must then be switched to the client-side by accessing the admin panel in Adobe Commerce. Select Process type under Stores Configuration Advanced Developer <a href="https://www.trickyenough.com/best-front-end-technologies-to-use/" target="_blank" rel="noreferrer noopener">Front-end development </a>workflow. Do not forget to click the Save Config button once you&#8217;ve made the change.</p>



<p>When we refresh the web browser in this mode, Grunt does not need to be running in order to compile our CSS. The Adobe Commerce platform will handle it. Now that we have fewer files, we can make changes to them and watch the frontend change in the following place: <i>/app/design/frontend/Cloudways/m2-theme/web/CSS</i>/source/CW<i>-theme.less</i></p>



<p>The following code may be used in your CW-theme.less file:</p>


<div class="wp-block-image">
<figure class="aligncenter"><img decoding="async" src="https://www.trickyenough.com/wp-content/uploads/2022/11/1111.PNG" alt=""/><figcaption class="wp-element-caption">Image Credits: Screenshot taken from the website</figcaption></figure></div>


<p>This file allows you to apply theme-specific styles, save it, and then reload your browser. You&#8217;ll notice that there aren&#8217;t any styles when the browser first loads if client-side compilation is enabled. This is because LESS is currently being <a href="https://www.trickyenough.com/news/firefly-video-model-is-underway-as-confirmed-by-adobe/" target="_blank" rel="noreferrer noopener">assembled by Adobe</a> Commerce. Give it a few seconds, and your personalized styles will start to appear.</p>



<h3 class="wp-block-heading" id="h-step-10-editing-the-layout-of-the-theme"><b>Step 10: Editing the Layout of the Theme</b></h3>



<p>The layout file with the same name must be placed in the directory as <i>/app/design/frontend/Magento/luma/Magento_Theme/layout/default.xml</i> in order to override the theme layout.</p>



<p>These layouts replace the ones listed below<i>/Cloudways/m2-theme/Magento_Theme/layout/default.xml</i></p>



<p>Always use the directory name page layout rather than the layout when replacing page layout files.</p>



<p>The layout overriding method offers exceptional customizing freedom. We advise against making the following changes:</p>



<p>Alias or Block name</p>



<p>The parent handle&#8217;s page type.</p>



<h2 class="wp-block-heading" id="h-conclusion"><b>Conclusion</b></h2>



<p>These are the 10 simple steps you have to follow to create your own custom theme in Adobe Commerce. You can always reach out to us if you want to learn more about Adobe Commerce Development.</p>



<p><strong>Suggested:</strong></p>



<p><a href="https://www.trickyenough.com/what-are-the-best-ecommerce-development-platforms-available-and-how-to-choose-them/" target="_blank" rel="noreferrer noopener">What Are The Best eCommerce Development Platforms Available, And How To Choose Them</a>?</p>



<p><a href="https://www.trickyenough.com/free-online-pdf-tools-to-use-instead-of-adobe-acrobat-for-merging-purposes/" target="_blank" rel="noreferrer noopener">Top 7 free online PDF tools to use instead of Adobe Acrobat for Merging Purposes</a>.</p>


<p></body></html></p><p>The post <a href="https://www.trickyenough.com/how-to-create-custom-theme-in-adobe-commerce/">How To Create Custom Theme In Adobe Commerce?</a> appeared first on <a href="https://www.trickyenough.com">Tricky Enough</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.trickyenough.com/how-to-create-custom-theme-in-adobe-commerce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">68063</post-id>	</item>
	</channel>
</rss>
