Authored by 郝肖肖

Merge branch 'master' into featrue/payNotifyUrl

Showing 26 changed files with 282 additions and 105 deletions
... ... @@ -118,7 +118,9 @@ class SearchData
// return 'http://101.200.31.165/yohosearch/brand/list.json';
// return 'http://182.92.99.119:8080/yohosearch/brand/list.json';
}
return 'http://101.200.31.165/yohosearch/search.json';
return 'http://192.168.102.216:8087/yohosearch/search.json';
// return 'http://192.168.10.64:8080/yohosearch/search.json';
// return 'http://101.200.31.165/yohosearch/search.json';
//return 'http://101.200.31.165/yohosearch/search.json';
// return 'http://182.92.99.119:8080/yohosearch/search.json';
}
... ...
... ... @@ -72,4 +72,5 @@
{{/ girls}}
</div>
{{> index/home-analysis}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -86,4 +86,5 @@
{{/ boys}}
</div>
<script>__custom = {"yopid":"index"};</script>
{{> index/home-analysis}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -33,4 +33,5 @@
{{/ newArrivls}}
{{/ kids}}
</div>
{{> index/home-analysis}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -32,4 +32,5 @@
{{/ newArrivls}}
{{/ lifestyle}}
</div>
{{> index/home-analysis}}
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="pay-notice-page yoho-page">
{{# payNotice}}
<h1>
<i class="ok-icon"></i>
<span class="font-red">恭喜您,购买完成!</span>
您已成功支付
<span class="font-red">{{pay}}</span>
元!
</h1>
<h1>
<i class="ok-icon"></i>
<span class="font-red">恭喜您,购买完成!</span>
您已成功支付
<span class="font-red">{{pay}}</span>
元!
</h1>
<div class="order-info">
<ul class="order-table-header table-row">
<li class="order-num">订单号</li>
<li>实际支付金额</li>
<li>支付方式</li>
<li>获得YOHO币</li>
<li>获得VIP累计金额</li>
</ul>
<ul class="table-row">
<li class="order-num">
<a class="notice-link" href="{{checkOrderUrl}}">{{orderNum}}</a>
</li>
<li class="pay font-red">{{pay}}</li>
<li class="pay-mode">{{payMode}}</li>
<li class="yoho-coin">
<em class="font-red">{{currency}}</em>
<a class="notice-link" href="{{yohoCoinUrl}}">YOHO币能做什么</a>
</li>
<li class="vip">
<em class="font-red">{{vipSum}}</em>
<a class="notice-link" href="{{vipUrl}}">查看VIP特权</a>
</li>
</ul>
</div>
<div class="order-info">
<ul class="order-table-header table-row">
<li class="order-num">订单号</li>
<li>实际支付金额</li>
<li>支付方式</li>
<li>获得YOHO币</li>
<li>获得VIP累计金额</li>
</ul>
<ul class="table-row">
<li class="order-num">
<a class="notice-link" href="{{checkOrderUrl}}">{{orderNum}}</a>
</li>
<li class="pay font-red">{{pay}}</li>
<li class="pay-mode">{{payMode}}</li>
<li class="yoho-coin">
<em class="font-red">{{currency}}</em>
<a class="notice-link" href="{{yohoCoinUrl}}">YOHO币能做什么</a>
</li>
<li class="vip">
<em class="font-red">{{vipSum}}</em>
<a class="notice-link" href="{{vipUrl}}">查看VIP特权</a>
</li>
</ul>
</div>
<div class="notice-tip">
1.每天1500以前成功付款的订单将在当天发货,1500-0000成功付款的订单将在第二天发货。<br>
2.当订单发货后,您可以登录<a href="{{ordersUrl}}" class="notice-link" target="_blank">订单中心</a>查询快递发货详情。<br>
3.有货网支持"开箱验货""15天退换货保障"收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646,<a href="{{returnGoodsUrl}}" class="notice-link" target="_blank">退换货政策</a><br>
4.VIP金额的累计,将在您订单签收15天后积累到您的账户,请您知悉。<br>
5.购买商品及参与促销活动赠送的YOHO币,将在您订单签收7天后积累到您的账户,您可以在个人中心-我的YOHO币中查看。<br>
<b style="color:#c00;">6.尊敬的用户:近期为网络诈骗高发期,有货郑重声明,不会以任何形式索取客户的账户信息或引导转账,敬请提高警惕,谨防诈骗。</b>
</div>
<div class="notice-tip">
1.每天1500以前成功付款的订单将在当天发货,1500-0000成功付款的订单将在第二天发货。<br>
2.当订单发货后,您可以登录<a href="{{ordersUrl}}" class="notice-link" target="_blank">订单中心</a>查询快递发货详情。<br>
3.有货网支持"开箱验货""15天退换货保障"收货后请当面验货,如果发现商品有任何问题请致电客服电话400-889-9646,<a href="{{returnGoodsUrl}}" class="notice-link"
target="_blank">退换货政策</a><br>
4.VIP金额的累计,将在您订单签收15天后积累到您的账户,请您知悉。<br>
5.购买商品及参与促销活动赠送的YOHO币,将在您订单签收7天后积累到您的账户,您可以在个人中心-我的YOHO币中查看。<br>
<b style="color:#c00;">6.尊敬的用户:近期为网络诈骗高发期,有货郑重声明,不会以任何形式索取客户的账户信息或引导转账,敬请提高警惕,谨防诈骗。</b>
</div>
<p class="btns">
<a class="check-order" href="{{checkOrderUrl}}">查看订单</a>
<a class="return-home" href="{{returnHomeUrl}}">返回首页</a>
</p>
<p class="btns">
<a class="check-order" href="{{checkOrderUrl}}">查看订单</a>
<a class="return-home" href="{{returnHomeUrl}}">返回首页</a>
</p>
{{#if devEnv}}
<img class="notice-img" src="http://webstatic.dev.yohobuy.com/img/pay/notice.jpg">
{{^}}
<img class="notice-img" src="http://cdn.yoho.cn/yohobuy/assets/img/pay/notice.jpg">
{{/if}}
{{#if devEnv}}
<img class="notice-img" src="http://webstatic.dev.yohobuy.com/img/pay/notice.jpg">
{{^}}
<img class="notice-img" src="http://cdn.yoho.cn/yohobuy/assets/img/pay/notice.jpg">
{{/if}}
{{/ payNotice}}
</div>
{{> pay/pay-analysis}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -6,4 +6,5 @@
{{> product/latest-walk}}
{{/ search}}
</div>
{{> product/list-analysis}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -10,4 +10,5 @@
{{> product/latest-walk}}
{{/ search}}
</div>
{{> product/list-analysis}}
{{> layout/footer}}
... ...
... ... @@ -58,4 +58,11 @@
{{/ shoppingpay}}
</div>
{{!-- 品有统计代码 --}}
{{> shopping/pinyou-analysis}}
{{!-- criteo统计代码 --}}
{{> pay/pay-analysis}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -2,7 +2,6 @@
<div class="shopping-pay-page yoho-page clearfix">
{{# shoppingpay}}
<div class="pay-page">
<div class="pay-title">
<div class="step4"></div>
<ul>
... ... @@ -11,14 +10,12 @@
<li class="end"><span>付款,完成购买</span></li>
</ul>
</div>
<div class="cart-pay">
<h2>您的订单已成功,现在就去付款吧~</h2>
<h3>您的订单号:<strong class="order-num">{{orderNum}}</strong> 应付金额:<strong>{{count}}</strong>元 &nbsp; &nbsp;
支付方式:{{paymentType}} &nbsp; &nbsp; &nbsp; 送货时间:{{deliveryType}}</h3>
<h4>{{userName}},如果2小时内您无法完成付款,系统会将您的订单取消。</h4>
</div>
<div class="wrapper">
<div class="pay-way">
<span class="word">使用:</span>
... ... @@ -77,12 +74,11 @@
<a href="#" class="close">x</a>
</div>
</div>
{{/ shoppingpay}}
</div>
{{/ shoppingpay}}
</div>
{{# shoppingpay}}
{{# shoppingpay}}
<!-- Google Code for &#19979;&#21333;&#25104;&#21151; Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
... ... @@ -150,6 +146,9 @@
{{> shopping/box-analysis}}
{{> shopping/box-buy-analysis}}
{{/ shoppingpay}}
{{/ shoppingpay}}
{{!-- 品有统计代码 --}}
{{> shopping/pinyou-analysis}}
{{> layout/footer}}
{{> layout/footer}}
... ...
... ... @@ -25,4 +25,11 @@
__custom['sku_list'] = '{{skuList}}';
</script>
{{/shoppingpay}}
{{!-- 品有统计代码 --}}
{{> shopping/pinyou-analysis}}
{{!-- criteo统计代码 --}}
{{> pay/pay-analysis}}
{{> layout/footer}}
... ...
<script>
(function() {
var hm = document.createElement("script");
hm.src = "http://static.criteo.net/js/ld/ld.js";
hm.async = 1;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
var u = _ozuid || "";
u = (u == 0) ? "" : u;
window.criteo_q = window.criteo_q || [];
window.criteo_q.push({event: "setAccount", account: 16184 },{event: "setCustomerId", id: u},{event: "setSiteType", type: "d" },{event: "viewHome" });
})();
</script>
\ No newline at end of file
... ...
... ... @@ -39,17 +39,6 @@ var _gaq = _gaq || [];
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
(function() {
var hm = document.createElement("script");
hm.src = "http://static.criteo.net/js/ld/ld.js";
hm.async = 1;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
var u = _ozuid || "";
u = (u == 0) ? "" : u;
window.criteo_q = window.criteo_q || [];
window.criteo_q.push({event: "setAccount", account: 16184 },{event: "setCustomerId", id: u},{event: "setSiteType", type: "d" },{event: "viewHome" });
})();
}
if (window.addEventListener) {
window.addEventListener('load', async_load, false);
... ...
{{# criteo}}
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{ event: "setAccount", account: [16184] },
{ event: "setSiteType", type: "d" },
{ event: "trackTransaction" , id: "{{orderNum}}", item: [
{{#each items}}
{ id: "{{product_id}}", price: "{{goods_price}}", quantity: "{{buy_number}}"}
{{#unless @last}}
,
{{/unless}}
{{/each}}
]}
);
</script>
{{/ criteo}}
\ No newline at end of file
... ...
{{# criteo}}
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{ event: "setAccount", account: [16184] },
{ event: "setSiteType", type: "d" },
{ event: "viewList", item: [{{#each skn}}"{{.}}"{{#unless @last}},{{/unless}}{{/each}}]}
);
</script>
{{/ criteo}}
\ No newline at end of file
... ...
... ... @@ -55,4 +55,5 @@
</div>
{{/ list}}
</div>
{{> product/list-analysis}}
{{> layout/footer}}
... ...
... ... @@ -57,4 +57,5 @@
</div>
{{/ newSale}}
</div>
{{> product/list-analysis}}
{{> layout/footer}}
\ No newline at end of file
... ...
{{# pinyou}}
<script>
!function(w,d,e){
var _orderno='{{orderNum}}';
var _money='{{count}}';
var _productList='{{productList}}';
var b=location.href,c=d.referrer,f,s,g=d.cookie,h=g.match(/(^|;)\s*ipycookie=([^;]*)/),i=g.match(/(^|;)\s*ipysession=([^;]*)/);if (w.parent!=w){f=b;b=c;c=f;};u='//stats.ipinyou.com/cvt?a='+e('MC.2z.Rg-AQqSqQi2GykX12LUxI0')+'&c='+e(h?h[2]:'')+'&s='+e(i?i[2].match(/jump\%3D(\d+)/)[1]:'')+'&u='+e(b)+'&r='+e(c)+'&rd='+(new Date()).getTime()+'&OrderNo='+e(_orderno)+'&Money='+e(_money)+'&ProductList='+e(_productList)+'&e=';
function _(){if(!d.body){setTimeout(_(),100);}else{s= d.createElement('script');s.src = u;d.body.insertBefore(s,d.body.firstChild);}}_();
}(window,document,encodeURIComponent);
</script>
{{/ pinyou}}
\ No newline at end of file
... ...
... ... @@ -65,6 +65,32 @@ class PayModel
$result['orderNum'] = $orderCode;
$result['count'] = $order['payment_amount'];
$result['paymentType'] = ($order['payment_type'] == 1 ? '在线支付' : '货到付款');
// 订单商品(用于订单统计)
$result['orderGoods'] = $order['order_goods'];
//统计成交的skn
$sknList = array();
$skuList = array();
$goodsData = array();
$pinyouGoodsArr = array();
foreach ($order['order_goods'] as $val) {
$sknList[] = $val['product_skn'];
$skuList[] = $val['product_sku'];
$goodsData[] = array(
'goods_name' => $val['product_name'],
'product_sku' => $val['product_sku'],
'price' => $val['goods_price'],
'number' => $val['buy_number']
);
$pinyouGoodsArr[] = $val['product_id'] . ',' . $val['buy_number'];
}
$result['goodsData'] = $goodsData;
// skn列表
$result['sknList'] = implode(',', $sknList);
// sku列表
$result['skuList'] = implode(',', $skuList);
// 品友统计需要的商品数据
$result['pinyouGoods'] = implode(';', $pinyouGoodsArr);
// 货到付款的情况
if ($order['payment_type'] == 2) {
... ... @@ -87,26 +113,6 @@ class PayModel
}
$result['deliveryType'] =isset($order['delivery_time']) ? $order['delivery_time'] : '';
//统计成交的skn
$sknList = array();
$skuList = array();
$goodsData = array();
foreach ($order['order_goods'] as $val) {
$sknList[] = $val['product_skn'];
$skuList[] = $val['product_sku'];
$goodsData[] = array(
'goods_name' => $val['product_name'],
'product_sku' => $val['product_sku'],
'price' => $val['goods_price'],
'number' => $val['buy_number']
);
}
$result['goodsData'] = $goodsData;
// skn列表
$result['sknList'] = implode(',', $sknList);
// sku列表
$result['skuList'] = implode(',', $skuList);
// 用户ID
$result['uid'] = $uid;
... ... @@ -206,11 +212,8 @@ class PayModel
// 订单数(用于订单统计)
$result['orderCount'] = $orderCount;
$result['is_advance'] = $order['attribute'] == 5 ? 'Y' : 'N';
// 订单商品(用于订单统计)
$result['orderGoods'] = $order['order_goods'];
// 订单商品数(用于订单统计)
$result['ordersGoodsNums'] = count($order['order_goods']);
} while (false);
return $result;
... ... @@ -581,6 +584,7 @@ class PayModel
$result['data'] = array(
'pay' => $amount,
'orderNum' => $orderData['order_code'],
'items' => $orderData['order_goods'], // 订单商品
'checkOrderUrl' => Helpers::url('/home/orders/detail', array('orderCode' => $orderData['order_code'])),
'payMode' => ($orderData['payment_type'] == 1 ? '在线支付' : '货到付款'),
'currency' => $orderData['yoho_give_coin'],
... ...
... ... @@ -231,7 +231,7 @@ class IndexController extends WebAction
if (empty($orderEnsure)) {
$this->go(Helpers::url('/shopping/cart'));
}
$this->_view->display('order-ensure', array(
'orderEnsurePage' => true,
'orderEnsure' => $orderEnsure,
... ...
... ... @@ -385,7 +385,13 @@ class NoticeController extends WebAction
if ($code == 200) {
$view = 'index';
$data = array('payNotice' => $dealResult['data']);
$data = array(
'payNotice' => $dealResult['data'],
'criteo' => array(// 统计代码有关数据
'orderNum' => $dealResult['data']['orderNum'],
'items' => $dealResult['data']['items']
)
);
}
//头部导航
... ...
... ... @@ -58,12 +58,27 @@ class IndexController extends WebAction
$options['action'] = 'brand';//说明当前方法名
//调用模型获得品牌页数据
$data = BrandsModel::getBrandSearchData($condition, $options);
$data = BrandsModel::getBrandSearchData($condition, $options);
//统计前三个商品
$skn=array();
$arr=array();
if (isset($data['goods']) && !empty($data['goods'])) {
$arr = array_slice($data['goods'],0,3);
foreach ($arr as $key=>$value) {
$skn[] = $value['skn'];
}
$arr = array('skn'=>$skn);
}else{
$arr = array('skn'=>array());
}
$seo = $data['seo'];
$data = array(
//初始化js
'brandPage' => true,
'list' => $data
'list' => $data,
'criteo' => $arr
);
$this->setBrandSeo($seo);
$this->setWebNavHeader();
... ...
... ... @@ -23,15 +23,29 @@ class ListController extends WebAction
'action' => 'index',
'adsId' => '79',
));
// 设置SEO信息
$this->setListSeo($list['seo']);
/// 设置头部数据
$this->setWebNavHeader();
//统计前三个商品
$skn=array();
$arr=array();
if (isset($list['goods']) && !empty($list['goods'])) {
$arr = array_slice($list['goods'],0,3);
foreach ($arr as $key=>$value) {
$skn[] = $value['skn'];
}
$arr = array('skn'=>$skn);
}else{
$arr = array('skn'=>array());
}
// 渲染模板
$this->_view->display('list', array(
'productListPage' => true, // JS控制初始化
'list' => $list,
'criteo' => $arr
));
}
... ... @@ -50,9 +64,24 @@ class ListController extends WebAction
);
$newData = NewModel::getNewSearchData($condition, $options);
//统计前三个商品
$skn=array();
$arr=array();
if (isset($newData['goods']) && !empty($newData['goods'])) {
$arr = array_slice($newData['goods'],0,3);
foreach ($arr as $key=>$value) {
$skn[] = $value['skn'];
}
$arr = array('skn'=>$skn);
}else{
$arr = array('skn'=>array());
}
$data = array(
'productListPage' => true,
'newSale' => $newData
'newSale' => $newData,
'criteo' => $arr
);
// 设置SEO信息
$this->setNewSeo($newData['seo']);
... ... @@ -77,10 +106,25 @@ class ListController extends WebAction
$condition['p_d'] = '0.01,0.99';
}
$list = SearchModel::getListData($condition, $option);
//统计前三个商品
$skn=array();
$arr=array();
if (isset($list['goods']) && !empty($list['goods'])) {
$arr = array_slice($list['goods'],0,3);
foreach ($arr as $key=>$value) {
$skn[] = $value['skn'];
}
$arr = array('skn'=>$skn);
}else{
$arr = array('skn'=>array());
}
$data = array(
//初始化js
'brandPage' => true,
'list' => $list
'list' => $list,
'criteo' => $arr
);
// 设置SEO信息
$this->setSaleSeo($list['seo']);
... ...
... ... @@ -52,10 +52,25 @@ class SaleController extends WebAction
);
$saleData = SaleModel::getSaleSearchData($condition, $options, $specialInfo);
//统计前三个商品
$skn=array();
$arr=array();
if (isset($saleData['goods']) && !empty($saleData['goods'])) {
$arr = array_slice($saleData['goods'],0,3);
foreach ($arr as $key=>$value) {
$skn[] = $value['skn'];
}
$arr = array('skn'=>$skn);
}else{
$arr = array('skn'=>array());
}
$data = array(
//初始化js
'productListPage' => true,
'newSale' => $saleData
'newSale' => $saleData,
'criteo' => $arr
);
$this->setTitle('潮流商品搜索 | YOHO!有货');
$this->setKeywords('Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,casio,卡西欧手表,舒雅,jasonwood,odm,AAAA,香港购物,日本潮流');
... ...
... ... @@ -11,13 +11,29 @@ class SearchController extends WebAction
$this->setWebNavHeader();
$list = SearchModel::searchData(array(), array(
'controller' => 'Search',
'action' => 'index',
'reviewNum' => 7, //浏览记录数
));
//统计前三个商品
$skn=array();
$arr=array();
if (isset($list['goods']) && !empty($list['goods'])) {
$arr = array_slice($list['goods'],0,3);
foreach ($arr as $key=>$value) {
$skn[] = $value['skn'];
}
$arr = array('skn'=>$skn);
}else{
$arr = array('skn'=>array());
}
$data = array(
'productListPage' => true, //初始化js
'list' => SearchModel::searchData(array(), array(
'controller' => 'Search',
'action' => 'index',
'reviewNum' => 7, //浏览记录数
))
'list' => $list,
'criteo' => $arr
);
$data['list']['searchPage'] = true; //设置搜素页面标识,区分列表页-->特有的搜索页导航样式
if (isset($data['list']['goods']) && empty($data['list']['goods'])) {
... ... @@ -26,6 +42,7 @@ class SearchController extends WebAction
$searchData['search']['keyWord'] = isset($data['list']['keyWord']) ? $data['list']['keyWord'] : '';
$searchData['search']['searchActionUrl'] = isset($data['list']['searchActionUrl']) ? $data['list']['searchActionUrl'] : '';
$searchData['search']['latestWalk'] = 7;
$searchData['criteo'] = array('skn'=>array());
$this->_view->display('no-result', $searchData);
exit;
}
... ...
... ... @@ -68,6 +68,15 @@ class PayController extends WebAction
$this->setSimpleHeader();
$this->_view->display($view, array(
'shoppingpay' =>$data,
'pinyou' => array(
'orderNum' => $data['orderNum'],
'count' => $data['count'],
'productList' => $data['pinyouGoods']
),
'criteo' => array(// criteo统计代码有关数据
'orderNum' => $data['orderNum'],
'items' => $data['orderGoods']
),
'payPage' => true
));
}
... ...