Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 551 Bytes

常用自定义函数.md

File metadata and controls

20 lines (17 loc) · 551 Bytes

获取成为分销商商品信息

function get_goods(){
	global $_W;
			$data = m('common')->getPluginset('commission');
		$goods = false;

		if (!empty($data['become_goodsid'])) {
				foreach ($data['become_goodsid'] as $item_good_id){
				$gooditem = pdo_fetch('select id,title,thumb from ' . tablename('ewei_shop_goods') . ' where id=:id and uniacid=:uniacid limit 1 ', array(':id' => $item_good_id, ':uniacid' => $_W['uniacid']));
				if ($gooditem){
                    $goods[] = $gooditem;
				}
            }
		}
		
		return $goods;
}