<?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>NemoPS &#187; manufacturer</title>
	<atom:link href="http://nemops.com/tag/manufacturer/feed/" rel="self" type="application/rss+xml" />
	<link>http://nemops.com</link>
	<description>Prestashop Tutorials, Modules and More!</description>
	<lastBuildDate>Wed, 05 Dec 2018 13:25:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.35</generator>
	<item>
		<title>Filter Products By Manufacturer in the PrestaShop Back Office</title>
		<link>http://nemops.com/filter-products-by-manufacturer-prestashop-back-office/</link>
		<comments>http://nemops.com/filter-products-by-manufacturer-prestashop-back-office/#comments</comments>
		<pubDate>Wed, 23 Mar 2016 11:01:14 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[manufacturer]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[products]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2745</guid>
		<description><![CDATA[<p>In this PrestaShop Tutorial, we will add a column to filter by manufacturer, in the back office Products Catalog Watch the Screencast Text Version This tutorial applies the same method used in the previous one to Filter by country in the PrestaShop Order list. Open up AdminProductsController.php located in controllers/admin. You can either modify the [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/filter-products-by-manufacturer-prestashop-back-office/">Filter Products By Manufacturer in the PrestaShop Back Office</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this PrestaShop Tutorial, we will add a column to filter by manufacturer, in the back office Products Catalog<br />
<span id="more-2745"></span></p>
<h2>Watch the Screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/2QbmT4vUHH4#038;feature=youtu.be" frameborder="0" allowfullscreen></iframe><p><a href="https://www.youtube.com/user/NemoPostScriptum/videos" rel="nofollow" title="Subscribe Post Scriptum's Youtube Channel">Subscribe Post Scriptum's Youtube Channel</a></p>	</div>
<div class="separator"></div>
<h2>Text Version</h2>
<p>This tutorial applies the same method used in the previous one to <a href="http://nemops.com/filter-by-country-prestashop-order-list/#.VvJ1quIgvmg" title="Filter by country in the PrestaShop Order list" target="_blank">Filter by country in the PrestaShop Order list</a>.</p>
<p>Open up <strong>AdminProductsController.php</strong> located in <em>controllers/admin</em>. You can either modify the original or create an override for it.</p>
<p>Locate the following join, at around line 179, inside the construct method</p>
<pre class="brush: php; title: ; notranslate">
        $this-&gt;_join .= ' JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = '.$id_shop.')
                LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = '.$id_shop.')
                LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = '.$id_shop.')
                LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_product` = a.`id_product` AND image_shop.`cover` = 1 AND image_shop.id_shop = '.$id_shop.')
                LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_image` = image_shop.`id_image`)
                LEFT JOIN `'._DB_PREFIX_.'product_download` pd ON (pd.`id_product` = a.`id_product`)';
</pre>
<p>Before the last line, join the manufacturer table:</p>
<pre class="brush: php; title: ; notranslate">
        $this-&gt;_join .= ' JOIN `'._DB_PREFIX_.'product_shop` sa ON (a.`id_product` = sa.`id_product` AND sa.id_shop = '.$id_shop.')
                LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON ('.$alias.'.`id_category_default` = cl.`id_category` AND b.`id_lang` = cl.`id_lang` AND cl.id_shop = '.$id_shop.')
                LEFT JOIN `'._DB_PREFIX_.'shop` shop ON (shop.id_shop = '.$id_shop.')
                LEFT JOIN `'._DB_PREFIX_.'image_shop` image_shop ON (image_shop.`id_product` = a.`id_product` AND image_shop.`cover` = 1 AND image_shop.id_shop = '.$id_shop.')
                LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_image` = image_shop.`id_image`)
                LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = a.`id_manufacturer`)
                LEFT JOIN `'._DB_PREFIX_.'product_download` pd ON (pd.`id_product` = a.`id_product`)';
</pre>
<p>Next, right after that join, let&#8217;s select the manufacturer name, giving it an alias so that it does not conflict with the product name:</p>
<pre class="brush: php; title: ; notranslate">
$this-&gt;_select .= 'm.`name` AS `manufacturer_name`, ';
</pre>
<p>Lastly, we need to add the manufacturer name as column, in the products list. I added it right before <strong>$this->fields_list[&#8216;name&#8217;]</strong>:</p>
<pre class="brush: php; title: ; notranslate">
$this-&gt;fields_list['manufacturer_name'] = array(
            'title' =&gt; $this-&gt;l('Manufacturer'),
            'filter_key' =&gt; 'm!name',
            'orderby' =&gt; true,
        );
</pre>
<p>Save and refresh.<br />
We are done!</p>
<p>The post <a rel="nofollow" href="http://nemops.com/filter-products-by-manufacturer-prestashop-back-office/">Filter Products By Manufacturer in the PrestaShop Back Office</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/filter-products-by-manufacturer-prestashop-back-office/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
