테스트 사이트 - 개발 중인 베타 버전입니다

게시물에 결제하기버튼 넣기 채택완료

jjem 8년 전 조회 4,172

영카트를 사용중에 게시물에 글을 올리고 구매하기 버튼을 넣어야 하는데요.

 

영카트 orderform.php로 넘어가면 cart_id가 없어서 장바구니가 빈걸로 나오게 됩니다.

당연한 결과이긴합니다만...

게시물 wr_id를 cart_id로 변경해서 정보를 넘겨야할것 같은데.... 어떻게 하면 될까요???

어디서 어떻게 만져야할지...

혹은 다른방법이 있을까요?? ㅜㅜ

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

답변 1개

채택된 답변
+20 포인트

안녕하세요. 인아이디어입니다.

게시물 wr_id를 cart_id로 변경하시면 다른 게시판에서 넘어온 wr_id가 중복되는 현상이 발생 할 수 있습니다.(굉장히 큰 오류입니다.)

cart_id를 생성하는 방법은 get_uniqid() 이며, input type="hidden"에 임의로 넣어두시면 될것같습니다.

하단은 orderform.php 파일의 25번째 줄의 주문번호 생성 방법입니다.

</span></p><p style="margin-left: 40px;"><span style="font-size: 9pt;">// 새로운 주문번호 생성</span></p><p style="margin-left: 40px;"><span style="font-size: 9pt;">$od_id = get_uniqid();</span></p><p style="margin-left: 40px;"><span style="font-size: 9pt;">set_session('ss_order_id', $od_id);</span></p><p style="margin-left: 40px;"><span style="font-size: 9pt;">$s_cart_id = $tmp_cart_id;</span></p><p style="margin-left: 40px;"><span style="font-size: 9pt;">if($default['de_pg_service'] == 'inicis')</span></p><p style="margin-left: 40px;"><span style="font-size: 9pt;">    set_session('ss_order_inicis_id', $od_id);</span></p><p><span style="font-size: 9pt;">

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

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

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

로그인