<?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; themes</title>
	<atom:link href="http://nemops.com/tag/themes/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>PrestaShop 1.7 will be a catastrophe. Here is why</title>
		<link>http://nemops.com/prestashop-1-7-will-be-a-catastrophe-here-is-why/</link>
		<comments>http://nemops.com/prestashop-1-7-will-be-a-catastrophe-here-is-why/#comments</comments>
		<pubDate>Wed, 17 Feb 2016 10:02:53 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[modules]]></category>
		<category><![CDATA[prestashop 1.7]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2711</guid>
		<description><![CDATA[<p>PrestaShop will become a totally different software with the release of 1.7 in the upcoming months. Here are a few reasons why I think it will be a catastrophe for the company. Here is the updated post a few days after the official 1.7 release: PrestaShop 1.7 is out, here is why it is a [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-will-be-a-catastrophe-here-is-why/">PrestaShop 1.7 will be a catastrophe. Here is why</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>PrestaShop will become a totally different software with the release of 1.7 in the upcoming months. Here are a few reasons why I think it will be a catastrophe for the company.</p>
<p><span id="more-2711"></span></p>
<p>Here is the updated post a few days after the official 1.7 release: <a title="PrestaShop 1.7 is out, here is why it is a failure" href="http://nemops.com/prestashop-1-7-failure/#.WCMsJ_nx6Uk">PrestaShop 1.7 is out, here is why it is a failure.</a><br />
The more I read about PrestaShop 1.7, the more I think it will be a complete failure.</p>
<h3>PrestaShop 1.7 will (almost) not be retro-compatible (at all)</h3>
<p>While the first news about it, which came directly from the development team, mentioned a gradual adaptation to symfony and hogan, <a title="PrestaShop 1.7 FAQs" href="http://build.prestashop.com/news/prestashop-1-7-faq/" target="blank">the most recent FAQs on the build site clearly stated that <strong>upgrading to 1.7 will be next to impossible</strong>.</a><br />
1.7 will be a drastic shift in how the software is conceived since its own roots, and for this reason 90% of what currently works fine on your 1.6 will never be compatible with 1.7. This was clear for themes already (which might even be acceptable), but even if they still mention that 1.6 modules &#8220;should work with little to no changes in 1.7&#8243;, they add a few caveats on incompatibilities, specifically:</p>
<ul>
<li>- those which target the theme/front office – because we rewrote the way themes are written.</li>
<li>- those which target the Product page – because we rebuilt it with Symfony2 and its Twig template engine.</li>
<li>- those which target the Modules page – again, because we rebuilt it with Symfony2 and its Twig template engine.</li>
</ul>
<p>To translate and make it clear to everyone:</p>
<ul>
<li>- Anything that outputs content to the front office (90% of the modules, including sliders, best sales, coupon related, menus&#8230;)</li>
<li>- Anything that hooks to DisplayAdminProductsExtra</li>
<li>- Anything that has a configuration menu (?). Hard to interpret this, there is no module that I know altering the <strong>modules list</strong>, so we have to assume it&#8217;s the <strong>modules configuration page</strong></li>
</ul>
<div class="separator"></div>
<h3>Will any merchant ever upgrade to 1.7? (Short answer: no.)</h3>
<p>Given the insane amount of effort that will be required to upgrade a running store to PrestaShop 1.7 (<a title="Upgrading to PrestaShop 1.7 will not be possible" href="http://build.prestashop.com/news/prestashop-1-7-faq/#will-it-be-easy-to-upgrade-from-previous-versions-of-prestashop-to-v17" target="_blank">see here</a>), it&#8217;s likely that nobody will ever do it.<br />
Thinking of the current chills one already feels when upgrading a minor version, and seeing how painful it has been to move from 1.4 to 1.5, or to 1.5 to 1.6 in the past, chances are no merchant will ever risk his business to radically switch to a new software. Alas, this is what 1.7 will be, a completely new system that will force you to start anew with your shop.</p>
<div class="separator"></div>
<h3>Smarty or not Smarty</h3>
<p>It&#8217;s hard to understand a few incoherent lines of the FAQs page. While they state the 1.6 themes will not be compatible with 1.7, they also want to continue using Smarty. It would have been better to switch to Symfony since 1.7.0, instead of planning it for future versions, since in any case nobody will be able to upgrade (foreseeing other incompatibilities ahead).</p>
<div class="separator"></div>
<h3>Good-bye overrides!</h3>
<p>Yes. Unfortunately, PrestaShop 1.7 will not use overrides anymore. The article states legacy architecture will still be usable; however the back office&#8217;s Product and Modules page will not allow their usage. Into human language, it means all modules currently (wisely) using overrides will have to drop the system in future 1.7 versions.</p>
<p>This adds another point to the issues for upgraders: <strong>any module using overrides will have to be re-written</strong>.</p>
<p>It is not clear yet how modifications will be handled, but as long-time developer, I am afraid the new extensions system will have a strong impact on code maintainability.</p>
<div class="separator"></div>
<h3>And more</h3>
<ul>
<li>- Mixed up back office interface (Symfony on some pages, Smarty on others)</li>
<li>- The current Beta is almost impossible to install on non-unix OS (tried 4 times, all failures)</li>
<li>- 1.7 will still use the old Swiftmailer, which means no TLS or compatibility with Google Servers</li>
</ul>
<p>For all these, there will be no reason not to migrate to some other software (OpenCart, Magento, just to name a few) for those people currently experiencing trouble and limitations with PrestaShop 1.6. PrestaShop 1.7 doesn&#8217;t simply have a couple of good-deal breaker features, it&#8217;s just a failure in its own conception.<br />
In my opinion, it&#8217;s not acceptable to ask any merchant to switch e-commerce software after establishing a successful business. Given that nobody (1.000009%?) will ever upgrade to the new version, PrestaShop is probably going to lose a big slice, up to 70%, of its current user base. Thinking about your business long-term, you might want to start looking for a life-boat.</p>
<p>Stay tuned for more info about PrestaShop 1.7&#8217;s release.</p>
<div class="separator"></div>
<h3>Additional Resources</h3>
<ul>
<li><a title="PrestaShop 1.7 FAQs" href="http://build.prestashop.com/news/prestashop-1-7-faq/">PrestaShop 1.7 FAQs</a></li>
<li><a title="PrestaShop 1.7 Development Branch on GitHub" href="https://github.com/PrestaShop/PrestaShop/tree/develop">PrestaShop 1.7 Development Branch on GitHub</a></li>
</ul>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-will-be-a-catastrophe-here-is-why/">PrestaShop 1.7 will be a catastrophe. Here is why</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-1-7-will-be-a-catastrophe-here-is-why/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Displaying Prestashop manufacturers in alphabetical groups</title>
		<link>http://nemops.com/alphabetical-prestashop-manufacturers/</link>
		<comments>http://nemops.com/alphabetical-prestashop-manufacturers/#comments</comments>
		<pubDate>Thu, 06 Dec 2012 11:27:34 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Theming]]></category>
		<category><![CDATA[alphabetical]]></category>
		<category><![CDATA[manufacturers]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=788</guid>
		<description><![CDATA[<p>Isn&#8217;t it a bit boring to have all the manufacturers and suppliers listed as they were products? Today, we will see how to change the default Prestashop manufacturers list display to something more professional, alphabetically split. Prestashop version used: 1.5.2 Finished result A couple of weeks ago, one of my clients expressed the will to [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/alphabetical-prestashop-manufacturers/">Displaying Prestashop manufacturers in alphabetical groups</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Isn&#8217;t it a bit boring to have all the manufacturers and suppliers listed as they were products? Today, we will see how to change the default Prestashop manufacturers list display to something more professional, alphabetically split.</p>
<p><span id="more-788"></span></p>
<a class="download-files button style1" href="http://nemops.com/wp-content/uploads/2012/12/Prestashop-Manufacturers-alphabetical-list.zip" title="Download Project Files">Download Project Files</a>
<p><strong>Prestashop version used:</strong> 1.5.2</p>
<h2>Finished result</h2>
<p><a href="http://nemops.com/wp-content/uploads/2012/12/manufacturers_styling.png"><img src="http://nemops.com/wp-content/uploads/2012/12/manufacturers_styling.png" alt="Displaying Prestashop manufacturers in alphabetical groups - Finished Result" title="Displaying Prestashop manufacturers in alphabetical groups - Finished Result" width="553" height="592" class="aligncenter size-full wp-image-799" /></a></p>
<p>A couple of weeks ago, one of my clients expressed the will to change the look of the manufacturers and suppliers list pages into something more professional. By default, as you might know, Prestashop displays those lists the following way</p>
<p><a href="http://nemops.com/wp-content/uploads/2012/12/manufacturers_default.png"><img src="http://nemops.com/wp-content/uploads/2012/12/manufacturers_default.png" alt="Prestashop Manufacturers default display" title="Prestashop Manufacturers default display" width="555" height="550" class="aligncenter size-full wp-image-800" /></a></p>
<p>Although it might be okay for some websites, we can&#8217;t say this type of design is eye-catching or professional. It&#8217;s a bit boring and conventional, and also very similar to the product list look. The client wanted to have manufacturers and suppliers listed within alphabetical groups, and brought me this website as an example: <a href="http://www.menlook.com/fr/marques-mode-homme" title="Alphabetical manufacturers list">http://www.menlook.com/fr/marques-mode-homme</a>. Indeed, that looks professional. Without much effort, Prestashop can be bended to have this kind of display, so, without further do, lets get started.</p>
<div class="separator"></div>
<h2>Step 1 &#8211; Planning our strategy</h2>
<blockquote><p><span class="bqstart">“</span>Be sure you do not directly edit the default template. Create a copy instead, and select it as the active theme to see changes by going to <em>Preferences &gt; Themes</em><span class="bqend">”</span></p></blockquote>
<p>We are going to use the manufacturer list for this tutorial, but you can feel free to apply the process to the suppliers list too, since the template files are almost identical. Please, also note that I&#8217;ll be using the default template, and your files might be different if you use a custom one. Let&#8217;s open up <strong>manufacturer-list.tpl</strong>, that is found in the template&#8217;s main folder. Here is how it looks:</p>
<pre class="brush: php; title: ; notranslate">
{capture name=path}{l s='Manufacturers'}{/capture}
{include file=&quot;$tpl_dir./breadcrumb.tpl&quot;}

&lt;h1&gt;{l s='Manufacturers'}&lt;/h1&gt;

{if isset($errors) AND $errors}
	{include file=&quot;$tpl_dir./errors.tpl&quot;}
{else}
	&lt;p class=&quot;nbrmanufacturer&quot;&gt;{strip}
		&lt;span class=&quot;bold&quot;&gt;
			{if $nbManufacturers == 0}{l s='There are no manufacturers.'}
			{else}
				{if $nbManufacturers == 1}
					{l s='There is %d manufacturer.' sprintf=$nbManufacturers}
				{else}
					{l s='There are %d manufacturers.' sprintf=$nbManufacturers}
				{/if}
			{/if}
		&lt;/span&gt;{/strip}
	&lt;/p&gt;

	{if $nbManufacturers &gt; 0}
		&lt;ul id=&quot;manufacturers_list&quot;&gt;
		{foreach from=$manufacturers item=manufacturer name=manufacturers}
			&lt;li class=&quot;clearfix {if $smarty.foreach.manufacturers.first}first_item{elseif $smarty.foreach.manufacturers.last}last_item{else}item{/if}&quot;&gt; 
				&lt;div class=&quot;left_side&quot;&gt;
					&lt;!-- logo --&gt;
					&lt;div class=&quot;logo&quot;&gt;
					{if $manufacturer.nb_products &gt; 0}&lt;a href=&quot;{$link-&gt;getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}&quot; title=&quot;{$manufacturer.name|escape:'htmlall':'UTF-8'}&quot; class=&quot;lnk_img&quot;&gt;{/if}
						&lt;img src=&quot;{$img_manu_dir}{$manufacturer.image|escape:'htmlall':'UTF-8'}-medium_default.jpg&quot; alt=&quot;&quot; width=&quot;{$mediumSize.width}&quot; height=&quot;{$mediumSize.height}&quot; /&gt;
					{if $manufacturer.nb_products &gt; 0}&lt;/a&gt;{/if}
					&lt;/div&gt;
					&lt;!-- name --&gt;
					&lt;h3&gt;
						{if $manufacturer.nb_products &gt; 0}&lt;a href=&quot;{$link-&gt;getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}&quot;&gt;{/if}
						{$manufacturer.name|truncate:60:'...'|escape:'htmlall':'UTF-8'}
						{if $manufacturer.nb_products &gt; 0}&lt;/a&gt;{/if}
					&lt;/h3&gt;
					&lt;p class=&quot;description rte&quot;&gt;
					{if $manufacturer.nb_products &gt; 0}&lt;a href=&quot;{$link-&gt;getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}&quot;&gt;{/if}
						{$manufacturer.short_description}
					{if $manufacturer.nb_products &gt; 0}&lt;/a&gt;{/if}
					&lt;br /&gt;
					{if $manufacturer.nb_products &gt; 0}&lt;a href=&quot;{$link-&gt;getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}&quot;&gt;{/if}
						&lt;span&gt;{if $manufacturer.nb_products == 1}{l s='%d product' sprintf=$manufacturer.nb_products|intval}{else}{l s='%d products' sprintf=$manufacturer.nb_products|intval}{/if}&lt;/span&gt;
					{if $manufacturer.nb_products &gt; 0}&lt;/a&gt;{/if}
					&lt;/p&gt;
				&lt;/div&gt;

				&lt;div class=&quot;right_side&quot;&gt;
				{if $manufacturer.nb_products &gt; 0}
					&lt;a class=&quot;button&quot; href=&quot;{$link-&gt;getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}&quot;&gt;{l s='view products'}&lt;/a&gt;
				{/if}
				&lt;/div&gt;
			&lt;/li&gt;
		{/foreach}
		&lt;/ul&gt;
		{include file=&quot;$tpl_dir./pagination.tpl&quot;}
	{/if}
{/if}
	

</pre>
<p>All we are interested in is the content of the <strong>foreach loop</strong> that starts at line 24. We want to split up the task in 2 parts: <strong>first, we will lay down the basic logic to add a new list item when the starting letter changes;</strong> This item will hold the main letter, or number range for numbers from zero to nine, and will take up all the center column&#8217;s space. <strong>Secondly, we will style the list by editing the css stored in the global.css file, and float the manufacturers so that 4 can sit in a single row.</strong> We also want to remove those manufacturers images, since they would only clutter the alphabetical split list. To give it a clean look, the only thing left will be the brand name, with, eventually, a greyed out look if it holds no products.</p>
<p>Now, before starting, if you have an out-of-the-box Prestashop store, you might want to go ahead an add a couple of new manufacturers to test the tutorial&#8217;s results. To do this, login to the back office, head to <em>Catalog &gt; Manufacturers</em> and click <strong>Add new</strong>. For testing purposes, I suggest you add at least the following (fictitional, or so I hope!) brands:</p>
<ul>
<li>0 Geez</li>
<li>7 Sins</li>
<li>Arcana</li>
<li>Bumblebee Go</li>
<li>BillHill</li>
<li>Hoo Hoo</li>
<li>Zero Gs</li>
</ul>
<p>&nbsp;</p>
<p><strong>Notice:</strong> After creating a new manufacturer, be sure you enable it (last option in the page) since, by default, they are disabled!</p>
<div class="separator"></div>
<h2>Step 2 &#8211; The &#8220;new letter&#8221; logic</h2>
<p>As we said, the first step would be to add the logic that allows the system to know if the next manufacturer name has a new first letter. Luckily, they&#8217;re displayed in an alphabetical order by default, and so we only need to check when there is a change in the first letter. Add the following just after the opening of the <strong>foreach loop</strong> at line 24:</p>
<pre class="brush: php; title: ; notranslate">
	{if !isset($currentLetter)}
		{$currentLetter = $manufacturer.name|substr:0:1}
		&lt;li class=&quot;alphabetical&quot;&gt;&lt;h3&gt;{$manufacturer.name|substr:0:1}&lt;/h3&gt;&lt;/li&gt;
	{else if isset($currentLetter) &amp;&amp; $currentLetter != $manufacturer.name|substr:0:1}	
		{$currentLetter = $manufacturer.name|substr:0:1}
		&lt;li class=&quot;alphabetical&quot;&gt;&lt;h3&gt;{$manufacturer.name|substr:0:1}&lt;/h3&gt;&lt;/li&gt;
	{/if}
</pre>
<p><strong>Explanation:</strong> First of all, we are checking if the <strong>$currentLetter</strong> variable has been already set. If not, it means that&#8217;s the first item in the loop, and we need to define it, and create the letter separator. As previously mentioned, we are using a <em>list item</em> to handle this. So, we define the current letter as a substring, from 0 to 1 (alas, the first letter) of the manufacturer&#8217;s name.<br />
Else, if the variable has already been set up (read: it&#8217;s not the first item in the loop), we want to check if the current manufacturer&#8217;s first letter is different than what we set as the current letter. If it&#8217;s different, we create a new separator, and reassign the current letter to the new first letter. Here is what you&#8217;ll end up with:</p>
<p><a href="http://nemops.com/wp-content/uploads/2012/12/manufacturers_step1.png"><img src="http://nemops.com/wp-content/uploads/2012/12/manufacturers_step1-346x1024.png" alt="Displaying Prestashop manufacturers in alphabetical groups - Step 1" title="Displaying Prestashop manufacturers in alphabetical groups - Step 1" width="346" height="1024" class="aligncenter size-large wp-image-797" /></a></p>
<p>They are logically separated into groups, depending on the letter with which they begin. And it might just be okay for you; but let&#8217;s take this a step forward: it&#8217;s common use to group numbers together, shall we do it?</p>
<p>&nbsp;</p>
<div class="separator"></div>
<h2>Step 3 &#8211; Grouping all numbers together</h2>
<p>If you are happy with having each of the different numbers as a separate group, you can skip this step, if not, read on.</p>
<p>We are now going to group the numbers into a single group, since as I said it is common use. But how can we do that? If you review the code above, you&#8217;ll notice that we are using the first character of each manufacturer name as a reference on when to start a new group. The problem is that we are still referencing a string, and, if we check it with the <strong>is_int()</strong> function, it would just return false. We have to use a bit of a trick. Here is how to change the previous block of code:</p>
<pre class="brush: php; title: ; notranslate">
{if !isset($currentLetter)}
	{$currentLetter = $manufacturer.name|substr:0:1}
	&lt;li class=&quot;alphabetical&quot;&gt;&lt;h3&gt;{if in_array($currentLetter, array(0,1,2,3,4,5,6,7,8,9))}0-9{else}{$manufacturer.name|substr:0:1}{/if}&lt;/h3&gt;&lt;/li&gt;
{else if isset($currentLetter) &amp;&amp; $currentLetter != $manufacturer.name|substr:0:1 &amp;&amp; (string)($manufacturer.name|substr:0:1) != (string)((int)($manufacturer.name|substr:0:1))}	
	{$currentLetter = $manufacturer.name|substr:0:1}
	&lt;li class=&quot;alphabetical&quot;&gt;&lt;h3&gt;{$manufacturer.name|substr:0:1}&lt;/h3&gt;&lt;/li&gt;
{/if}	

</pre>
<p><strong>Explanation:</strong> First, we change the very first divider to hold the current first character only if it&#8217;s not in the numbers array. If it is, we add 0-9. Of course, it will be like this regardless of the numbers that are present, but at least we can give it a clean look without further stressing the system with additional foreach statements.<br />
Then, we have the tricky part inside the <strong>else if</strong>. The following, which we just added, might be confusing:</p>
<pre class="brush: php; title: ; notranslate">
&amp;&amp; (string)($manufacturer.name|substr:0:1) != (string)((int)($manufacturer.name|substr:0:1))	
</pre>
<p>Basically, we are telling the system <strong>&#8220;and if the string value of the character is different than the string value of the integer of that same value&#8221;</strong>. A bit complex I assume, let&#8217;s make a practical example. Let&#8217;s just assume the character is &#8220;A&#8221;: in this case, the string value of the integer of &#8220;A&#8221; will not be &#8220;A&#8221; itself, but &#8220;0&#8221; (since we are type casting the letter to an integer, that results in zero). So this is basically the process: we type cast &#8220;A&#8221; to an integer, which is 0 (number). Then, we compare the original string (which was &#8220;A&#8221;) with the new value, telling smarty that it&#8217;s a string, so not just 0, but &#8220;0&#8221; with quotes. If we were to check it against the number itself, it would have always resulted as a true check, and thus never adding the new list elements. Remember? <strong>We want to add new separators only if the first character is a letter.</strong></p>
<p>I know, it&#8217;s a bit complex, but hopefully you can find your way around by closely looking at the code (which expresses itselft better than I can do!). Here is what we should have now;</p>
<p><a href="http://nemops.com/wp-content/uploads/2012/12/manufactuerers_numbers_step.png"><img src="http://nemops.com/wp-content/uploads/2012/12/manufactuerers_numbers_step.png" alt="Displaying Prestashop manufacturers in alphabetical groups - After the number logic" title="Displaying Prestashop manufacturers in alphabetical groups - After the number logic" width="548" height="986" class="aligncenter size-full wp-image-806" /></a></p>
<p>&nbsp;</p>
<div class="separator"></div>
<h2>Step 4 &#8211; Removing useless stuff</h2>
<p>We have one small thing left in the template file. As before, you can stay with this if you&#8217;re happy, since we&#8217;ll now be removing images and all un-necessary texts. <strong>Get rid of the entire div with class &#8220;right_side&#8221;</strong>. In the left_side, get rid of everything but the H3 tag that contains the manufacturer name. In the end, your code should approximately look like this:</p>
<pre class="brush: php; title: ; notranslate">
{capture name=path}{l s='Manufacturers'}{/capture}
{include file=&quot;$tpl_dir./breadcrumb.tpl&quot;}

&lt;h1&gt;{l s='Manufacturers'}&lt;/h1&gt;

{if isset($errors) AND $errors}
	{include file=&quot;$tpl_dir./errors.tpl&quot;}
{else}
	&lt;p class=&quot;nbrmanufacturer&quot;&gt;{strip}
		&lt;span class=&quot;bold&quot;&gt;
			{if $nbManufacturers == 0}{l s='There are no manufacturers.'}
			{else}
				{if $nbManufacturers == 1}
					{l s='There is %d manufacturer.' sprintf=$nbManufacturers}
				{else}
					{l s='There are %d manufacturers.' sprintf=$nbManufacturers}
				{/if}
			{/if}
		&lt;/span&gt;{/strip}
	&lt;/p&gt;
	{if $nbManufacturers &gt; 0}
		&lt;ul id=&quot;manufacturers_list&quot; class=&quot;clearfix&quot;&gt;
		{foreach from=$manufacturers item=manufacturer name=manufacturers}
			{if !isset($currentLetter)}
				{$currentLetter = $manufacturer.name|substr:0:1}
				&lt;li class=&quot;alphabetical&quot;&gt;&lt;h3&gt;{if in_array($currentLetter, array(0,1,2,3,4,5,6,7,8,9))}0-9{else}{$manufacturer.name|substr:0:1}{/if}&lt;/h3&gt;&lt;/li&gt;
			{else if isset($currentLetter) &amp;&amp; $currentLetter != $manufacturer.name|substr:0:1 &amp;&amp; (string)($manufacturer.name|substr:0:1) != (string)((int)($manufacturer.name|substr:0:1))}	
				{$currentLetter = $manufacturer.name|substr:0:1}
				&lt;li class=&quot;alphabetical&quot;&gt;&lt;h3&gt;{$manufacturer.name|substr:0:1}&lt;/h3&gt;&lt;/li&gt;
			{/if}	
			&lt;li class=&quot;clearfix {if $smarty.foreach.manufacturers.first}first_item{elseif $smarty.foreach.manufacturers.last}last_item{else}item{/if}&quot;&gt; 
				&lt;div class=&quot;left_side&quot;&gt;
					&lt;!-- name --&gt;
					&lt;h4&gt;
						{if $manufacturer.nb_products &gt; 0}&lt;a href=&quot;{$link-&gt;getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:'htmlall':'UTF-8'}&quot;&gt;{/if}
						{$manufacturer.name|truncate:60:'...'|escape:'htmlall':'UTF-8'}
						{if $manufacturer.nb_products &gt; 0}&lt;/a&gt;{/if}
					&lt;/h4&gt;
				&lt;/div&gt;
			&lt;/li&gt;
		{/foreach}
		&lt;/ul&gt;
		{include file=&quot;$tpl_dir./pagination.tpl&quot;}
	{/if}
{/if}
	
</pre>
<p>While the page should look like this:</p>
<p><a href="http://nemops.com/wp-content/uploads/2012/12/manufacturers_step3.png"><img src="http://nemops.com/wp-content/uploads/2012/12/manufacturers_step3.png" alt="Displaying Prestashop manufacturers in alphabetical groups - Junk Removed" title="Displaying Prestashop manufacturers in alphabetical groups - Junk Removed" width="539" height="1021" class="aligncenter size-full wp-image-807" /></a></p>
<p><strong>Notice:</strong> For some reason, pagination seems to be broken on my 1.5.2. If you experience the same problem, get rid of the <strong>{include file=&#8221;$tpl_dir./pagination.tpl&#8221;}</strong> part as well.</p>
<p>At this point, things are a bit screwed up. Notice that I&#8217;ve also <strong>turned the manufacturer&#8217;s name H3 into a smaller h4, to give it a better hierarchy</strong>, and added <strong>class=&#8221;clearfix&#8221;</strong> at the ul container, since we are going to float those list items in a while. Those dividers are not so useful anymore, isn&#8217;t it? Let&#8217;s give our page a decent styling in the final step!</p>
<p> &nbsp;</p>
<div class="separator"></div>
<h2>Step 5 &#8211; Final styling touches</h2>
<p>Open up <strong>global.css</strong>, found in the <em>/css/</em> subfolder of the theme.<br />
Locate the <strong>&#8220;PAGE MANUFACTURER&#8221;</strong> comment, ad about line 1506 of the default theme. If you use a custom theme, you might want to look for <strong>#manufacturer_list</strong>. Look for <strong>ul#manufacturers_list li</strong>, it should look like this:</p>
<pre class="brush: css; title: ; notranslate">
ul#manufacturers_list li {
	margin-bottom: 14px;
	padding: 12px 8px;
	border: 1px solid #eee;
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
	border-radius:3px;
}	
</pre>
<p>Change it into this:</p>
<pre class="brush: css; title: ; notranslate">
ul#manufacturers_list li {
	float: left;
	width: 24%;	
	margin: 0.5%;
	border-bottom: 1px solid #eee;
}
</pre>
<p>Then, after that style block, but before <em>ul#manufacturers_list li a.lnk_img</em>, add the following:</p>
<pre class="brush: css; title: ; notranslate">
ul#manufacturers_list li h4 {padding-bottom: 10px;font-weight:normal; color: #ccc}
ul#manufacturers_list li:hover {
	border-bottom: 1px solid #990000
}
ul#manufacturers_list li a {color: #383838}
ul#manufacturers_list li:hover a {color:#990000}

ul#manufacturers_list li.alphabetical {
	width: 100%;
	clear:both;
	margin: 14px 0;
	border-bottom: 2px solid #383838;
}
ul#manufacturers_list li a:hover {text-decoration: none;}
</pre>
<p>And that&#8217;s it! We have created a nifty difference between &#8220;group LIs&#8221; and &#8220;manufactures LIs&#8221;. We also greyed out manufacturers that are not holding any product at the moment. Here is the final result:</p>
<p><a href="http://nemops.com/wp-content/uploads/2012/12/manufacturers_styling.png"><img src="http://nemops.com/wp-content/uploads/2012/12/manufacturers_styling.png" alt="Displaying Prestashop manufacturers in alphabetical groups - Finished Result" title="Displaying Prestashop manufacturers in alphabetical groups - Finished Result" width="553" height="592" class="aligncenter size-full wp-image-799" /></a></p>
<p>&nbsp;</p>
<div class="separator"></div>
<h2>Conclusion</h2>
<p>That&#8217;s all folks, you now have a styled list that looks a lot more professional than the default Prestashop manufacturer list. As I said at the beginning of the article, the very same process can be applied to suppliers, since these 2 things share about the same template and styling. I am not so sure about products, since they can be ordered in other ways than by name; of course, you can always give it a try and <a href="http://nemops.com/contact" title="Contact me" target="_blank">let me know</a> the result! If you want to know more about Prestashop manufacturers and suppliers, you can have a look at my  101 series tutorial for day 3: <a href="http://nemops.com/prestashop-categories-and-products/" title="Prestashop 101 Day 3 – Prestashop categories and products" target="_blank">Prestashop categories and products</a>.</p>
<div class="separator"></div>
<p>&nbsp;</p>
<h3>Additional Resources</h3>
<ul>
<li><a href="http://doc.prestashop.com/display/PS15/A+Look+Inside+the+Catalog" title="Prestashop Documentation: a look inside the catalog">Prestashop Documentation: a look inside the catalog</a></li>
<li><a href="http://nemops.com/prestashop-categories-and-products/" title="Prestashop 101 Day 3 - Prestashop Categories and Products">Prestashop 101 Day 3 &#8211; Prestashop Categories and Products</a></li>
</ul>
<p>The post <a rel="nofollow" href="http://nemops.com/alphabetical-prestashop-manufacturers/">Displaying Prestashop manufacturers in alphabetical groups</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/alphabetical-prestashop-manufacturers/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>
