<?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; prestashop 1.7</title>
	<atom:link href="http://nemops.com/tag/prestashop-1-7/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>Creating Multilanguage attachments in PrestaShop 1.7</title>
		<link>http://nemops.com/prestashop-1-7-multilanguage-attachments/</link>
		<comments>http://nemops.com/prestashop-1-7-multilanguage-attachments/#comments</comments>
		<pubDate>Wed, 05 Dec 2018 13:24:30 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[prestashop 1.7]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3173</guid>
		<description><![CDATA[<p>Attachments are a great way to provide your customers with rich pre-sale information about your products. But what if your site is multilingual? Let’s see how to make Attachments multilanguage in PrestaShop 1.7. Watch the screencast Text Version Step 1 – Adding the attachments Adding attachments with the proper name is fundamental for this technique. [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-multilanguage-attachments/">Creating Multilanguage attachments in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Attachments are a great way to provide your customers with rich pre-sale information about your products. But what if your site is multilingual? Let’s see how to make Attachments multilanguage in PrestaShop 1.7.</p>
<p><span id="more-3173"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/zoo6WkY7ouc" 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>
<h2>Text Version</h2>
<h3>Step 1 – Adding the attachments</h3>
<p>Adding attachments with the proper name is fundamental for this technique. We will append the language ISOs to the names, so that they can later be targeted in the template.</p>
<p>Login to the back office, then navigate to Catalog &gt; Products, and choose one to start with. At the bottom of the <strong>Options </strong>tab, add two test attachments. The file names don’t matter, but the <strong>title </strong>you choose does. Add one attachment for each language it’s translated to, making sure you append the ISO code for that language after the name, like this: <strong>_en</strong>, <strong>_it</strong>, <strong>_fr</strong>.</p>
<p><strong>Note: </strong>If you don’t know what the language code is, hop to International &gt; Localization, and click on Languages. The ISO code is listed in the table:</p>
<p><a href="http://nemops.com/wp-content/uploads/2018/12/prestashop-17-language-iso.jpg"><img class="aligncenter size-full wp-image-3174" src="http://nemops.com/wp-content/uploads/2018/12/prestashop-17-language-iso.jpg" alt="PrestaShop 1.7 Language ISO" width="665" height="361" /></a></p>
<p>&nbsp;</p>
<p>If you need an attachment to display for all of the languages, make sure you <strong>do not</strong> add any language ISO to it.</p>
<div class="separator"></div>
<h3>Step 2 – Editing the template</h3>
<p>&nbsp;</p>
<p>For this tutorial I am using the “classic” template, that ships with PrestaShop 1.7. If you are using a custom theme, be aware that some of the code might be different, or even located in a different file.</p>
<p>Open up <strong>themes/classic/templates/catalog/product.tpl</strong>.</p>
<p>Locate the following code:</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
{if $product.attachments}
                    &lt;div class=&quot;tab-pane fade in&quot; id=&quot;attachments&quot; role=&quot;tabpanel&quot;&gt;
                       &lt;section class=&quot;product-attachments&quot;&gt;
                         &lt;h3 class=&quot;h5 text-uppercase&quot;&gt;{l s='Download' d='Shop.Theme.Actions'}&lt;/h3&gt;
</pre>
<p>Right afterwards, but before the foreach loop, add the following</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
{$lang_checker = &quot;_&quot;|cat: {$language.iso_code}}
{$lang_checker_array = ['en', 'it']}

</pre>
<p><strong>Make sure you use your own ISO codes instead of ‘en’ and ‘it’. Add all of the languages your store supports</strong></p>
<p>Next, wrap the attachment block in the following IF statement</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
                         {if $attachment.name|strstr:{$lang_checker}}
                           &lt;div class=&quot;attachment&quot;&gt;
                             &lt;h4&gt;&lt;a href=&quot;{url entity='attachment' params=['id_attachment' =&gt; $attachment.id_attachment]}&quot;&gt;{$attachment.name|replace:{$lang_checker}:''}&lt;/a&gt;&lt;/h4&gt;
                             &lt;p&gt;{$attachment.description}&lt;/p
                             &lt;a href=&quot;{url entity='attachment' params=['id_attachment' =&gt; $attachment.id_attachment]}&quot;&gt;
                               {l s='Download' d='Shop.Theme.Actions'} ({$attachment.file_size_formatted})
                             &lt;/a&gt;
                           &lt;/div&gt;
{/if}

</pre>
<p>If you don’t need some attachments to display for all languages, you can go ahead and test it, as the basic part if basically done. If you do, you will need to add a little extra condition, and we will use that lang_checker_array for it.</p>
<div class="separator"></div>
<h3>Step 2.1 – Fallback for generic attachments</h3>
<p>Right before the end of the IF statement that checks for our ISO code, add the following:</p>
<pre class="brush: php; html-script: true; title: ; notranslate">

{else}
  {$denier = false}
  {foreach from=$lang_checker_array item=checkr_lang}
                              {if $attachment.name|strstr:{$checkr_lang}}
                              {$denier = true}
                              {/if}
  {/foreach}

</pre>
<p><strong>Explanation: </strong>We are setting a variable (denier) that will prevent displaying the attachment if it contains <strong>any</strong> language ISO. Because of this logic, make sure you use a string that’s unique enough in case your attachment names contain product codes or alike, otherwise they won’t ever display.</p>
<p>Right afterwards, but still inside our main IF, add this last chunk of code</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
                               
{if !$denier}
&lt;div class=&quot;attachment&quot;&gt;
&lt;h4&gt;&lt;a href=&quot;{url entity='attachment' params=['id_attachment' =&gt; $attachment.id_attachment]}&quot;&gt;{$attachment.name|replace:{$lang_checker}:''}&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;{$attachment.description}&lt;/p
&lt;a href=&quot;{url entity='attachment' params=['id_attachment' =&gt; $attachment.id_attachment]}&quot;&gt;
{l s='Download' d='Shop.Theme.Actions'} ({$attachment.file_size_formatted})
&lt;/a&gt;
&lt;/div&gt;
{/if}

</pre>
<p>Which is basically a copy of the standard attachment code. If the attachment does not contain any iso code, it means we can display it normally.</p>
<p>We are done!</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-multilanguage-attachments/">Creating Multilanguage attachments in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-1-7-multilanguage-attachments/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Removing out of stock products from the cart in PrestaShop 1.7</title>
		<link>http://nemops.com/remove-out-of-stock-products-from-the-cart-prestashop-17/</link>
		<comments>http://nemops.com/remove-out-of-stock-products-from-the-cart-prestashop-17/#comments</comments>
		<pubDate>Thu, 04 Oct 2018 00:08:07 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[out of stock]]></category>
		<category><![CDATA[prestashop 1.7]]></category>
		<category><![CDATA[products]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3151</guid>
		<description><![CDATA[<p>PrestaShop 1.7 does not remove out of stock products from shopping carts, creating major troubles when keeping low stock. Let&#8217;s see how to improve our customer&#8217;s experience with a simple modification! Watch the screencast Text Version If you have lots of users it might happen sometimes that a product goes out of stock while it&#8217;s [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/remove-out-of-stock-products-from-the-cart-prestashop-17/">Removing out of stock products from the cart in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>PrestaShop 1.7 does not remove out of stock products from shopping carts, creating major troubles when keeping low stock. Let&#8217;s see how to improve our customer&#8217;s experience with a simple modification!</p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/OouTaCaMZBU" 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>
<h2>Text Version</h2>
<p>If you have lots of users it might happen sometimes that a product goes out of stock while it&#8217;s in someone&#8217;s cart. For example two users add the last unit, one proceeds to the checkout and the other doesn&#8217;t. What happens is when the second customer places the order, the product will not be available anymore, and it will cause confusion if not irritation to that person, especially if you cannot restock that specific item.</p>
<h3>The Cart Presenter in PrestaShop 1.7</h3>
<p>The first file we need to edit is the <strong>cartPresenter</strong>, which is responsible of displaying cart information across the store.</p>
<p>Open up <em>src/Adapter/Cart/cartpresenter.php</em> and add the following around line 51, in the class properties:</p>
<pre class="brush: php; title: ; notranslate">
private static $removedProducts = [];
</pre>
<p>Then locate the <strong>present </strong>method, and right after the following statement:</p>
<pre class="brush: php; title: ; notranslate">
        if ($shouldSeparateGifts) {
            $rawProducts = $cart-&gt;getProductsWithSeparatedGifts();
        } else {
            $rawProducts = $cart-&gt;getProducts(true);
        }
</pre>
<p>Add this:</p>
<pre class="brush: php; title: ; notranslate">


        // start nemo

        if(!self::$removedProducts)
            foreach ($rawProducts as $pk =&gt; $product)
            {
            // we want to remove the product in case it's not available
                if($product['quantity_available'] &lt;= 0 &amp;&amp; !Product::isAvailableWhenOutOfStock($product['out_of_stock']))
                {
                    Context::getContext()-&gt;cart-&gt;deleteProduct($product['id_product'],$product['id_product_attribute'], $product['id_customization'], $product['id_address_delivery']);
                    self::$removedProducts[] = $product['name'];
                    unset($rawProducts[$pk]);
                    continue;
                }
            }
           
        Context::getContext()-&gt;smarty-&gt;assign(['removed_products' =&gt; self::$removedProducts]);
        \Media::addJsDef(['removed_products' =&gt; self::$removedProducts]);


</pre>
<p>And that&#8217;s all for php! Before continuing let&#8217;s make sure the product actually gets removed, so let&#8217;s test it and see if they really get removed!</p>
<h3>The shopping cart template in PrestaShop 1.7</h3>
<p>Let&#8217;s open up <em>themes/classic/modules/ps_shoppingcart/ps_shoppingcart.tpl </em></p>
<pre class="brush: php; html-script: true; title: ; notranslate">
{if isset($removed_products) &amp;&amp; $removed_products}
  &lt;div id=&quot;removed-modal&quot; class=&quot;modal&quot;&gt;
    &lt;div class=&quot;modal-dialog&quot;&gt;
      &lt;div class=&quot;modal-content&quot;&gt;
        &lt;div class=&quot;modal-body&quot;&gt;
          &lt;p&gt;{l s='These products are out of stock' d='Shop.Theme.Checkout'}&lt;/p&gt;
            &lt;ul&gt;
              {foreach from=$removed_products item='r_product'}
                &lt;li&gt;- {$r_product}&lt;/li&gt;
              {/foreach}
            &lt;/ul&gt;
            &lt;p&gt;{l s='And have therefore been removed from your cart' d='Shop.Theme.Checkout'}&lt;/p&gt;
        &lt;/div&gt;

      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
{/if}
</pre>
<p>And the very last thing is actually triggering the modal when we need, so let&#8217;s add some javascript to <em>themes/classic/assets/js/custom.js</em></p>
<pre class="brush: jscript; title: ; notranslate">
if(removed_products.length &gt; 0) {
	$('#removed-modal').modal('show');
}

</pre>
<p>And that&#8217;s it! Now this modal doesn&#8217;t look so fancy, but no worries since in one of the next videos we will go over creating and styling custom popups in prestashop 1.7, so stay tuned!</p>
<p>The post <a rel="nofollow" href="http://nemops.com/remove-out-of-stock-products-from-the-cart-prestashop-17/">Removing out of stock products from the cart in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/remove-out-of-stock-products-from-the-cart-prestashop-17/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Creating a “Clear cart” button in PrestaShop 1.7</title>
		<link>http://nemops.com/prestashop-1-7-clear-cart-button/</link>
		<comments>http://nemops.com/prestashop-1-7-clear-cart-button/#comments</comments>
		<pubDate>Mon, 06 Nov 2017 13:09:06 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[cart]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[prestashop 1.7]]></category>
		<category><![CDATA[products]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=3093</guid>
		<description><![CDATA[<p>Let&#8217; see how to create a button to empty the PrestaShop 1.7 shopping cart in one click! Version used: Prestashop 1.7.2.4 In this tutorial we will see how to apply my previous guide on Creating a “Clear cart” button in PrestaShop to PrestaShop 1.7, as it doesn&#8217;t work out of the box because of the [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-clear-cart-button/">Creating a “Clear cart” button in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Let&#8217; see how to create a button to empty the PrestaShop 1.7 shopping cart in one click!<br />
<span id="more-3093"></span></p>
<ul>
<li>Version used: <strong>Prestashop 1.7.2.4</strong></li>
</ul>
<p>In this tutorial we will see how to apply my previous guide on <a href="http://nemops.com/clear-cart-button-prestashop">Creating a “Clear cart” button in PrestaShop</a> to PrestaShop 1.7, as it doesn&#8217;t work out of the box because of the new template.</p>
<p>The basic code still works, and the process is more or less the same, though the files needing modifications are totally different. For this tutorial, I will be using the classic (or standard) template, so wherever you read &#8220;themename&#8221;, just put <strong>classic</strong>. As a side not, please notice some files might be different if you use a custom PrestaShop theme.</p>
<h2>Adding the button to the cart page in PrestaShop 1.7</h2>
<p>The PrestaShop 1.7 template structure is quite different from 1.6, so we need to account for that. The main view for the cart is now located at <em>themes/*themename*/templates/checkout/</em>, and it&#8217;s called <strong>cart.tpl</strong>. Open it up, and locat the following block:</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
      {block name='cart_overview'}
        {include file='checkout/_partials/cart-detailed.tpl' cart=$cart}
      {/block}
</pre>
<p>This represents the products list block, and we want to add the button right after it:</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
    &lt;a class=&quot;btn btn-primary&quot; style=&quot;float:right&quot; id=&quot;removeAll&quot; href=&quot;javascript:void(0)&quot;&gt;
      Empty Cart
    &lt;/a&gt;
</pre>
<p>At this point, unlike 1.6 where we could add our code directly to the template, with PrestaShop 1.7 we have to use a new file, named <strong>custom.js</strong>.</p>
<div class="separator"></div>
<h2>Adding new javascript to a PrestaShop 1.7 template</h2>
<p>Open up <strong>custom.js</strong>, located in <em>themes/*themename*/assets/js</em>.<br />
It&#8217;s empty by default, so if not (as in the case of custom templates), just add the code at the end.</p>
<p>This file is loaded on all pages, and since we only want to run it on the cart one, we have to wrap our snippet with a condition:</p>
<pre class="brush: jscript; title: ; notranslate">
if(prestashop.page.page_name == 'cart')
{}
</pre>
<p>The <strong>prestashop</strong> javascript variable is a new global available in all pages of the shop, which contains a number of useful data that can be used in scripts. In this case, we use the current page name.</p>
<p>Here is all the rest of the code we need:</p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function() {

	    $('#removeAll').click(function(e) {
	        e.preventDefault()
	        $.ajax({
	            type: 'POST',
	            headers: { &quot;cache-control&quot;: &quot;no-cache&quot; },
	            url: prestashop.urls.base_url + &quot;cart&quot;,
	            async: true,
	            cache: false,
	            data: 'deleteAll=1&amp;token=' + prestashop.token + '&amp;ajax=true',
	            success: function(data){	
	                window.location.reload();
	            }
	        })
	    });
	});	
</pre>
<p><strong>Explanation:</strong> we are using the prestashop variable again, this time to fetch the base url. The cart controller, which we will be editing shortly, can be accessed at /cart by default, so we pass this url to the ajax call.<br />
For the querystring, we pass in <strong>deleteAll</strong>, to make sure we can refer to this action in the next step, a <strong>token</strong> required by PrestaShop 1.7, and <strong>ajax=true</strong>, so that the cart know the action has to be run in ajax mode.<br />
If the call is successful, we refresh the page to show that the cart is now empty.</p>
<div class="separator"></div>
<h2>Editing the CartController</h2>
<p>PrestaShop 1.7 discourages the use of overrides, but we will use one in any case <img src="http://nemops.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /><br />
Create a new file in <em>override/controllers/front</em>, and name it <strong>cartController.php</strong>. Reach back the original cart controller in the main <em>controllers/front</em>, and copy the whole <strong>updateCart</strong> method, pasting it into our new file:</p>
<pre class="brush: php; title: ; notranslate">
    protected function updateCart()
    {
        // Update the cart ONLY if $this-&gt;cookies are available, in order to avoid ghost carts created by bots
        if ($this-&gt;context-&gt;cookie-&gt;exists() &amp;&amp; !$this-&gt;errors &amp;&amp; !($this-&gt;context-&gt;customer-&gt;isLogged() &amp;&amp; !$this-&gt;isTokenValid())) {
            if (Tools::getIsset('add') || Tools::getIsset('update')) {
                $this-&gt;processChangeProductInCart();
            } elseif (Tools::getIsset('delete')) {
                $this-&gt;processDeleteProductInCart();
            } elseif (CartRule::isFeatureActive()) {
                if (Tools::getIsset('addDiscount')) {
                    if (!($code = trim(Tools::getValue('discount_name')))) {
                        $this-&gt;errors[] = $this-&gt;trans('You must enter a voucher code.', array(), 'Shop.Notifications.Error');
                    } elseif (!Validate::isCleanHtml($code)) {
                        $this-&gt;errors[] = $this-&gt;trans('The voucher code is invalid.', array(), 'Shop.Notifications.Error');
                    } else {
                        if (($cartRule = new CartRule(CartRule::getIdByCode($code))) &amp;&amp; Validate::isLoadedObject($cartRule)) {
                            if ($error = $cartRule-&gt;checkValidity($this-&gt;context, false, true)) {
                                $this-&gt;errors[] = $error;
                            } else {
                                $this-&gt;context-&gt;cart-&gt;addCartRule($cartRule-&gt;id);
                            }
                        } else {
                            $this-&gt;errors[] = $this-&gt;trans('This voucher does not exist.', array(), 'Shop.Notifications.Error');
                        }
                    }
                } elseif (($id_cart_rule = (int)Tools::getValue('deleteDiscount')) &amp;&amp; Validate::isUnsignedId($id_cart_rule)) {
                    $this-&gt;context-&gt;cart-&gt;removeCartRule($id_cart_rule);
                    CartRule::autoAddToCart($this-&gt;context);
                }
            }
        } elseif (!$this-&gt;isTokenValid() &amp;&amp; Tools::getValue('action') !== 'show' &amp;&amp; !Tools::getValue('ajax')) {
            Tools::redirect('index.php');
        }
    }
</pre>
<p>All we have to do now is add our condition, as part of all those ELSEIFs:</p>
<pre class="brush: php; title: ; notranslate">
            elseif (Tools::getIsset('deleteAll')) {
                $this-&gt;context-&gt;cart-&gt;delete();
                $this-&gt;context-&gt;cookie-&gt;id_cart = 0;
                die(1);
            }
</pre>
<p>Here is the final code:</p>
<pre class="brush: php; title: ; notranslate">
    protected function updateCart()
    {
        // Update the cart ONLY if $this-&gt;cookies are available, in order to avoid ghost carts created by bots
        if ($this-&gt;context-&gt;cookie-&gt;exists() &amp;&amp; !$this-&gt;errors &amp;&amp; !($this-&gt;context-&gt;customer-&gt;isLogged() &amp;&amp; !$this-&gt;isTokenValid())) {
            if (Tools::getIsset('add') || Tools::getIsset('update')) {
                $this-&gt;processChangeProductInCart();
            } elseif (Tools::getIsset('delete')) {
                $this-&gt;processDeleteProductInCart();

            } elseif (Tools::getIsset('deleteAll')) { /* Nemo */
                $this-&gt;context-&gt;cart-&gt;delete();
                $this-&gt;context-&gt;cookie-&gt;id_cart = 0;
                die(1);
            } elseif (CartRule::isFeatureActive()) {
                if (Tools::getIsset('addDiscount')) {
                    if (!($code = trim(Tools::getValue('discount_name')))) {
                        $this-&gt;errors[] = $this-&gt;trans('You must enter a voucher code.', array(), 'Shop.Notifications.Error');
                    } elseif (!Validate::isCleanHtml($code)) {
                        $this-&gt;errors[] = $this-&gt;trans('The voucher code is invalid.', array(), 'Shop.Notifications.Error');
                    } else {
                        if (($cartRule = new CartRule(CartRule::getIdByCode($code))) &amp;&amp; Validate::isLoadedObject($cartRule)) {
                            if ($error = $cartRule-&gt;checkValidity($this-&gt;context, false, true)) {
                                $this-&gt;errors[] = $error;
                            } else {
                                $this-&gt;context-&gt;cart-&gt;addCartRule($cartRule-&gt;id);
                            }
                        } else {
                            $this-&gt;errors[] = $this-&gt;trans('This voucher does not exist.', array(), 'Shop.Notifications.Error');
                        }
                    }
                } elseif (($id_cart_rule = (int)Tools::getValue('deleteDiscount')) &amp;&amp; Validate::isUnsignedId($id_cart_rule)) {
                    $this-&gt;context-&gt;cart-&gt;removeCartRule($id_cart_rule);
                    CartRule::autoAddToCart($this-&gt;context);
                }
            }
        } elseif (!$this-&gt;isTokenValid() &amp;&amp; Tools::getValue('action') !== 'show' &amp;&amp; !Tools::getValue('ajax')) {
            Tools::redirect('index.php');
        }
    }
</pre>
<p>We are done! Reach the back office, Advanced Parameters, Performance, and hit the clear cache button on the top right, so that the override takes place.</p>
<p>Should it not work, check that <strong>Disable all overrides</strong> is set to no, right below on the same page. If it still doesn&#8217;t, try editing the core CartController.php.</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-clear-cart-button/">Creating a “Clear cart” button in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-1-7-clear-cart-button/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Manufacturers in alphabetical list in PrestaShop 1.7</title>
		<link>http://nemops.com/prestashop-17-alphabetical-manufacturers/</link>
		<comments>http://nemops.com/prestashop-17-alphabetical-manufacturers/#comments</comments>
		<pubDate>Tue, 07 Feb 2017 11:50:04 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Theming]]></category>
		<category><![CDATA[alphabetical]]></category>
		<category><![CDATA[brands]]></category>
		<category><![CDATA[manufacturers]]></category>
		<category><![CDATA[prestashop 1.7]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2975</guid>
		<description><![CDATA[<p>As we did for PrestaShop 1.5, let&#8217;s see how to turn the boring manufacturer list into an alphabetical, fancy one, for PrestaShop 1.7 Full Code to display manufacturers in an alphabetical list</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-17-alphabetical-manufacturers/">Manufacturers in alphabetical list in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>As we did for PrestaShop 1.5, let&#8217;s see how to turn the boring manufacturer list into an alphabetical, fancy one, for PrestaShop 1.7</p>
<p><span id="more-2975"></span></p>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/e5jc5Fv64D8" 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>
<h2>Full Code to display manufacturers in an alphabetical list</h2>
<pre class="brush: php; html-script: true; title: ; notranslate">
 &lt;div class=&quot;all-brands&quot;&gt;
      
      &lt;ul class=&quot;letter-select clearifx&quot;&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_0&quot;&gt;#&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_A&quot;&gt;A&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_B&quot;&gt;B&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_C&quot;&gt;C&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_D&quot;&gt;D&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_E&quot;&gt;E&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_F&quot;&gt;F&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_G&quot;&gt;G&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_H&quot;&gt;H&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_I&quot;&gt;I&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_J&quot;&gt;J&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_K&quot;&gt;K&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_L&quot;&gt;L&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_M&quot;&gt;M&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_N&quot;&gt;N&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_O&quot;&gt;O&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_P&quot;&gt;P&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_Q&quot;&gt;Q&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_R&quot;&gt;R&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_S&quot;&gt;S&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_T&quot;&gt;T&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_U&quot;&gt;U&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_V&quot;&gt;V&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_W&quot;&gt;W&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_X&quot;&gt;X&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_Y&quot;&gt;Y&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#letter_Z&quot;&gt;Z&lt;/a&gt;&lt;/li&gt;        
      &lt;/ul&gt;

  
      &lt;div class=&quot;brands-by-letter&quot;&gt;
          {$current_letter = '#'}
          {foreach from=$brands item=brand}
            {$first_letter = $brand.name|substr:0:1}
            {if $current_letter != $first_letter}
              {if !$first_letter|in_array:['0','1','2','3','4','5','6','7','8','9']}
                {$current_letter = $first_letter|upper}
                &lt;/div&gt;
              &lt;/div&gt;
              {/if}
              
              &lt;div class=&quot;box-letter clearfix&quot; id=&quot;letter_{if $current_letter == '#'}0{else}{$current_letter|upper}{/if}&quot;&gt;
                &lt;div class=&quot;box-title&quot;&gt;{$current_letter|upper}&lt;/div&gt;
                &lt;div class=&quot;letter-content&quot;&gt;
            {/if}
            &lt;p&gt;
              &lt;a href=&quot;{$link-&gt;getManufacturerLink($brand.id_manufacturer)}&quot;&gt;{$brand.name}&lt;/a&gt;
            &lt;/p&gt;
          {/foreach}
        &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;
</pre>
<pre class="brush: css; title: ; notranslate">


.all-brands .letter-select li {
	float:left;
}

.all-brands .letter-select a {
	padding: 11px;
	font-weight: bold;
	font-size: 14px;
	display:block;
}

.all-brands .box-letter .box-title {
	width: 100%;
	display:block;
	background: #ccc;
	font-weight: bold;
	height: 40px;
	line-height: 40px;
	padding-left: 10px
}

.all-brands .box-letter .letter-content {
	line-height: 32px;
	padding-left: 10px
}

.all-brands .box-letter p {
	margin-bottom: 0;
	float: left;
	width: 25%;
}

</pre>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-17-alphabetical-manufacturers/">Manufacturers in alphabetical list in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-17-alphabetical-manufacturers/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Adding images to the top menu in PrestaShop 1.7</title>
		<link>http://nemops.com/adding-images-top-menu-prestashop-17/</link>
		<comments>http://nemops.com/adding-images-top-menu-prestashop-17/#comments</comments>
		<pubDate>Tue, 17 Jan 2017 11:42:39 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Theming]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[prestashop 1.7]]></category>
		<category><![CDATA[top menu]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2966</guid>
		<description><![CDATA[<p>In this tutorial we will take back images for the PrestaShop top menu, that had been removed in 1.7</p>
<p>The post <a rel="nofollow" href="http://nemops.com/adding-images-top-menu-prestashop-17/">Adding images to the top menu in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this tutorial we will take back images for the PrestaShop top menu, that had been removed in 1.7</p>
<p><span id="more-2966"></span></p>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/1YP1BMCIRPs" 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>
<p>The post <a rel="nofollow" href="http://nemops.com/adding-images-top-menu-prestashop-17/">Adding images to the top menu in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/adding-images-top-menu-prestashop-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding subcategories to the category page in PrestaShop 1.7</title>
		<link>http://nemops.com/prestashop-1-7-add-subcategories/</link>
		<comments>http://nemops.com/prestashop-1-7-add-subcategories/#comments</comments>
		<pubDate>Mon, 02 Jan 2017 11:48:34 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Theming]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[prestashop 1.7]]></category>
		<category><![CDATA[subcategories]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2937</guid>
		<description><![CDATA[<p>Have you been troubled by the absence of subcategories, in PrestaShop 1.7&#8217;s category pages? Let&#8217;s take them back in a few, simple steps! Long time PrestaShop users have always been able to display subcategories in category pages, whatever theme they used. However, for some reason PrestaShop 1.7 doesn&#8217;t seem to have any subcategory showing on [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-add-subcategories/">Adding subcategories to the category page in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Have you been troubled by the absence of subcategories, in PrestaShop 1.7&#8217;s category pages? Let&#8217;s take them back in a few, simple steps!</p>
<p><span id="more-2937"></span></p>
<p>Long time PrestaShop users have always been able to display subcategories in category pages, whatever theme they used. However, for some reason PrestaShop 1.7 doesn&#8217;t seem to have any subcategory showing on page with the classic (standard) theme, making it harder for users to navigate through the catalog, if the merchant chose not to use the side category block or layered navigation. Taking them back is fortunately easy enough, and can be done by almost just cloning the code from the 1.6 default-bootstrap template.<br />
The files we need to edit are <strong>category.tpl</strong> and <strong>theme.css</strong>, so let&#8217;s get to it!</p>
<div class="separator"></div>
<h2>Adding the subcategories loop to PrestaShop 1.7&#8217;s category template</h2>
<p>In the classic theme, let&#8217;s open up <strong>category.tpl</strong>, located in <em>themes\classic\templates\catalog\listing</em>, it should look like the following:</p>
<pre class="brush: php; html-script: true; title: ; notranslate">
{extends file='catalog/listing/product-list.tpl'}

{block name='product_list_header'}
    &lt;div class=&quot;block-category card card-block hidden-sm-down&quot;&gt;
      &lt;h1 class=&quot;h1&quot;&gt;{$category.name}&lt;/h1&gt;
      {if $category.description}
        &lt;div id=&quot;category-description&quot; class=&quot;text-muted&quot;&gt;{$category.description nofilter}&lt;/div&gt;
        &lt;div class=&quot;category-cover&quot;&gt;
          &lt;img src=&quot;{$category.image.large.url}&quot; alt=&quot;{$category.image.legend}&quot;&gt;
        &lt;/div&gt;
      {/if}
    &lt;/div&gt;
    &lt;div class=&quot;text-xs-center hidden-md-up&quot;&gt;
      &lt;h1 class=&quot;h1&quot;&gt;{$category.name}&lt;/h1&gt;
    &lt;/div&gt;
{/block}
</pre>
<p>What we want to do is append the subcategory loop inside the block, just before it closes, so after the div containing the category title. The <strong>$subgcategories</strong> variable is already assigned to the template, much like in PrestaShop 1.6, and it&#8217;s ready to be used:</p>
<pre class="brush: php; html-script: true; title: ; notranslate">

&lt;div id=&quot;subcategories&quot;&gt;
  &lt;p class=&quot;subcategory-heading&quot;&gt;{l s='Subcategories'}&lt;/p&gt;
  &lt;ul class=&quot;clearfix&quot;&gt;
  	{foreach from=$subcategories item=subcategory}
  	&lt;li&gt;{$subcategory.name}&lt;/li&gt;
	{/foreach}
   &lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>The code we just added is pretty much useless at this stage, as it just prints out each subcategory&#8217;s name, but let&#8217;s first see if it works. Save and refresh any category having children, and subcategories should pop up like this:</p>
<p><a href="http://nemops.com/wp-content/uploads/2016/12/subcategories_added.png"><img src="http://nemops.com/wp-content/uploads/2016/12/subcategories_added.png" alt="Adding subcategories to prestashop 1.7" width="485" height="381" class="aligncenter size-full wp-image-2940" /></a></p>
<p>Nice! Let&#8217;s not make our effort useful by linking them to the proper pages</p>
<pre class="brush: php; html-script: true; title: ; notranslate">

&lt;div id=&quot;subcategories&quot;&gt;
  &lt;p class=&quot;subcategory-heading&quot;&gt;{l s='Subcategories'}&lt;/p&gt;
  &lt;ul class=&quot;clearfix&quot;&gt;
  	{foreach from=$subcategories item=subcategory}
  	&lt;li&gt;
  		&lt;h5&gt;&lt;a class=&quot;subcategory-name&quot; href=&quot;{$link-&gt;getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}&quot;&gt;{$subcategory.name|truncate:25:'...'|escape:'html':'UTF-8'}&lt;/a&gt;&lt;/h5&gt;
  	&lt;/li&gt;
	{/foreach}
   &lt;/ul&gt;
&lt;/div&gt;
</pre>
<p><strong>Explanation:</strong> I copied and pasted the code from 1.6 for the category title, simply wrapping the name in an h5 tag, then an anchor pointing to the proper page. To get the url, we can still use the $link class, and its <strong>getCategoryLink</strong> method. I also left in the <strong>truncate</strong> modifier for the name, which cuts it to the length of 25 characters, and lastly escaped it.</p>
<p>At this point they are at least useful! But why don&#8217;t we go ahead and add the image as well? Let&#8217;s do it right before the h5:</p>
<pre class="brush: php; html-script: true; title: ; notranslate">

&lt;div id=&quot;subcategories&quot;&gt;
  &lt;p class=&quot;subcategory-heading&quot;&gt;{l s='Subcategories'}&lt;/p&gt;
  &lt;ul class=&quot;clearfix&quot;&gt;
  	{foreach from=$subcategories item=subcategory}
  	&lt;li&gt;
  		&lt;a href=&quot;{$link-&gt;getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}&quot; title=&quot;{$subcategory.name|escape:'html':'UTF-8'}&quot; class=&quot;img&quot;&gt;
          	&lt;img class=&quot;replace-2x&quot; src=&quot;{$urls.base_url}img/c/{$subcategory.id_category}.jpg&quot; alt=&quot;{$subcategory.name|escape:'html':'UTF-8'}&quot;  /&gt;
        &lt;/a&gt;
  		&lt;h5&gt;&lt;a class=&quot;subcategory-name&quot; href=&quot;{$link-&gt;getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}&quot;&gt;{$subcategory.name|truncate:25:'...'|escape:'html':'UTF-8'}&lt;/a&gt;&lt;/h5&gt;
  	&lt;/li&gt;
	{/foreach}
   &lt;/ul&gt;
&lt;/div&gt;
</pre>
<p><strong>Explanation:</strong> once more, we are using the link class&#8217;s method to get the correct url pointing to the subcategory; then, we simply add an img tag, pointing directly to the category images folder, as each of them has an image named with the corresponding ID. <strong>Careful</strong> though! We have no way to check if the category has an image or not, and since the default method this theme uses is broken (heh.), you might as well get away without images.<br />
At this point you should have something like this, depending on your images&#8217; size:</p>
<p><a href="http://nemops.com/wp-content/uploads/2016/12/added_images.png"><img src="http://nemops.com/wp-content/uploads/2016/12/added_images.png" alt="Adding subcategories with Images to Prestashop 1.7" width="278" height="648" class="aligncenter size-full wp-image-2941" /></a></p>
<p>It needs some styling, so let&#8217;s see what we can do with css!</p>
<div class="separator"></div>
<h2>Styling subcategories in PrestaShop 1.7</h2>
<p>Open up <strong>theme.css</strong>, located in <em>themes\classic\assets\css</em>. At the very end, let&#8217;s append our css code:</p>
<pre class="brush: css; title: ; notranslate">
.subcategory-heading {
  font-weight: bold;
}
#subcategories ul li {
  float: left;
  width: 25%;
  text-align: center;
}
#subcategories ul li img {
  margin-bottom: 10px;
}
</pre>
<p>I preferred staying on a simple styling here, and of course you will need to adapt the width depending on your category image size. Also, you might want to add media queries to make sure it displays well at smaller resolutions.<br />
Save and refresh, we are done!</p>
<p><a href="http://nemops.com/wp-content/uploads/2016/12/end-result.png"><img src="http://nemops.com/wp-content/uploads/2016/12/end-result.png" alt="Adding subcategories with Images to Prestashop 1.7 - End result" width="521" height="382" class="aligncenter size-full wp-image-2942" /></a></p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-add-subcategories/">Adding subcategories to the category page in PrestaShop 1.7</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-1-7-add-subcategories/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Taking back the Add To Cart button in the Product list (Prestashop 1.7)</title>
		<link>http://nemops.com/prestashop-1-7-product-list-add-to-cart-button/</link>
		<comments>http://nemops.com/prestashop-1-7-product-list-add-to-cart-button/#comments</comments>
		<pubDate>Thu, 15 Dec 2016 08:20:33 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[cart]]></category>
		<category><![CDATA[prestashop 1.7]]></category>
		<category><![CDATA[product list]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2929</guid>
		<description><![CDATA[<p>If you started using PrestaShop 1.7 (brave!) and you miss the Add to Cart button in the product list, let&#8217;s see how to take it back with 4 lines of code!</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-product-list-add-to-cart-button/">Taking back the Add To Cart button in the Product list (Prestashop 1.7)</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>If you started using PrestaShop 1.7 (brave!) and you miss the Add to Cart button in the product list, let&#8217;s see how to take it back with 4 lines of code!<br />
<span id="more-2929"></span></p>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/9E5NVZi1oCQ" 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>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-product-list-add-to-cart-button/">Taking back the Add To Cart button in the Product list (Prestashop 1.7)</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-1-7-product-list-add-to-cart-button/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>PrestaShop 1.7 is out, here is why it is a failure</title>
		<link>http://nemops.com/prestashop-1-7-failure/</link>
		<comments>http://nemops.com/prestashop-1-7-failure/#comments</comments>
		<pubDate>Wed, 09 Nov 2016 11:27:51 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[prestashop 1.7]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2882</guid>
		<description><![CDATA[<p>Last monday PrestaShop 1.7 has been released. Let&#8217;s see why it is a huge step backwards, driving the company dangerously downhill. Following my previous post on why PrestaShop 1.7 will be a catastrophe, I thought it was high time to update my thoughts on it, given its official release. Have they changed? No. Here is [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-failure/">PrestaShop 1.7 is out, here is why it is a failure</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Last monday PrestaShop 1.7 has been released. Let&#8217;s see why it is a huge step backwards, driving the company dangerously downhill.</p>
<p><span id="more-2882"></span></p>
<p>Following my previous post on <a title="PrestaShop 1.7 will be a catastrophe. Here is why" href="http://nemops.com/prestashop-1-7-will-be-a-catastrophe-here-is-why/#.WCIg5fnx6Uk" target="_blank">why PrestaShop 1.7 will be a catastrophe</a>, I thought it was high time to update my thoughts on it, given its official release. Have they changed? No. Here is why.</p>
<h2>Slow slow slow</h2>
<p>PrestaShop 1.7 is clearly slower than its predecessor. The installation itself (on localhost) took me over 10 minutes because of the page load, and kept hanging on the database connection settings. The new architecture is heavier, meaning it will need a better machine to run the same shop with the same performance. And this, for a merchant, means a bigger investment.</p>
<h2>Ugly Design</h2>
<p>PrestaShop has never shined for its template, but 1.6&#8217;s one was above the average level of a generic, free E-Commerce Platform. Whoever designed the &#8220;Classic&#8221; theme for PrestaShop 1.7 mistook &#8220;essential&#8221; with &#8220;poor&#8221;. This new theme is not &#8220;clean&#8221;, but rather just empty.<br />
It looks bad, it feels bad and it&#8217;s lacking things more than being simplified. It&#8217;s dominantly starking white, and let&#8217;s just forget about images missing in the category header.<br />
It&#8217;s not possible to set images for the top menu, which in return looks barely more than the result of a simple tutorial on creating mega menus.<br />
In the product page, room for the long description has been sacrificed in favor of&#8230; nothing?<br />
If you write a little more than a couple of lines (as you normally would, adding extra descriptions and media for the item) you will find yourself with a completely useless half of the page.</p>
<h2>Ugly Urls</h2>
<p>Some wise guy thought using a single id for each product was not enough. Hence, products with attributes now have 2 IDs in the url, one for the product itself, another for the combination. A plethora of us developers (including me) have developed their own versions of pretty urls, but the core team evidently thinks it&#8217;s not something merchants would want in 2016. Of course.</p>
<h2>No bug fixes</h2>
<p>Have you visited the <a title="PrestaShop Forge" href="http://forge.prestashop.com/" target="_blank">PrestaShop Forge</a> recently? I did.<br />
Have a look at the bug reports VS fixes metrics on 1.6:<br />
<a href="http://nemops.com/wp-content/uploads/2016/11/prestashop_bug_tracker.png"><img class="aligncenter size-large wp-image-2889" src="http://nemops.com/wp-content/uploads/2016/11/prestashop_bug_tracker-680x459.png" alt="PrestaShop Bug Tracker Metrics" width="680" height="459" /></a>Is it really necessary to release a new version, leaving all these things unsolved?<br />
The Development Team Leader Julien Martin stated 1.7 is not a release about bug fixing. Indeed, but they are still there.</p>
<h2>No new features</h2>
<p>In the article about the <a title="PrestaShop 1.7 release article on PrestaShop Dev Blog" href="http://build.prestashop.com/news/prestashop-1-7-0-0-released/" target="_blank">1.7 release on the PrestaShop Development blog</a>, Xavier Borderie mentions &#8220;a number of major features&#8221;. Let&#8217;s see what they are, according to him:<br />
Symfony 2, new Default Theme and Starter Theme, New Product Back office, reworked modules page, reworked main menu.<br />
Should we dissect them for a second?<br />
<strong>Symfony 2: </strong>given the fact it&#8217;s only been implemented in 2 pages of the back office, it&#8217;s not really implemented in all the shop. The front office still uses Smarty.<br />
<strong>Themes: </strong>I already said enough about the classic one, while the Starter Theme is simply one without any css or js.<br />
<strong>New Product Back Office: </strong>I give him a point there, it&#8217;s the only new feature.<br />
<strong>Reworked modules page: </strong>More following below<br />
<strong>Reworked main menu: </strong>They just shuffled items and put some together, so that you have to click more to reach a page you were previously able to see right away (try to reach the customer groups page )<br />
Are these new features? No. Only one is.</p>
<h2>Core features removed</h2>
<p>Here follows a list of features to which we bid adieu (seems appropriate) with the advent of PrestaShop 1.7:</p>
<p>One Page Checkout (!)<br />
Cart Dropdown (!)<br />
Advanced Stock Management<br />
Font Awesome<br />
Theme Configurator<br />
Live search in the modules section, you have to hit enter<br />
Send to a friend<br />
Ajax removed from order history</p>
<h2>Advertisement, plenty of.</h2>
<p>As merchant, what would you like to see when you first click on the modules list? I would expect a page where I can configure modules. Things work differently at PrestaShop&#8217;s HQ. Apparently, what they like to see when they are configuring their shop is Advertisement. The first page we are presented with, as soon as we click on &#8220;modules&#8221;, is a nice list of &#8220;modules and services selected for you&#8221;. Nice.</p>
<h2>Still no documentation</h2>
<p>During the 1.7 installation process, you are embarrassingly given a link to the 1.6 documentation. Why is PrestaShop still lacking a decent official resource where to look for in case of issues?<br />
Why is there still no sign of a real developer guide? I am guessing nobody really knows the code base.<br />
We are given no indication at all, if any hint on the development blog. The code is not only not documented, it&#8217;s not even commented. Developers and users are just left on their own, trying to figure out the ins and outs of each feature, if it ever makes sense.<br />
EDIT: It seems there is a work-in-progress documentation, as Krystian Podemski pointed out in the comments: <a title="PrestaShop 1.7 Documentation" href="http://developers.prestashop.com/" target="_blank">http://developers.prestashop.com/</a> although it seems a bit confused to me.</p>
<p><strong>Messed up code</strong></p>
<p>As previously stated, 1.7 comes with a mixed architecture between the old code and Symfony 2. Some pages in the back office use Symfony, some modules use namespaces, the front office theme still uses Smarty, but differently. Overrides are formally deprecated but still available, because there is no valid alternative. Honestly, what should a developer do? Update modules? How, and why, when the core team doesn&#8217;t have a clear idea of the next steps, either?</p>
<p><strong>The Puffin won&#8217;t save the day</strong></p>
<p>The sad truth, PrestaShop, is that having a mascot won&#8217;t save the day. Updating visuals, making pretty commercials, full of dreams and promises, and then coming up with a software that&#8217;s a huge step backwards is not the way to go.<br />
I solidarize with John James, who wrote an article on <a title="PrestaShop, A Sad Story" href="https://medium.com/@prestashoppoweruser/prestashop-a-sad-story-8b7e0a8795b8#.d78kjq9ds" target="_blank">Medium.com</a>, pointing out the faults of the company&#8217;s recent decisions. The new CEO, despite making things look prettier, didn&#8217;t bring anything good to PrestaShop, and is actually driving it downhill, through a path that will systematically push away every new potential user.<br />
Using the software as bait to make money, by reducing its features, selling people what was previously given for free, is not on the path to popularity. Nor it will bring any growth, and Google Trends clearly show that the interest in PrestaShop is slowly, but constantly decaying.<br />
PrestaShop is sinking, and it will drown unless they change their mentality for good.<br />
We, developers, merchants, who survived and made a living thanks to it so far, can only hope for the good to happen. In the meantime, we will keep supporting 1.6, and, why not, continue to develop and fix bugs, even if just on our own, at least paying attention to our user base.</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-failure/">PrestaShop 1.7 is out, here is why it is a failure</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-1-7-failure/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Prestashop 1.7 beta preview</title>
		<link>http://nemops.com/prestashop-17-beta-preview/</link>
		<comments>http://nemops.com/prestashop-17-beta-preview/#comments</comments>
		<pubDate>Wed, 08 Jun 2016 12:33:01 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[prestashop 1.7]]></category>
		<category><![CDATA[preview]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2787</guid>
		<description><![CDATA[<p>Prestashop 1.7 beta came out last week, let&#8217;s see how it has improved since the early alpha version we saw already Watch the Screencast Additional Resources Download Prestashop 1.7 Beta</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-17-beta-preview/">Prestashop 1.7 beta preview</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Prestashop 1.7 beta came out last week, let&#8217;s see how it has improved since the early alpha version we saw already<br />
<span id="more-2787"></span></p>
<h2>Watch the Screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/Wb7d5Iof488" 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>
<h3>Additional Resources</h3>
<ul>
<li><a href="https://www.prestashop.com/en/developers-versions" title="Download Prestashop 1.7 Beta" target="_blank">Download Prestashop 1.7 Beta</a></li>
</ul>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-17-beta-preview/">Prestashop 1.7 beta preview</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-17-beta-preview/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PrestaShop 1.7 Pre-Beta video Preview</title>
		<link>http://nemops.com/prestashop-1-7-pre-beta-preview/</link>
		<comments>http://nemops.com/prestashop-1-7-pre-beta-preview/#comments</comments>
		<pubDate>Wed, 24 Feb 2016 09:31:14 +0000</pubDate>
		<dc:creator><![CDATA[Nemo]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[back office]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[prestashop 1.7]]></category>
		<category><![CDATA[preview]]></category>

		<guid isPermaLink="false">http://nemops.com/?p=2721</guid>
		<description><![CDATA[<p>In this first video on PrestaShop 1.7, we will see what&#8217;s the current state of development, exploring the front office and the product and modules catalog in the back office. Watch the screencast More about PrestaShop 1.7 PrestaShop 1.7&#8217;s new theme Preview PrestaShop 1.7 will be a catastrophe. Here is why</p>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-pre-beta-preview/">PrestaShop 1.7 Pre-Beta video Preview</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this first video on PrestaShop 1.7, we will see what&#8217;s the current state of development, exploring the front office and the product and modules catalog in the back office.</p>
<p><span id="more-2721"></span></p>
<h2>Watch the screencast</h2>

	<div class="video-embed">
		<iframe width="640" height="360" src="http://www.youtube.com/embed/UUmTq-tfADw" 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>
<h3>More about PrestaShop 1.7</h3>
<ul>
<li><a href="http://nemops.com/prestashop-1-7-new-theme-preview/#.Vs14E_k4Hmg" title="PrestaShop 1.7 new theme Preview">PrestaShop 1.7&#8217;s new theme Preview</a></li>
<li><a href="http://nemops.com/prestashop-1-7-will-be-a-catastrophe-here-is-why/#.Vs14O_k4Hmg" title="http://nemops.com/prestashop-1-7-will-be-a-catastrophe-here-is-why/#.Vs14O_k4Hmg">PrestaShop 1.7 will be a catastrophe. Here is why</a></li>
</ul>
<p>The post <a rel="nofollow" href="http://nemops.com/prestashop-1-7-pre-beta-preview/">PrestaShop 1.7 Pre-Beta video Preview</a> appeared first on <a rel="nofollow" href="http://nemops.com">NemoPS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nemops.com/prestashop-1-7-pre-beta-preview/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
