@qq286531097
2018-08-23T05:54:49.000000Z
字数 889
阅读 282
TNF
kernel::single('b2c_goods_promotion')->getCartTradePromotion($data)
$data = array('576' => array('product_id' => '576', //货品ID'goods_id' => '104', //商品ID'style_color' => 'red', //颜色'price' => '1198', //销售价'cost' => '1188', //商促后价格'type_id' => '9', //类型ID'cat_id' => '50', //分类ID'quantity' => '1', //购买数量'brand_id' => '15' //品牌ID'total_price' => '1000' //商促后的总价),'533' => array('product_id' => '533','goods_id' => '81','style_color' => '','price' => '1000','cost' => '1000','type_id' => '3','cat_id' => '9','quantity' => '1','brand_id' => '15'),);
tip:1.购物车逻辑中,有对应的分类ID和类型ID,具体的品牌ID可能还需要修改下,相关的一些数据取值。
2.style_color也是需要修改相应的取值
二维数组结构Array([0] => Array([rule_id] => 1[name] => 满减--立减5元[promotion_type] => fullminus/fulldiscount/sendgift //(满减/满折/满赠)[items] => 576|1193|3,323|1192|2 //(货品ID|订促后价格|分摊的金额)[discount_amount] => 5 //(活动减去的金额))'total_price' => '2000' //(购物车总值)'cost_price' => '5' //(总共减去的订促金额)'subtotal_price' => '1995' //(订促后的价格))
