BoxNewGoods.php 872 Bytes
<?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;
	}

}