2026, 새로운 도약을 시작합니다.

sw_direct 영카트에서 회원별 적립포인트 에러좀 봐주시면 감사하겠습니다. 채택완료

lib/shop.lib

Copy


function level_point(){

   global $member;

   switch($member['mb_level']){

       case 2:

              $point_per=1;

              break;

       case 3:

              $point_per=2;

              break;

       case 4:

              $point_per=3;

              break;

       case 5:

              $point_per=4;

              break;

       case 6:

              $point_per=0;

              break;

       default:

              $point_per=1;

   }

   return $point_per;

}

레벨 6은 포인트 0퍼센트 적립

shop/orderform.sub.php

Copy


        // $s_cart_id 로 현재 장바구니 자료 쿼리

        $sql = " select a.ct_id,

                        a.it_id,

                        a.it_name,

                        a.ct_price,

                        a.ct_point,

                        a.ct_qty,

                        a.ct_status,

                        a.ct_send_cost,

                        a.it_sc_type,

                        b.ca_id,

                        b.ca_id2,

                        b.ca_id3,

                        b.it_notax

                   from {$g5['g5_shop_cart_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id )

                  where a.od_id = '$s_cart_id'

                    and a.ct_select = '1' ";

        $sql .= " group by a.it_id ";

        $sql .= " order by a.ct_id ";

        $result = sql_query($sql);

        $good_info = '';

        $it_send_cost = 0;

        $it_cp_count = 0;

        $comm_tax_mny = 0; // 과세금액

        $comm_vat_mny = 0; // 부가세

        $comm_free_mny = 0; // 면세금액

        $tot_tax_mny = 0;

        $point_per = level_point(); //  ---------------- 레벨별 포인트

위의 소스로 장바구니에 담아 주문을 하면 레벨별로 포인트 적립이 아주 잘 되고 있습니다.

헌데

shop/orderform.php?sw_direct=숫자

요렇게 바로구매가 붙은 상태에서는 레벨별 포인트적립이 제대로 안되고 있습니다.

혹시 어떤 파일을 건드려야 하는지 알 수 있을까요?

힌트만 얻어보고 모르겠으면 의뢰로 가겠습니다!

감사합니다!

답변 1개

채택된 답변
+20 포인트

$sw_direct값에 따른 분기 구문이 있을텐데 해당 부분을 살펴보세요

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고