우선 순위 적용? 채택완료
블랑숑
5년 전
조회 1,893
</p>
<p>$sql = " select ct_status
from {$g5['g5_shop_cart_table']}
where od_id = '$od_id' ";
$result = sql_query($sql);</p>
<p> $value = '';
while ($row=sql_fetch_array($result)) {
$value .= (($value)? ',' : '').$row['ct_status'];
}</p>
<p> if (strlen($value)==strlen(str_replace(array('교환신청','교환중','교환완료','반품신청','반품중','반품완료','취소신청','취소완료'),'',$value))) {</p>
<p> $od_return_status = '';
$od_status = $ct_status;
$od_return_memo1 = '';
$od_return_memo2 = '';</p>
<p> $sql2 = " update {$g5['g5_shop_order_table']}
set od_return_memo1 = '$od_return_memo1',
od_return_memo2 = '$od_return_memo2',
od_return_status = '$od_return_status',
od_status = '$od_status'
where od_id = '$od_id' ";
sql_query($sql2);</p>
<p> }</p>
<p>
이런 소스를 만들었습니다.
$od_status = $ct_status;
이 부분에서 ct_status를 우선 순위 적용할 수 있을까요?
지금은 배열 중 가장 첫번째 것을 적용하는데
그걸 있는 ct_status 여러 개중에 완료 > 배송 > 준비 > 입금 순으로 적용이 되게요
만약
$ct_status가 준비,배송,입금 이렇게면 $od_status = 배송 이렇게요
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
5년 전
https://sir.kr/qa/381096">https://sir.kr/qa/381096 질문의 연장이신것 같은데요
아래의 코드를 참조해보세요
https://github.com/gnuboard/youngcart5/blob/e6fafee8e21efa5b5a0d73a1403afeba7a03d227/adm/shop_admin/orderformreceiptupdate.php#L53">https://github.com/gnuboard/youngcart5/blob/e6fafee8e21efa5b5a0d73a1403afeba7a03d227/adm/shop_admin/orderformreceiptupdate.php#L53
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
�
블랑숑
5년 전
감사합니다 정말
�
블랑숑
5년 전
감사합니다 정말
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인