<?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>The Magento Expert</title>
	<atom:link href="https://www.the-mage-expert.com/tag/sku/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.the-mage-expert.com</link>
	<description>Your Magento Commerce Expert</description>
	<lastBuildDate>Thu, 05 Nov 2026 21:47:58 +0000</lastBuildDate>
	<language>de-DE</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.6</generator>
	<item>
		<title>Dynamically changing the SKU of a configurable product in Hyvä</title>
		<link>https://www.the-mage-expert.com/2289/dynamically-changing-the-sku-of-a-configurable-product-in-hyva/</link>
		<comments>https://www.the-mage-expert.com/2289/dynamically-changing-the-sku-of-a-configurable-product-in-hyva/#comments</comments>
		<pubDate>Fri, 07 Jun 2024 06:29:57 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Hyvä]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[SKU]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=2289</guid>
		<description><![CDATA[In Hyvä (and Magento generally), the displayed SKU does not change automatically when a shopper selects different options for a configurable product. A small code change can fix this. Override the file /vendor/hyva-themes/magento2-default-theme/Magento_ConfigurableProduct/templates/product/view/type/options/js/configurable-options.phtml in your Hyvä child theme as follows:&#8230;]]></description>
				<content:encoded><![CDATA[<p>In Hyvä (and Magento generally), the displayed SKU does not change automatically when a shopper selects different options for a configurable product. A small code change can fix this.</p>
<p>Override the file <strong>/vendor/hyva-themes/magento2-default-theme/Magento_ConfigurableProduct/templates/product/view/type/options/js/configurable-options.phtml</strong> in your Hyvä child theme as follows:</p><pre class="crayon-plain-tag">changeOption(attributeId, value) {
    ...
    this.updateSku(this.productIndex, this.optionConfig.sku);
    ...           
},
updateSku(selected, skus) {
    let sku = skus.hasOwnProperty(selected);
    if (sku) {
        document.getElementsByClassName('product-detail-value')[0].innerHTML = skus[selected];
	    return skus[selected];
    } 
},
...</pre><p>After reloading the product page, the SKU should update dynamically as the selected options change.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/2289/dynamically-changing-the-sku-of-a-configurable-product-in-hyva/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing the SKU from the product page</title>
		<link>https://www.the-mage-expert.com/2097/removing-the-sku-from-the-product-page/</link>
		<comments>https://www.the-mage-expert.com/2097/removing-the-sku-from-the-product-page/#comments</comments>
		<pubDate>Thu, 21 Sep 2023 07:10:08 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[product page]]></category>
		<category><![CDATA[SKU]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=2097</guid>
		<description><![CDATA[To remove the product SKU from a Magento 2 product page, open the file catalog_product_view.xml in your Magento theme and add the following line to the &#60;body&#62;&#8230;&#60;/body&#62; Bereich hinzu: [crayon-6af33ffe8a1e7/]]]></description>
				<content:encoded><![CDATA[<p>To remove the product SKU from a Magento 2 product page, open the file <strong>catalog_product_view.xml</strong> in your Magento theme and add the following line to the <strong>&lt;body&gt;&#8230;&lt;/body&gt;</strong> Bereich hinzu:</p><pre class="crayon-plain-tag">&lt;referenceBlock name=&quot;product.info.sku&quot; remove=&quot;true&quot; /&gt;</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/2097/removing-the-sku-from-the-product-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sort order items by SKU</title>
		<link>https://www.the-mage-expert.com/1053/magento-sort-order-items-by-sku-order-detail-page/</link>
		<comments>https://www.the-mage-expert.com/1053/magento-sort-order-items-by-sku-order-detail-page/#comments</comments>
		<pubDate>Tue, 19 Apr 2016 10:54:01 +0000</pubDate>
		<dc:creator><![CDATA[]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[order]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[SKU]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=1053</guid>
		<description><![CDATA[If you want to change the default sorting of the ordered items on the order detail page, go ahead and override app/design/adminhtml/default/default/template/sales/order/view/items.phtml in your theme and replace]]></description>
				<content:encoded><![CDATA[<p>If you want to change the default sorting of the ordered items on the order detail page, go ahead and override <strong>app/design/adminhtml/default/default/template/sales/order/view/items.phtml</strong> in your theme and replace</p>
<pre lang="php">
<?php $_items = $this->getItemsCollection() ?>
    <?php $i=0;foreach ($_items as $_item):?>
        <?php if ($_item->getParentItem()) continue; else $i++;?>
        <tbody class="<?php echo $i%2?'even':'odd' ?>">
            <?php echo $this->getItemHtml($_item) ?>
            <?php echo $this->getItemExtraInfoHtml($_item) ?>
        </tbody>
    <?php endforeach; ?>
</pre>
<p>with </p>
<pre lang="php">
<?php $_items = $this->getItemsCollection() ?>
    <?php $_sortedItems = array(); ?>
    <?php foreach ($_items as $_item) : ?>
        <?php $_sortedItems[$_item->getSku()] = $_item;?>
    <?php endforeach;?>
    <?php ksort($_sortedItems); // This is where the sorting by SKU takes place ?>
    <?php $i=0;foreach ($_sortedItems as $_item):?>
        <?php if ($_item->getParentItem()) continue; else $i++;?>
        <tbody class="<?php echo $i%2?'even':'odd' ?>">
            <?php echo $this->getItemHtml($_item) ?>
            <?php echo $this->getItemExtraInfoHtml($_item) ?>
        </tbody>
    <?php endforeach; ?>
</pre>
<p>Done. If you open the detail page of an order with 2+ items, they should be sorted by SKU.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/1053/magento-sort-order-items-by-sku-order-detail-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorting order items by SKU</title>
		<link>https://www.the-mage-expert.com/1111/sorting-order-items-by-sku/</link>
		<comments>https://www.the-mage-expert.com/1111/sorting-order-items-by-sku/#comments</comments>
		<pubDate>Fri, 15 Apr 2016 06:31:30 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[order]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[SKU]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=1111</guid>
		<description><![CDATA[To display ordered products sorted by SKU in the order view, override the app/design/adminhtml/default/default/template/sales/order/view/items.phtml in your theme and replace [crayon-6af33ffe8a600/] with [crayon-6af33ffe8a653/] That&#8217;s it. When you open an order containing two or more products, they will now be displayed in&#8230;]]></description>
				<content:encoded><![CDATA[<p>To display ordered products sorted by SKU in the order view, override the <strong>app/design/adminhtml/default/default/template/sales/order/view/items.phtml</strong> in your theme and replace </p>
<p></p><pre class="crayon-plain-tag">&lt;?php $_items = $this-&gt;getItemsCollection() ?&gt;
    &lt;?php $i=0;foreach ($_items as $_item):?&gt;
        &lt;?php if ($_item-&gt;getParentItem()) continue; else $i++;?&gt;
        &lt;tbody class=&quot;&lt;?php echo $i%2?'even':'odd' ?&gt;&quot;&gt;
            &lt;?php echo $this-&gt;getItemHtml($_item) ?&gt;
            &lt;?php echo $this-&gt;getItemExtraInfoHtml($_item) ?&gt;
        &lt;/tbody&gt;
    &lt;?php endforeach; ?&gt;</pre><p></p>
<p>with </p>
<p></p><pre class="crayon-plain-tag">&lt;?php $_items = $this-&gt;getItemsCollection() ?&gt;
    &lt;?php $_sortedItems = array(); ?&gt;
    &lt;?php foreach ($_items as $_item) : ?&gt;
        &lt;?php $_sortedItems[$_item-&gt;getSku()] = $_item;?&gt;
    &lt;?php endforeach;?&gt;
    &lt;?php ksort($_sortedItems); // Sort by array keys ?&gt;
    &lt;?php $i=0;foreach ($_sortedItems as $_item):?&gt;
        &lt;?php if ($_item-&gt;getParentItem()) continue; else $i++;?&gt;
        &lt;tbody class=&quot;&lt;?php echo $i%2?'even':'odd' ?&gt;&quot;&gt;
            &lt;?php echo $this-&gt;getItemHtml($_item) ?&gt;
            &lt;?php echo $this-&gt;getItemExtraInfoHtml($_item) ?&gt;
        &lt;/tbody&gt;
    &lt;?php endforeach; ?&gt;</pre><p></p>
<p>That&#8217;s it. When you open an order containing two or more products, they will now be displayed in SKU order.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/1111/sorting-order-items-by-sku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
