magento - Product count for products with status enabled -
i trying product count products enabled , not pending. first line of code provides me ability see how many products available, span class "online" needs show how many have been enabled, not awaiting approval. here code 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 photo show mean , let me know if show provide more info/code. http://postimg.org/image/6t71j2e0n/
Comments
Post a Comment