구글 판매자센터 피드
- 상품 재고에 따른 out_of_stock 변경
This commit is contained in:
@ -19,7 +19,7 @@ for ($i = 0; $row = sql_fetch_array($result); $i++ ) {
|
||||
$row['ca_adult_parent4']); // 4depth 성인인증
|
||||
}
|
||||
|
||||
$sql =" SELECT a.*, (SELECT MIN(`io_stock_qty`) FROM `{$g5['g5_shop_item_option_table']}` WHERE `it_id` = a.`it_id` GROUP BY `it_id`) AS in_stock
|
||||
$sql =" SELECT a.*, IFNULL((SELECT MIN(`io_stock_qty`) FROM `{$g5['g5_shop_item_option_table']}` WHERE `it_id` = a.`it_id` GROUP BY `it_id`), a.`it_stock_qty`) AS in_stock
|
||||
FROM `{$g5['g5_shop_item_table']}` as a
|
||||
where a.`it_use` = '1' and a.`it_soldout` = '0' and a.`it_tel_inq` = '0' and a.`it_price` > '0' order by a.`ca_id`";
|
||||
$result = sql_query($sql);
|
||||
@ -49,7 +49,9 @@ for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
}
|
||||
|
||||
$stock = "in_stock";
|
||||
if($row['in_stock'] != null) {
|
||||
if($row['it_stock_qty'] <= 0) {
|
||||
$stock = "out_of_stock";
|
||||
} else {
|
||||
if($row['in_stock'] <= 0) $stock = "out_of_stock";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user