title: Display all categories on product page Prestashop
body: <p>I need to get list of all categories and their ids on product page in Prestashop (I am using v 1.6.0.9).</p>
  
  <p>I tried to do something like this:</p>
  
  <pre><code>$other_categories = $something-&gt;getCategories($this-&gt;context-&gt;language-&gt;id, 1, 100);
  
  foreach($other_categories as something)
  {   
      // now if the id of the category isnt "1", display name of category
      if($category-&gt;id != "1") { $category-&gt;name }
  } 
  </code></pre>
  
  <p>But, this is not working.</p>
  
  <p><code>$category-&gt;name</code> gives me only the name of current open category, not the name of each category in the list. I don't know what to put instead of <code>something</code>? And it works only, when I use <code>$category-&gt;getProducts</code>. <a href="http://liftoff.cc/beta/cs/summer-dresses/1-faded-short-sleeve-t-shirts-3.html" rel="noreferrer">Here</a> you have my shop (see "related products").</p>
  
  <p>It is my third shop and I am struggling with this problem for two days. </p>