title: Prestashop - Main Categories on Every Template
body: <p>I'm using Prestashop for an eCommerce site.  In the 'product.tpl' I put the following code, which I (eventually) found on a website, and it worked perfectly for my needs.</p>
  
  <pre><code>{assign var='category' value=Product::getProductCategoriesFull($product-&gt;id, $cookie-&gt;id_lang)}
  
  {foreach from=$categories key='categoryId' item='category' name='category'}
      &lt;a href="#"&gt;{$category['name']}&lt;/a&gt;
   {/foreach}
  </code></pre>
  
  <p>This puts the eleven main categories on the product page for me.  Works great.
  Now I need to put those same categories on the page that actually lists categories and subcategories, which I'm using 'category.tpl' for.  That code doesn't work for that template, just no content is loaded at all.</p>
  
  <p>The main categories part is actually supposed to be seen from every page on the website, as part of the header really.  But I'm finding Prestashop to be problematic with includes, which would be the norm with PHP.</p>
  
  <p>I'm trying to not use all the 'overrides' that I keep finding.  It's far too much code that I don't understand.  Can the code I have be slightly modified to work in the category template file (and any other template file on the website)?</p>