BoxNewGoods.php
872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
*
* @author liuziyang
* @version
*/
/**
* BoxGoods helper
*
* @uses viewHelper Zend_View_Helper
*/
class Web_View_Helper_BoxNewGoods extends Zend_View_Helper_Abstract {
/**
* @var Zend_View_Interface
*/
public $view;
/**
*
*/
public function boxNewGoods(array $product_ids, $query_str = '') {
if (empty($product_ids)) {
return $this->view->render('index/nome.phtml');
}
$product_data = QINProduct_Models_Product_Client::getByProductIds($product_ids);
$goods_data = QINProduct_Models_Goods_Client::getGoodsByProducts($product_ids);
$this->view->product_data = $product_data;
$this->view->goods_data = $goods_data;
return $this->view->render('box/newgoods.phtml');
}
/**
* Sets the view field
* @param $view Zend_View_Interface
*/
public function setView(Zend_View_Interface $view) {
$this->view = $view;
}
}