<?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>LionBrothers &#8211; Web Development</title>
	<atom:link href="https://lionbrothers.pl/en/feed/" rel="self" type="application/rss+xml" />
	<link>https://lionbrothers.pl/en/</link>
	<description></description>
	<lastBuildDate>Mon, 16 Feb 2026 00:14:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Changing the limit of cross-sell products in the cart &#8211; Magento 2</title>
		<link>https://lionbrothers.pl/en/changing-the-limit-of-cross-sell-products-in-the-cart-magento-2/</link>
					<comments>https://lionbrothers.pl/en/changing-the-limit-of-cross-sell-products-in-the-cart-magento-2/#respond</comments>
		
		<dc:creator><![CDATA[lion_a]]></dc:creator>
		<pubDate>Wed, 11 Feb 2026 23:54:12 +0000</pubDate>
				<category><![CDATA[Magento 2]]></category>
		<guid isPermaLink="false">https://lionbrothers.pl/?p=57</guid>

					<description><![CDATA[<p>In Magento 2, by default, a maximum of four products are displayed in the cross-selling section of the cart. In many stores, this limitation is burdensome &#8211; especially when the offer is extensive. Default cross-sell limit in Magento 2 In a standard Magento 2 installation, the limit of cross-selling products in the cart is 4. [&#8230;]</p>
<p>Artykuł <a href="https://lionbrothers.pl/en/changing-the-limit-of-cross-sell-products-in-the-cart-magento-2/">Changing the limit of cross-sell products in the cart &#8211; Magento 2</a> pochodzi z serwisu <a href="https://lionbrothers.pl/en">LionBrothers - Web Development</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In Magento 2, by default, a maximum of four products are displayed in the cross-selling section of the cart. In many stores, this limitation is burdensome &#8211; especially when the offer is extensive.</p>



<h2 class="wp-block-heading">Default cross-sell limit in Magento 2</h2>



<p>In a standard Magento 2 installation, the limit of cross-selling products in the cart is 4. This value is permanently defined in the Magento_Checkout module and cannot be changed from the administration panel.</p>



<h2 class="wp-block-heading">Where the cross-sell limit is defined</h2>



<p>The limit is defined in the Magento_Checkout module &#8211; in the Crosssell class. File path: vendor/magento/module-checkout/Block/Cart/Crosssell.php.</p>



<p>As we mentioned above, Magento does not provide configuration for this, so the only correct solution is to overwrite the class using your own module.</p>



<h2 class="wp-block-heading">Changing the cross-sell limit via your own module</h2>



<p>You need to create files:</p>



<p>&#8211; preference registration file (di.xml)</p>



<p>&#8211; file overwriting the limit</p>



<p>LionBrothers/CrosssellLimit/etc/frontend/di.xml:</p>



<pre class="wp-block-code"><code>&lt;?xml version="1.0"?>
&lt;config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    &lt;preference for="Magento\Checkout\Block\Cart\Crosssell" type="LionBrothers\CrosssellLimit\Block\Cart\Crosssell"/>
&lt;/config></code></pre>



<p>LionBrothers/CrosssellLimit/Block/Cart/Crosssell.php</p>



<pre class="wp-block-code"><code>&lt;?php

namespace LionBrothers\CrosssellLimit\Block\Cart;

class Crosssell extends \Magento\Checkout\Block\Cart\Crosssell
{
    /**
     * Items quantity will be capped to this value
     *
     * @var int
     */
    protected $_maxItemCount = 8;
}</code></pre>



<p>You also need to remember the standard files of each module &#8211; registration.php and module.xml.</p>



<h2 class="wp-block-heading">Why preference? Why not plugin?</h2>



<p>In this case, the cross-sell product limit is set as a protected property, not a method. This means we can&#8217;t change it via plugin (before/after/around). The simplest solution (and best practice) is to use preference and extend the original class.</p>
<p>Artykuł <a href="https://lionbrothers.pl/en/changing-the-limit-of-cross-sell-products-in-the-cart-magento-2/">Changing the limit of cross-sell products in the cart &#8211; Magento 2</a> pochodzi z serwisu <a href="https://lionbrothers.pl/en">LionBrothers - Web Development</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lionbrothers.pl/en/changing-the-limit-of-cross-sell-products-in-the-cart-magento-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Magento 2 – How to display a CMS block in a PHTML file</title>
		<link>https://lionbrothers.pl/en/magento-2-how-to-display-a-cms-block-in-a-phtml-file/</link>
					<comments>https://lionbrothers.pl/en/magento-2-how-to-display-a-cms-block-in-a-phtml-file/#respond</comments>
		
		<dc:creator><![CDATA[lion_a]]></dc:creator>
		<pubDate>Wed, 11 Feb 2026 23:48:39 +0000</pubDate>
				<category><![CDATA[Magento 2]]></category>
		<guid isPermaLink="false">https://lionbrothers.pl/?p=55</guid>

					<description><![CDATA[<p>In Magento 2, CMS blocks are most often used directly in XML layouts. However, there are times when you need to display a CMS block directly in a PHTML file, for example, with conditional logic. In this post, we&#8217;ll explain how to properly invoke a CMS block in .phtml files. Calling a CMS block in [&#8230;]</p>
<p>Artykuł <a href="https://lionbrothers.pl/en/magento-2-how-to-display-a-cms-block-in-a-phtml-file/">Magento 2 – How to display a CMS block in a PHTML file</a> pochodzi z serwisu <a href="https://lionbrothers.pl/en">LionBrothers - Web Development</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In Magento 2, CMS blocks are most often used directly in XML layouts. However, there are times when you need to display a CMS block directly in a PHTML file, for example, with conditional logic. In this post, we&#8217;ll explain how to properly invoke a CMS block in .phtml files.</p>



<h2 class="wp-block-heading">Calling a CMS block in .phtml</h2>



<pre class="wp-block-code"><code>&lt;?php
echo $this->getLayout()
->createBlock('Magento\Cms\Block\Block')
->setBlockId('id_bloku_cms')
->toHtml();
?></code></pre>



<p>Instead of &#8220;cms_block_id&#8221; enter the static CMS block ID.</p>



<p>Important: enter the ID set on the panel side, not the ID from the database.</p>



<h2 class="wp-block-heading">Calling a CMS block on a CMS page</h2>



<p>If a CMS block is to be used inside the content of a CMS page, the following directive should be used:</p>



<pre class="wp-block-code"><code>{{block class="Magento\\Cms\\Block\\Block" block_id="id_bloku_cms"}}</code></pre>



<h2 class="wp-block-heading">Calling a static CMS block via an xml (layout) file</h2>



<pre class="wp-block-code"><code>&lt;referenceContainer name="product.info.main"> 
    &lt;block class="Magento\Cms\Block\Block" name="block_identifier"> 
        &lt;arguments> 
            &lt;argument name="block_id" xsi:type="string">id_bloku&lt;/argument> 
        &lt;/arguments> 
    &lt;/block> 
&lt;/referenceContainer></code></pre>



<div class="schema-faq wp-block-yoast-faq-block"><div class="schema-faq-section" id="faq-question-1770853582905"><strong class="schema-faq-question">Can a CMS block be called conditionally?</strong> <p class="schema-faq-answer">Yes. You can add any PHP logic to the .phtml file, e.g., checking: product type, a given product feature, a customer attribute, etc.).</p> </div> <div class="schema-faq-section" id="faq-question-1770853631035"><strong class="schema-faq-question">Does this solution work in Magento 2.4.x?</strong> <p class="schema-faq-answer">Yes. All described methods are compatible with Magento 2.4.x</p> </div> <div class="schema-faq-section" id="faq-question-1770853681368"><strong class="schema-faq-question">Why is it worth using a CMS block instead of static HTML?</strong> <p class="schema-faq-answer">Because the content placed in the CMS block does not require code deployment after a change and can be freely modified by the administrator (directly from the panel).</p> </div> </div>



<p></p>
<p>Artykuł <a href="https://lionbrothers.pl/en/magento-2-how-to-display-a-cms-block-in-a-phtml-file/">Magento 2 – How to display a CMS block in a PHTML file</a> pochodzi z serwisu <a href="https://lionbrothers.pl/en">LionBrothers - Web Development</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lionbrothers.pl/en/magento-2-how-to-display-a-cms-block-in-a-phtml-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>&#060;meta name=&#8221;theme-color&#8221;&gt; – Small change, nice effect</title>
		<link>https://lionbrothers.pl/en/meta-nametheme-color-small-change-nice-effect/</link>
					<comments>https://lionbrothers.pl/en/meta-nametheme-color-small-change-nice-effect/#respond</comments>
		
		<dc:creator><![CDATA[lion_a]]></dc:creator>
		<pubDate>Mon, 09 Feb 2026 07:49:41 +0000</pubDate>
				<category><![CDATA[Web Development]]></category>
		<guid isPermaLink="false">https://lionbrothers.pl/?p=51</guid>

					<description><![CDATA[<p>The meta tag &#60;meta name=&#8221;theme-color&#8221;> allows you to control the color of browser interface elements (such as the address bar), especially on mobile devices – it works in Chromium-based browsers, such as Google Chrome on Android. Place the meta tag in the head section of a web page. Below is an example for color #202020: [&#8230;]</p>
<p>Artykuł <a href="https://lionbrothers.pl/en/meta-nametheme-color-small-change-nice-effect/">&lt;meta name=&#8221;theme-color&#8221;&gt; – Small change, nice effect</a> pochodzi z serwisu <a href="https://lionbrothers.pl/en">LionBrothers - Web Development</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>The meta tag &lt;meta name=&#8221;theme-color&#8221;> allows you to control the color of browser interface elements (such as the address bar), especially on mobile devices – it works in Chromium-based browsers, such as Google Chrome on Android. Place the meta tag in the head section of a web page.</p>



<p>Below is an example for color #202020:</p>



<p><code>&lt;meta name="theme-color" content="#202020" /&gt;</code></p>



<p>Below is a screenshot:</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="513" src="https://lionbrothers.pl/wp-content/uploads/2026/02/beforeafter-1024x513.png" alt="" class="wp-image-37" srcset="https://lionbrothers.pl/wp-content/uploads/2026/02/beforeafter-1024x513.png 1024w, https://lionbrothers.pl/wp-content/uploads/2026/02/beforeafter-300x150.png 300w, https://lionbrothers.pl/wp-content/uploads/2026/02/beforeafter-768x385.png 768w, https://lionbrothers.pl/wp-content/uploads/2026/02/beforeafter-1536x770.png 1536w, https://lionbrothers.pl/wp-content/uploads/2026/02/beforeafter.png 1843w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>It&#8217;s worth adding to your projects, especially since it&#8217;s only one line of code. Unless your site supports light/dark mode, in which case it&#8217;s two lines. You can set the color per mode using the media tag:</p>



<pre class="wp-block-code"><code>&lt;meta  name="theme-color" content="#202020" media="(prefers-color-scheme: dark)" /&gt;

&lt;meta name="theme-color" content="#cccccc" media="(prefers-color-scheme: light)" /&gt;</code></pre>



<div class="schema-faq wp-block-yoast-faq-block"><div class="schema-faq-section" id="faq-question-1770589099489"><strong class="schema-faq-question"><strong>Does meta theme-color affect SEO?</strong></strong> <p class="schema-faq-answer">Not directly, but it improves the aesthetics of a mobile site, which can indirectly affect user engagement.</p> </div> <div class="schema-faq-section" id="faq-question-1770589121416"><strong class="schema-faq-question"><strong>Does theme-color work in all browsers?</strong></strong> <p class="schema-faq-answer">No. Chromium browsers (Chrome, Edge, Opera) offer the best support, especially on Android.</p> </div> <div class="schema-faq-section" id="faq-question-1770589138133"><strong class="schema-faq-question"><strong>Is it worth using theme-color in dark/light mode?</strong></strong> <p class="schema-faq-answer">Yes. It&#8217;s a small detail that makes a very good impression and increases the consistency of the interface.</p> </div> </div>



<p></p>



<p></p>
<p>Artykuł <a href="https://lionbrothers.pl/en/meta-nametheme-color-small-change-nice-effect/">&lt;meta name=&#8221;theme-color&#8221;&gt; – Small change, nice effect</a> pochodzi z serwisu <a href="https://lionbrothers.pl/en">LionBrothers - Web Development</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lionbrothers.pl/en/meta-nametheme-color-small-change-nice-effect/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
