Authored by Rock Zhang

修复模板加价购和赠品模板请求接口返回的bug,需要返回模板的html代码,不能渲染

Code Review By Rock Zhang
... ... @@ -193,11 +193,12 @@ class IndexController extends AbstractAction
/*
* 获取购物车加价购商品数据模板
* 需要返回模板的html代码,不能渲染
*/
public function giftinfoTplAction()
{
if ($this->isAjax()) {
$this->_view->display('gift-tpl');
echo file_get_contents($this->_view->getScriptPath() . '/../partials/cart/chose-panel.phtml');
}
}
... ... @@ -208,11 +209,11 @@ class IndexController extends AbstractAction
{
$result = array();
// if ($this->isAjax()) {
if ($this->isAjax()) {
$skn = $this->get('skn', null);
$promotionId = $this->get('promotionId', null);
$result = CartModel::giftProductData($skn, $promotionId);
// }
}
if (empty($result)) {
echo ' ';
... ...