From 8727a4918cabfbcbf093af9fa3e05fb2cddb475b Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Thu, 30 Jun 2011 07:57:48 +0000 Subject: [PATCH] * when get stats, get all normal products. --- module/product/model.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/module/product/model.php b/module/product/model.php index 26805c23ed..9a5d81afd7 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -291,14 +291,19 @@ class productModel extends model $this->loadModel('report'); $this->loadModel('story'); - $products = $this->getList('normal', $counts); + $products = $this->getList('normal'); + $i = 1; foreach($products as $key => $product) { if($this->checkPriv($product)) { - $this->session->set('storyReport', "product = '{$product->id}' AND deleted = '0'"); - $dataXML = $this->report->createSingleXML($this->story->getDataOfStorysPerStatus($product->id), $this->lang->story->report->options->graph); - $charts[$product->id] = $this->report->createJSChart('pie2d', $dataXML, 'auto', 210); + if($i <= $counts) + { + $this->session->set('storyReport', "product = '{$product->id}' AND deleted = '0'"); + $dataXML = $this->report->createSingleXML($this->story->getDataOfStorysPerStatus($product->id), $this->lang->story->report->options->graph); + $charts[$product->id] = $this->report->createJSChart('pie2d', $dataXML, 'auto', 210); + $i ++; + } } else {