title: OpenCart XML feed - display only products from specific category
body: <p>After a few days I gave up on this - I couldn't figure it out.</p>
  
  <p>This is the relevant part of my OpenCart XML feed code:</p>
  
  <p>Code:</p>
  
  <pre class="lang-php prettyprint-override"><code>     $this-&gt;load-&gt;model('catalog/category');
  
       $this-&gt;load-&gt;model('catalog/product');
  
       $this-&gt;load-&gt;model('tool/image');
  
       $products = $this-&gt;model_catalog_product-&gt;getProducts();
  
       foreach ($products as $product) {
          if ($product['description']) {
             $output .= '&lt;PRODUCT&gt;';
             $output .= '&lt;NAME&gt;' . $product['name'] . '&lt;/NAME&gt;';
             $output .= '&lt;DESCRIPTION&gt;' . $product['description'] . '&lt;/DESCRIPTION&gt;';
             $output .= '&lt;/PRODUCT&gt;';
  </code></pre>
  
  <p>I would like to be able to display only products from certain categories for example by <code>category_id</code>. </p>
  
  <p>Let's say, that I wanted to display products from category (id) <code>1</code> and <code>2</code>, what changes should be made?</p>
  
  <p>I'm using OpenCart 1.5.1.3</p>