OrdersGoodInfoBase.php 799 Bytes
<?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); 
      }
       
    }

   
}