<?php

$sku = nl2br($_product->getSku());
$_productCollection = Mage::getResourceModel('reports/product_collection')
->addOrderedQty()
->addAttributeToFilter('sku', $sku)
->setOrder('ordered_qty', 'desc')
->getFirstItem();
$product = $_productCollection;
echo '<span style="font-size:12px;color:#333;font-weight:100;">Orders('.(int)$product->ordered_qty .')</span>';

?>

posted on 2014-06-30 15:26  闪电王国  阅读(221)  评论(0编辑  收藏  举报