public static function getSkuItem($item, $select = '*') { if (!$item) { return array(); } return ProductsItem::getOne(array('item' => $item, 'status' => 1), $select); }
} header("Location: /product/?id={$skuid}"); exit; } else { $id = isset($_GET['id']) ? (int) $_GET['id'] : 0; if (!$id) { header("Location: /html/404.html?003"); exit; } $sku = ProductsSku::getData($id); if (!$sku) { header("Location: /html/404.html?004"); exit; } $item_code = $sku['item']; $item = ProductsItem::getOne(array('item' => $item_code, 'status' => 1)); if (!$item) { header("Location: /html/404.html?005"); exit; } $sku['iteminfo'] = $item; $sku_code = $sku['sku']; $pics = ProductsPic::getSkuPics($sku_code, 'path', 'sort DESC LIMIT 0,3'); $sku['pics'] = $pics; $sku['order_num'] = OrdersProducts::getSkuAllNum($sku_code); $sku['stock'] = ProductsStock::getSkuStock($sku_code); $skus = ProductsSku::getItemSkus($item_code, "id,sku,sku_name"); $skus = ProductsSku::getProductsPic($skus); $sku['skus'] = $skus; $userid = isset($_SESSION['userid']) ? (int) $_SESSION['userid'] : 0; $history = array();