title: How to get all IDs of products fpr current page in magento
body: <p>I encounter a huge problem with retrieving Product IDs for current page.</p>
  
  <p>Current page is /catalog/product/list</p>
  
  <p>and all data is taken with class </p>
  
  <blockquote>
    <p>Mage_Catalog_Block_Product_List</p>
  </blockquote>
  
  <p>There is method</p>
  
  <blockquote>
    <p>$this->getLoadedProductCollection();</p>
  </blockquote>
  
  <p>with the help of it all product items is returned as a collection</p>
  
  <p>Is there any way to get only IDs of Products? </p>
  
  <p>I need in it because I want to make some remote request with IDs array for getting some additional values before retrieving all data by $this->getLoadedProductCollection();
  ??</p>
  
  <p>Because doing 2 foreach is not a good idea.</p>
  
  <blockquote>
    <p>foreach ($_productCollection as $_product) {    $arrIds[] =
    $_product->getId(); }</p>
    
    <p>foreach ($_productCollection as $_product) { show all products here }</p>
  </blockquote>
  
  <p>Thanks</p>