title: Special price not showing on category page
body: <p>I have added special price for the products. it's showing special price on product detail page but not showing on the category page. if I call specialprice on list.phtml than it show only 0. I think need to make some changes in list.php .</p>
  
  <p>code are below:-
   in list.php my function is </p>
  
  <pre><code> protected function _getProductCollection()
      {
          if (is_null($this-&gt;_productCollection)) {
              $layer = $this-&gt;getLayer();
              /* @var $layer Mage_Catalog_Model_Layer */
              if ($this-&gt;getShowRootCategory()) {
                  $this-&gt;setCategoryId(Mage::app()-&gt;getStore()-&gt;getRootCategoryId());
              }
  
              // if this is a product view page
              if (Mage::registry('product')) {
                  // get collection of categories this product is associated with
                  $categories = Mage::registry('product')-&gt;getCategoryCollection()
                      -&gt;setPage(1, 1)
                      -&gt;load();
                  // if the product is associated with any category
                  if ($categories-&gt;count()) {
                      // show products from this category
                      $this-&gt;setCategoryId(current($categories-&gt;getIterator()));
                  }
              }
  
              $origCategory = null;
              if ($this-&gt;getCategoryId()) {
                  $category = Mage::getModel('catalog/category')-&gt;load($this-&gt;getCategoryId());
                  if ($category-&gt;getId()) {
                      $origCategory = $layer-&gt;getCurrentCategory();
                      $layer-&gt;setCurrentCategory($category);
                      $this-&gt;addModelTags($category);
                  }
              }
  
              $this-&gt;_productCollection = $layer-&gt;getProductCollection();
  
              $this-&gt;prepareSortableFieldsByCategory($layer-&gt;getCurrentCategory());
  
              if ($origCategory) {
                  $layer-&gt;setCurrentCategory($origCategory);
              }
  
  
  
          }
  
  
          return $this-&gt;_productCollection;
      }
  </code></pre>
  
  <p>list.phtml </p>
  
  <pre><code>  &lt;?php
          $_productCollection=$this-&gt;getLoadedProductCollection();
          $_helper = $this-&gt;helper('catalog/output');
  
              &lt;?php // Grid Mode ?&gt;
  
              &lt;?php $_collectionSize = $_productCollection-&gt;count() ?&gt;
              &lt;?php $_columnCount = $this-&gt;getColumnCount(); ?&gt;
              &lt;div class="products-grid"&gt;
                  &lt;div class="row"&gt;
              &lt;?php $i=0; foreach ($_productCollection as $_product): 
                  $id_product = Mage::getModel('catalog/product')-&gt;load($_product-&gt;getId());
                          //$count_input_qty++;
                          $now = date("Y-m-d");
                          $newsFrom = substr($_product-&gt;getData('news_from_date'), 0, 10);
                          $newsTo = substr($_product-&gt;getData('news_to_date'), 0, 10);
  
                          $specialprice = Mage::getModel('catalog/product')-&gt;load($_product-&gt;getId())-&gt;getSpecialPrice();
                          //echo $specialprice . '-hau&lt;br/&gt;';
                          $price = Mage::getModel('catalog/product')-&gt;load($_product-&gt;getId())-&gt;getPrice();
                          if ($specialprice == '') {
                              $store_id = Mage::app()-&gt;getStore()-&gt;getStoreId();
                              $discounted_price = Mage::getResourceModel('catalogrule/rule')-&gt;getRulePrice(
                                  Mage::app()-&gt;getLocale()-&gt;storeTimeStamp($store_id),
                                  Mage::app()-&gt;getStore($store_id)-&gt;getWebsiteId(),
                                  Mage::getSingleton('customer/session')-&gt;getCustomerGroupId(),
                                  $_product-&gt;getId());
                              $specialprice = $discounted_price;
  
                          }
              ?&gt;
                  &lt;?php if ($i++%$_columnCount==0): ?&gt;
  
                  &lt;?php endif ?&gt;
  
                          &lt;div class="item col-lg-4 col-md-4 col-sm-6 col-xs-6 respl-item"&gt;
                          &lt;div class="item-inner"&gt;
                              &lt;div class="w-image-box"&gt;   
                                  &lt;div class="item-image"&gt;
                                      &lt;!--SHOW 2 IMAGE FOR PRODUCTS--&gt;
                                          &lt;?php $_media = Mage::getModel('catalog/product')-&gt;load($_product-&gt;getId())-&gt;getMediaGalleryImages() ?&gt;
  
                                          &lt;?php $count_item=0; $check_img=0;?&gt;
  
                                          &lt;?php $check_img = count($_media);?&gt;
  
                                      &lt;a class="&lt;?php if ($check_img &gt;= 2) echo $this-&gt;__('rspl-image');?&gt;" href="&lt;?php echo $_product-&gt;getProductUrl() ?&gt;" title="&lt;?php echo $this-&gt;stripTags($this-&gt;getImageLabel($_product, 'small_image'), null, true) ?&gt;"&gt;
                                          &lt;img class="first_image" src="&lt;?php echo $this-&gt;helper('catalog/image')-&gt;init($_product, 'small_image')-&gt;resize(270); ?&gt;" alt="&lt;?php echo $this-&gt;stripTags($this-&gt;getImageLabel($_product, 'small_image'), null, true) ?&gt;" /&gt; 
  
                                          &lt;?php if ($check_img &gt;= 2): ?&gt;
                                              &lt;?php 
                                              $flag=0;
                                              foreach($_media as $_img): ?&gt;
                                                      &lt;?php $count_item++;?&gt;
                                                      &lt;?php if ($_img-&gt;getFile() == $_product-&gt;getSmallImage()){
                                                          if($count_item==$check_img){
                                                              $flag = 0;
                                                          }else{
                                                              $flag = 1;
                                                          }
                                                          continue;
                                                      }  ?&gt;
                                                      &lt;?php if($flag==1) { ?&gt;
                                                      &lt;img class="last_image" src="&lt;?php echo $this-&gt;helper('catalog/image')-&gt;init($_product, 'image', $_img-&gt;getFile())-&gt;constrainOnly(true)-&gt;keepAspectRatio(true)-&gt;keepFrame(false)-&gt;resize(270,270); ?&gt;" alt="&lt;?php echo $this-&gt;stripTags($this-&gt;getImageLabel($_product, 'small_image'), null, true); ?&gt;" /&gt;
                                                      &lt;?php  break; }?&gt;
                                              &lt;?php endforeach; ?&gt;
                                              &lt;?php 
                                                  if($flag==0){
                                                      foreach($_media as $_img){ ?&gt;
                                                       &lt;img class="last_image" src="&lt;?php echo $this-&gt;helper('catalog/image')-&gt;init($_product, 'image', $_img-&gt;getFile())-&gt;constrainOnly(true)-&gt;keepAspectRatio(true)-&gt;keepFrame(false)-&gt;resize(270,270); ?&gt;" alt="&lt;?php echo $this-&gt;stripTags($this-&gt;getImageLabel($_product, 'small_image'), null, true); ?&gt;" /&gt;
                                                  &lt;?php break; }
                                                  }
                                              ?&gt;
                                          &lt;?php endif?&gt;
                                      &lt;!--END SHOW 2 IMAGE FOR PRODUCTS--&gt;   
                                      &lt;/a&gt;
  
  
  
                                  &lt;/div&gt;
                                  &lt;?php if ($newsFrom != "" &amp;&amp; $now &gt;= $newsFrom &amp;&amp; ($now &lt;= $newsTo || $newsTo == "")) { ?&gt;
                                      &lt;div class="new-product"&gt;
                                              &lt;?php echo $this-&gt;__('New'); ?&gt;
                                      &lt;/div&gt;
                                  &lt;?php }?&gt;
                                  &lt;?php if ($specialprice) { ?&gt;
                                      &lt;div class='sale-item'&gt;
                                          &lt;?php echo $this-&gt;__('Sale'); ?&gt;
                                      &lt;/div&gt;
                                  &lt;?php }?&gt;   
                              &lt;/div&gt;
                              &lt;div class="item-info"&gt;
                                  &lt;div class="item-title "&gt;
                                      &lt;a href="&lt;?php echo $_product-&gt;getProductUrl() ?&gt;" title="&lt;?php echo $this-&gt;stripTags($_product-&gt;getName(), null, true) ?&gt;"&gt;
                                      &lt;?php if( strlen($_helper-&gt;productAttribute($_product, $_product-&gt;getName(), 'name')) &gt; 100 ){
                                           echo substr($_helper-&gt;productAttribute($_product, $_product-&gt;getName(), 'name'), 0, 100);
                                      } else {
                                          echo $_helper-&gt;productAttribute($_product, $_product-&gt;getName(), 'name');
                                      }?&gt;
                                      &lt;/a&gt;
                                  &lt;/div&gt;
                                  &lt;div class="item-review"&gt;
                                      &lt;?php  echo $this-&gt;getReviewsSummaryHtml($_product, "short", true); ?&gt;
                                  &lt;/div&gt;
  
                                  &lt;div class="item-price"&gt;
                                      &lt;?php // echo $this-&gt;getPriceHtml($_product, true) ?&gt;
                                      &lt;?php echo $this-&gt;getPriceHtml($_product, true) ?&gt;
                                  &lt;/div&gt;
                                  &lt;!--
                                  &lt;div class="item-desc"&gt;
                                      &lt;?php 
                                          echo substr($_helper-&gt;productAttribute($_product, $_product-&gt;getShortDescription(), 'short_description'), 0, 70);
                                      ?&gt;
                                  &lt;/div&gt;
                                  --&gt;
                                  &lt;div class="item-addto-wrap"&gt;
                                      &lt;div class="button-action item-addcart"&gt;
                                          &lt;?php if($_product-&gt;isSaleable()): ?&gt;
                                          &lt;a class="button btn-cart" title="&lt;?php echo $this-&gt;__('Add to Cart') ?&gt;" href="javascript:void(0);" onclick="setLocation('&lt;?php echo $this-&gt;getAddToCartUrl($id_product) ?&gt;')"&gt;
                                              &lt;?php echo $this-&gt;__('Add to Cart') ?&gt;
                                          &lt;/a&gt;
                                          &lt;?php else: ?&gt;
                                          &lt;p class="availability out-of-stock"&gt;
                                              &lt;span&gt;&lt;?php echo $this-&gt;__('Out of stock') ?&gt; &lt;/span&gt;
                                          &lt;/p&gt;
                                          &lt;?php endif; ?&gt; 
  
                                          &lt;?php if( $_compareUrl=$this-&gt;getAddToCompareUrl($_product) ): ?&gt;
                                              &lt;a class="link-compare" href="&lt;?php echo $_compareUrl ?&gt;" title="&lt;?php echo $this-&gt;__('Add to Compare'); ?&gt;"&gt;
                                                  &lt;?php echo $this-&gt;__('Add to Compare') ?&gt;
                                              &lt;/a&gt;
                                          &lt;?php endif;?&gt;
  
                                          &lt;?php if ( $this-&gt;helper('wishlist')-&gt;isAllow() ) : ?&gt;
                                              &lt;a class="link-wishlist" href="&lt;?php echo $this-&gt;helper('wishlist')-&gt;getAddUrl($_product) ?&gt;" title="&lt;?php echo $this-&gt;__('Add to Wishlist') ?&gt;"&gt;
                                                  &lt;?php echo $this-&gt;__('Add to Wishlist') ?&gt;
                                              &lt;/a&gt;
                                          &lt;?php endif; ?&gt;
  
  
                                      &lt;/div&gt;
                                  &lt;/div&gt;              
                              &lt;/div&gt;
  
                          &lt;/div&gt;
  
                      &lt;/div&gt;
                  &lt;?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?&gt;
  
                  &lt;?php endif ?&gt;
                  &lt;?php endforeach ?&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
                  &lt;script type="text/javascript"&gt;decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])&lt;/script&gt;
              &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>suggest me , what can I do ?</p>