OrdersGoodInfoBase.php
799 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
<?php
/**
*
* User: ziy
* Date: 14-8-4
* Time: 上午5:18
*/
class YHMCart_Hook_Orders_OrdersGoodInfoBase extends YHMCart_Hook_Abstract
{
static function run(YHMCart_Hook_Orders $package)
{
$package = $package->getOrder();
self::setGoodsInfo($package);
}
/**
* 订单镜像
* @param array $package
*/
static function setGoodsInfo(array $orderData)
{
foreach ($orderData['goods_list'] as $k=>$v){
$goods_info=YHMCart_Hook_Orders::getOrderProduct($v['product_sku'],$v['product_skc']);
$v['order_code']=$orderData['order_code'];
$goodsList= array_merge( $goods_info,$v);
YHMOrders_Models_Shopping_Client::setBuyGoodsInfo($goodsList);
}
}
}