<?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>Tue, 24 Jan 2023 09:37:24 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.6</generator>
	<item>
		<title>Product images missing on category page</title>
		<link>https://www.the-mage-expert.com/1136/magento2-product-images-missing-on-category-page/</link>
		<comments>https://www.the-mage-expert.com/1136/magento2-product-images-missing-on-category-page/#comments</comments>
		<pubDate>Mon, 08 May 2017 08:51:46 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=1136</guid>
		<description><![CDATA[If the product images are missing after an upgrade for example, the following command (executed in the root of your Magento 2 shop) might help: php magento catalog:images:resize Note: Depending on the mumber of products, that might run some time.]]></description>
				<content:encoded><![CDATA[<p>If the product images are missing after an upgrade for example, the following command (executed in the root of your Magento 2 shop) might help:</p>
<p><em>php magento catalog:images:resize</em></p>
<p>Note: Depending on the mumber of products, that might run some time.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/1136/magento2-product-images-missing-on-category-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the type of a product</title>
		<link>https://www.the-mage-expert.com/1078/magento-getting-the-type-of-a-product/</link>
		<comments>https://www.the-mage-expert.com/1078/magento-getting-the-type-of-a-product/#comments</comments>
		<pubDate>Mon, 11 Jul 2016 08:49:15 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=1078</guid>
		<description><![CDATA[Use the following code to get the type of a Magento product: [crayon-6a7ac01417304/]]]></description>
				<content:encoded><![CDATA[<p>Use the following code to get the type of a Magento product:</p>
<p></p><pre class="crayon-plain-tag">// configurable, simple, ...
$type = $product-&gt;getTypeId();</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/1078/magento-getting-the-type-of-a-product/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[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[order]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[SKU]]></category>

		<guid isPermaLink="false">http://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 [crayon-6a7ac01422373/] with [crayon-6a7ac014223ce/] Done. If you open the detail page of an order&#8230;]]></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>
<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); // This is where the sorting by SKU takes place ?&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>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>Deleting all products using SQL</title>
		<link>https://www.the-mage-expert.com/1045/magento-deleting-all-products-using-sql/</link>
		<comments>https://www.the-mage-expert.com/1045/magento-deleting-all-products-using-sql/#comments</comments>
		<pubDate>Thu, 10 Mar 2016 10:08:01 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=1045</guid>
		<description><![CDATA[To delete all product related data, use the following query: [crayon-6a7ac01422887/] Due to the constraints it will delete all related data from other tables as well.]]></description>
				<content:encoded><![CDATA[<p>To delete all product related data, use the following query:</p>
<p></p><pre class="crayon-plain-tag">DELETE FROM catalog_product_entity;</pre><p></p>
<p>Due to the constraints it will delete all related data from other tables as well. </p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/1045/magento-deleting-all-products-using-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting products with or without custom options using SQL</title>
		<link>https://www.the-mage-expert.com/1005/magento-getting-products-with-or-without-custom-options-using-sql/</link>
		<comments>https://www.the-mage-expert.com/1005/magento-getting-products-with-or-without-custom-options-using-sql/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 01:22:07 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[custom options]]></category>
		<category><![CDATA[product]]></category>
		<category><![CDATA[products]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=1005</guid>
		<description><![CDATA[To get all products that do not have custom options, simply run the following SQL query: [crayon-6a7ac01422df1/] To get all products that do have custom options, remove the &#8220;NOT&#8221; from the above query.]]></description>
				<content:encoded><![CDATA[<p>To get all products that <strong>do not</strong> have custom options, simply run the following SQL query: </p>
<p></p><pre class="crayon-plain-tag">SELECT
  *
FROM catalog_product_entity
WHERE entity_id NOT IN (SELECT DISTINCT
    product_id
  FROM catalog_product_option);</pre><p></p>
<p>To get all products that do have custom options, remove the &#8220;NOT&#8221; from the above query.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/1005/magento-getting-products-with-or-without-custom-options-using-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing gallery images using MAGMI (Magento Mass Importer)</title>
		<link>https://www.the-mage-expert.com/965/magento-importing-gallery-images-using-magmi-magento-mass-importer/</link>
		<comments>https://www.the-mage-expert.com/965/magento-importing-gallery-images-using-magmi-magento-mass-importer/#comments</comments>
		<pubDate>Tue, 07 Apr 2015 07:59:02 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[MAGMI]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=965</guid>
		<description><![CDATA[To import Magento gallery images using MAGMI (Magento Mass Importer) the following steps are required: Add a new column to your import file. It must be called media_gallery. Now add all your gallery images to that column. The format is:&#8230;]]></description>
				<content:encoded><![CDATA[<p>To import Magento gallery images using MAGMI (<strong>Mag</strong>ento <strong>M</strong>ass <strong>I</strong>mporter) the following steps are required:</p>
<ol>
<li>Add a new column to your import file. It must be called <em>media_gallery</em>.</li>
<li>Now add all your gallery images to that column. The format is: <em>image1.jpg::label1;/image2.jpg::label2&#8230;</em></li>
</ol>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/965/magento-importing-gallery-images-using-magmi-magento-mass-importer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a product image description programmatically</title>
		<link>https://www.the-mage-expert.com/960/magento-adding-a-product-image-description/</link>
		<comments>https://www.the-mage-expert.com/960/magento-adding-a-product-image-description/#comments</comments>
		<pubDate>Wed, 25 Mar 2015 13:46:06 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=960</guid>
		<description><![CDATA[There is no way to add a product image description using the addImageToMediaGallery function. The following code does the job though: [crayon-6a7ac014231f3/]]]></description>
				<content:encoded><![CDATA[<p>There is no way to add a product image description using the <em>addImageToMediaGallery </em>function. The following code does the job though:</p>
<p></p><pre class="crayon-plain-tag">foreach($product-&gt;getData('media_gallery') as $each){
    foreach($each as $image){
         $attributes = $product-&gt;getTypeInstance(true)-&gt;getSetAttributes($product);
         $attributes['media_gallery']-&gt;getBackend()-&gt;updateImage($product, $image['file'], array('label' =&gt; 'whatever'));
     }
}</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/960/magento-adding-a-product-image-description/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the attribute set name of a product</title>
		<link>https://www.the-mage-expert.com/588/magento-getting-attribute-set-name-product/</link>
		<comments>https://www.the-mage-expert.com/588/magento-getting-attribute-set-name-product/#comments</comments>
		<pubDate>Mon, 20 Jan 2014 09:40:12 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[attributeset]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=588</guid>
		<description><![CDATA[Use the following code to get a products attribute set name. [crayon-6a7ac014236bb/]]]></description>
				<content:encoded><![CDATA[<p>Use the following code to get a products attribute set name.</p>
<p></p><pre class="crayon-plain-tag">$attributeSetModel = Mage::getModel(&quot;eav/entity_attribute_set&quot;);
$attributeSetModel-&gt;load($product-&gt;getAttributeSetId());
$attributeSetName  = $attributeSetModel-&gt;getAttributeSetName();</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/588/magento-getting-attribute-set-name-product/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the product for cart item</title>
		<link>https://www.the-mage-expert.com/292/magento-getting-product-for-cart-item/</link>
		<comments>https://www.the-mage-expert.com/292/magento-getting-product-for-cart-item/#comments</comments>
		<pubDate>Wed, 03 Apr 2013 13:06:49 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[cart]]></category>
		<category><![CDATA[item]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=292</guid>
		<description><![CDATA[Use the following code to get the matching product of a Magento cart item: [crayon-6a7ac01423c76/]]]></description>
				<content:encoded><![CDATA[<p>Use the following code to get the matching product of a Magento cart item:</p>
<p></p><pre class="crayon-plain-tag">$product = $item-&gt;getProduct();</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/292/magento-getting-product-for-cart-item/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a products view count programmatically</title>
		<link>https://www.the-mage-expert.com/116/magento-getting-products-view-count-programmatically/</link>
		<comments>https://www.the-mage-expert.com/116/magento-getting-products-view-count-programmatically/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 12:25:15 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[product]]></category>

		<guid isPermaLink="false">http://www.the-mage-expert.com/?p=116</guid>
		<description><![CDATA[Use the below code to figure out, how often a product was called in between 2 dates: [crayon-6a7ac01424147/]]]></description>
				<content:encoded><![CDATA[<p>Use the below code to figure out, how often a product was called in between 2 dates:</p>
<p></p><pre class="crayon-plain-tag">$fromDate = '2012-01-01';
$toDate = now();

$viewedProducts = Mage::getResourceModel('reports/product_collection')-&gt;addViewsCount($fromDate, $toDate);

foreach($viewedProducts as $product) {
    echo 'sku ' . $product-&gt;getData('sku') . ' was viewed ' . $product-&gt;getData('views') . ' times.&lt;br/&gt;';
}</pre><p></p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/116/magento-getting-products-view-count-programmatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
