I am trying to get the product count for only products that are enabled and not pending. My first line of code provides me with the ability to see how many products are available, but the span class "online" needs to show how many have been enabled, so are not awaiting approval. Here is my code so far.
//my php
$coreHelper = Mage::helper('core');
$dataHelper = Mage::helper('udprod');
$currencyHelper = Mage::helper('itemique_dropship/currency');
$formHelper = Mage::helper('itemique_dropship/form');
$productFormHelper = Mage::helper('itemique_dropshipVendorProduct/form');
$udprodSourceModel = Mage::getSingleton('udprod/source');
$productCollection = $this->getProductCollection();
$vendor = $this->getVendor();
$sortCol = $this->getSortCol();
$sortDir = $this->getSortDir();
//my phtml
<div class="product-count">
<span class=“products"><?php echo $productCollection->getSize(), $dataHelper->__(' products.') ?></span>
<span class=“online"><?php echo (int) $productCollection->addAttributeToFilter('Status', array('eq' => 1)), $dataHelper->__(' online.'); ?></span>
</div>
Also here is a photo to show you what I mean and let me know if I show provide more info/code. Thanks http://postimg.org/image/6t71j2e0n/