title: Retrieve all product IDs associated with a Catalog Price Rule in Magento
body: <p>I need a way to retrieve product IDs associated with a Catalog Price Rule promotion (ex. 50% the price of all items in the BICYCLES category).  I'd like to do this without having to iterate through the entire product database.</p>
  
  <p>I know there is a function called <code>getRuleProductIds($ruleID)</code>, which should return an array of product IDs by rule ID, but I have no idea where to use it, which collection to associate it with, etc.</p>
  
  <p>I have the following code in a <code>products_in_promotion.phtml</code> template:</p>
  
  <pre><code>&lt;?php 
    $rules = Mage::getModel('catalogrule/rule');
    $collection = $rules-&gt;getCollection();
    $sale_items = $collection-&gt;getRuleProductIds(1); # ??????? this throws an error
  ?&gt;
  </code></pre>
  
  <p><code>$collection</code> properly stores an array of all the Catalog Price rules, but that's as close as I can get.  No product list is in sight.</p>
  
  <p>Any ideas what I'm doing wrong here?</p>