<?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/product/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>Product Suddenly Disappears from the Store</title>
		<link>https://www.the-mage-expert.com/3172/product-suddenly-disappears-from-the-store/</link>
		<comments>https://www.the-mage-expert.com/3172/product-suddenly-disappears-from-the-store/#comments</comments>
		<pubDate>Fri, 09 Oct 2026 13:55:13 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Frontend]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[Magento 2.4.9]]></category>
		<category><![CDATA[MSI]]></category>
		<category><![CDATA[Patch]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=3172</guid>
		<description><![CDATA[Do products suddenly disappear from your Magento 2.4.9 storefront after saving a related product? The core issue ACP2E-4741 may be the reason. This can occur when related products, upsells or cross-sells are used in a store with a custom stock&#8230;]]></description>
				<content:encoded><![CDATA[<p>Do products suddenly disappear from your Magento 2.4.9 storefront after saving a related product? The core issue <strong>ACP2E-4741</strong> may be the reason.</p>
<p>This can occur when <strong>related products, upsells or cross-sells</strong> are used in a store with a custom stock and source configuration.</p>
<p>Saving one of the linked products can make the original product disappear from the storefront even though it was not changed directly.</p>
<p>The affected component is <strong>Magento 2.4.9 Linie</strong>. Adobe provides the Quality Patch <strong>ACP2E-4741</strong> for this problem.</p>
<p>Contact me and I can check whether ACP2E-4741 resolves your issue or investigate other possible causes.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/3172/product-suddenly-disappears-from-the-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Product Attributes Without Loading the Entire Product</title>
		<link>https://www.the-mage-expert.com/3163/getting-product-attributes-without-loading-the-entire-product/</link>
		<comments>https://www.the-mage-expert.com/3163/getting-product-attributes-without-loading-the-entire-product/#comments</comments>
		<pubDate>Thu, 08 Oct 2026 20:06:26 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Attribute]]></category>
		<category><![CDATA[EAV]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=3163</guid>
		<description><![CDATA[If you need only one product attribute value in Magento 2, you do not always need to load the entire product through a repository or collection. That can be wasteful in loops, cron jobs and imports. Using the Product Resource&#8230;]]></description>
				<content:encoded><![CDATA[<p>If you need only one product attribute value in Magento 2, you do <strong>not always need to load the entire product</strong> through a repository or collection. That can be wasteful in loops, cron jobs and imports.</p>
<p>Using the Product Resource Model, you can read an attribute directly by product ID, attribute code and store ID:</p><pre class="crayon-plain-tag">use Magento\Catalog\Model\ResourceModel\Product as ProductResource;

public function __construct(
    private ProductResource $productResource
) {
}

public function getValue(int $productId, int $storeId): mixed
{
    return $this-&gt;productResource-&gt;getAttributeRawValue(
        $productId,
        'manufacturer',
        $storeId
    );
}</pre><p>Magento does not load the entire product with all its attributes. Instead, it reads <strong>only the value you need</strong>. This can be useful when processing many products but retrieving only one attribute for each.</p>
<p>For a dropdown attribute such as <strong>manufacturer</strong> gibt <strong>getAttributeRawValue()</strong> , however, Magento returns the stored option ID rather than the visible label. To retrieve the label, resolve the option through the attribute&#8217;s source:</p><pre class="crayon-plain-tag">use Magento\Catalog\Model\ResourceModel\Product as ProductResource;
use Magento\Eav\Model\Config as EavConfig;

public function __construct(
    private ProductResource $productResource,
    private EavConfig $eavConfig
) {
}

public function getManufacturerLabel(
    int $productId,
    int $storeId
): ?string {
    $optionId = $this-&gt;productResource-&gt;getAttributeRawValue(
        $productId,
        'manufacturer',
        $storeId
    );

    if (!$optionId) {
        return null;
    }

    $attribute = $this-&gt;eavConfig-&gt;getAttribute(
        'catalog_product',
        'manufacturer'
    );

    $attribute-&gt;setStoreId($storeId);

    return $attribute-&gt;getSource()-&gt;getOptionText($optionId);
}</pre><p>A stored option ID such as <strong>42</strong> can then become the visible label <strong>Bosch</strong>. The store ID also allows different attribute values and option labels for different store views.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/3163/getting-product-attributes-without-loading-the-entire-product/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding products without product images using SQL</title>
		<link>https://www.the-mage-expert.com/3093/finding-products-without-product-images-using-sql/</link>
		<comments>https://www.the-mage-expert.com/3093/finding-products-without-product-images-using-sql/#comments</comments>
		<pubDate>Fri, 25 Sep 2026 20:47:23 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=3093</guid>
		<description><![CDATA[Sometimes you need to find all products without assigned images in Magento 2, for example to verify that a product import or data migration is complete. The following SQL query returns products without product images: [crayon-6af33ffe30d3f/]]]></description>
				<content:encoded><![CDATA[<p>Sometimes you need to find all products without assigned images in Magento 2, for example to verify that a product import or data migration is complete.</p>
<p>The following SQL query returns products without product images:</p><pre class="crayon-plain-tag">SELECT
    p.entity_id,
    p.sku,
    p.type_id
FROM catalog_product_entity AS p
LEFT JOIN catalog_product_entity_media_gallery_value_to_entity AS mg
    ON mg.entity_id = p.entity_id
WHERE mg.value_id IS NULL
ORDER BY p.entity_id;</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/3093/finding-products-without-product-images-using-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Counting products per attribute set using SQL</title>
		<link>https://www.the-mage-expert.com/3060/counting-products-per-attribute-set-using-sql/</link>
		<comments>https://www.the-mage-expert.com/3060/counting-products-per-attribute-set-using-sql/#comments</comments>
		<pubDate>Wed, 02 Sep 2026 07:48:13 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[attributeset]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=3060</guid>
		<description><![CDATA[It can be useful to count how many products belong to each attribute set. The simplest approach in Magento 2 is the following SQL query: [crayon-6af33ffe30fe2/] The result lists the number of products assigned to each attribute set.]]></description>
				<content:encoded><![CDATA[<p>It can be useful to count how many products belong to each attribute set. The simplest approach in Magento 2 is the following SQL query:</p><pre class="crayon-plain-tag">SELECT
    eas.attribute_set_id,
    eas.attribute_set_name,
    COUNT(cpe.entity_id) AS product_count
FROM eav_attribute_set eas
LEFT JOIN catalog_product_entity cpe
    ON cpe.attribute_set_id = eas.attribute_set_id
WHERE eas.entity_type_id = (
    SELECT entity_type_id
    FROM eav_entity_type
    WHERE entity_type_code = 'catalog_product'
)
GROUP BY
    eas.attribute_set_id,
    eas.attribute_set_name
ORDER BY
    eas.attribute_set_name;</pre><p>The result lists the number of products assigned to each attribute set.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/3060/counting-products-per-attribute-set-using-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking whether a product is in stock by product ID</title>
		<link>https://www.the-mage-expert.com/2705/checking-whether-a-product-is-in-stock-by-product-id/</link>
		<comments>https://www.the-mage-expert.com/2705/checking-whether-a-product-is-in-stock-by-product-id/#comments</comments>
		<pubDate>Sat, 26 Jul 2025 21:26:37 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[Stock Status]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=2705</guid>
		<description><![CDATA[Use the following Magento 2 snippet to check stock availability by product ID: [crayon-6af33ffe31217/] Et voilà!]]></description>
				<content:encoded><![CDATA[<p>Use the following Magento 2 snippet to check stock availability by product ID:</p><pre class="crayon-plain-tag">public function __construct(
    \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry,
    ...
) {
    $this-&gt;stockRegistry = $stockRegistry;
}

$stockItem = $this-&gt;stockRegistry-&gt;getStockItem($productId);
if ($stockItem-&gt;getIsInStock()) {
    echo &quot;Product is in stock&quot;;
} else {
    echo &quot;Out of stock&quot;;
}</pre><p>Et voilà!</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/2705/checking-whether-a-product-is-in-stock-by-product-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a product&#8217;s status</title>
		<link>https://www.the-mage-expert.com/2409/getting-a-product-s-status/</link>
		<comments>https://www.the-mage-expert.com/2409/getting-a-product-s-status/#comments</comments>
		<pubDate>Fri, 31 Jan 2025 08:36:31 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[status]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=2409</guid>
		<description><![CDATA[A Magento 2 product normally has one of two statuses: enabled or disabled. Use the following code to check its status programmatically: [crayon-6af33ffe31609/] Fertig!]]></description>
				<content:encoded><![CDATA[<p>A Magento 2 product normally has one of two statuses: enabled or disabled. Use the following code to check its status programmatically:</p><pre class="crayon-plain-tag">// 1 = aktiviert
// 2 = deaktiviert
$status = $product-&gt;getStatus()</pre><p>Fertig!</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/2409/getting-a-product-s-status/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a product attribute value for All Store Views</title>
		<link>https://www.the-mage-expert.com/2178/getting-a-product-attribute-value-for-all-store-views/</link>
		<comments>https://www.the-mage-expert.com/2178/getting-a-product-attribute-value-for-all-store-views/#comments</comments>
		<pubDate>Mon, 08 Apr 2024 08:06:19 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Attribute]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[Scope]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=2178</guid>
		<description><![CDATA[Sometimes you need to retrieve the value of a Magento 2 product attribute for &#8220;All Store Views&#8221;, for example in a template. To do this, set the store ID to 0, load the product and the required product attribute, and&#8230;]]></description>
				<content:encoded><![CDATA[<p>Sometimes you need to retrieve the value of a Magento 2 product attribute for &#8220;All Store Views&#8221;, for example in a template.</p>
<p>To do this, set the store ID to 0, load the product and the required product attribute, and then restore the original store ID.</p><pre class="crayon-plain-tag">public function __construct(
    \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
    \Magento\Store\Model\StoreManagerInterface $storeManager
) {
    $this-&gt;productRepository = $productRepository;
    $this-&gt;storeManager = $storeManager;
}

$original = $this-&gt;storeManager-&gt;getStore()-&gt;getId();
$this-&gt;storeManager-&gt;setCurrentStore(0);
$product = $this-&gt;productRepository-&gt;get('12345', false, 0); // Replace 12345 with your product SKU
$allStoreViewsValue = $product-&gt;getCustomAttribute();
$this-&gt;storeManager-&gt;setCurrentStore($original);</pre><p>If your product attribute identifier is &#8220;baking_time&#8221;, for example, use: </p><pre class="crayon-plain-tag">$product-&gt;getBakingTime();</pre><p>.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/2178/getting-a-product-attribute-value-for-all-store-views/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Undefined array key 1234 in Eav.php on line 604</title>
		<link>https://www.the-mage-expert.com/2137/fixing-undefined-array-key-1234-in-eav-php-on-line-604/</link>
		<comments>https://www.the-mage-expert.com/2137/fixing-undefined-array-key-1234-in-eav-php-on-line-604/#comments</comments>
		<pubDate>Fri, 01 Mar 2024 08:29:49 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[EAV]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=2137</guid>
		<description><![CDATA[You may see the following message when opening a product in Magento 2 admin: Undefined array key 1234 in vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php on line 604 The ID can vary, but the cause is the same. Rebuilding the indexes with the following command,&#8230;]]></description>
				<content:encoded><![CDATA[<p>You may see the following message when opening a product in Magento 2 admin:</p>
<p><strong>Undefined array key 1234 in vendor/magento/module-catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php on line 604</strong></p>
<p>The ID can vary, but the cause is the same. Rebuilding the indexes with the following command, executed from your Magento 2 root directory, will often help:</p><pre class="crayon-plain-tag">php bin/magento indexer:reindex</pre><p></p>
<p>You should now be able to open products in the admin area again.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/2137/fixing-undefined-array-key-1234-in-eav-php-on-line-604/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing Invalid input datetime format of value &#8217;01.01.1970&#8242;</title>
		<link>https://www.the-mage-expert.com/1990/fixing-invalid-input-datetime-format-of-value-01-01-1970/</link>
		<comments>https://www.the-mage-expert.com/1990/fixing-invalid-input-datetime-format-of-value-01-01-1970/#comments</comments>
		<pubDate>Mon, 26 Sep 2022 09:41:50 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[Saving]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=1990</guid>
		<description><![CDATA[Do you get the message Invalid input datetime format of value &#8217;01.01.1970&#8242; (the date format may vary, for example &#8217;1/01/1970&#8242;) when saving a product in Magento 2 admin? Often the special-price dates in the product&#8217;s Advanced Pricing section are incorrect.&#8230;]]></description>
				<content:encoded><![CDATA[<p>Do you get the message <strong>Invalid input datetime format of value &#8217;01.01.1970&#8242;</strong> (the date format may vary, for example &#8217;1/01/1970&#8242;) when saving a product in Magento 2 admin? Often the special-price dates in the product&#8217;s Advanced Pricing section are incorrect.</p>
<p>Open Advanced Pricing and remove or correct those date values. This can happen after a data migration, for example.</p>
<p>If that does not help, or many products are affected, you can also update the values directly in the database using this query:</p>
<p><strong>Warning: Run at your own risk. Back up the database first, or test the query on a staging system.</strong></p><pre class="crayon-plain-tag">UPDATE catalog_product_entity_datetime SET value = '2022-01-01 00:00:00' WHERE value LIKE '%1970-01-01%';</pre><p>You should now be able to save products in your Magento 2 store again.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/1990/fixing-invalid-input-datetime-format-of-value-01-01-1970/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mage_Catalog_Block_Product::getPriceHtml causes errors with PHP 7</title>
		<link>https://www.the-mage-expert.com/1808/mage-catalog-block-product-getpricehtml-causes-errors-with-php-7/</link>
		<comments>https://www.the-mage-expert.com/1808/mage-catalog-block-product-getpricehtml-causes-errors-with-php-7/#comments</comments>
		<pubDate>Thu, 02 Sep 2021 09:00:44 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Price]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=1808</guid>
		<description><![CDATA[The following Magento 1 code no longer works with PHP 7 or later: [crayon-6af33ffe3213c/] With PHP 7, you need to create an instance of Mage_Catalog_Block_Product and call getPriceHtml on that instance. [crayon-6af33ffe32180/]]]></description>
				<content:encoded><![CDATA[<p>The following Magento 1 code no longer works with PHP 7 or later:</p><pre class="crayon-plain-tag">echo Mage_Catalog_Block_Product::getPriceHtml($_product, true);</pre><p></p>
<p>With PHP 7, you need to create an instance of Mage_Catalog_Block_Product and call getPriceHtml on that instance.</p><pre class="crayon-plain-tag">$productBlock = new Mage_Catalog_Block_Product;     
echo $productBlock-&gt;getPriceHtml($_product, true);</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/1808/mage-catalog-block-product-getpricehtml-causes-errors-with-php-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
