영카트 상품등록 중에 상품분류 추가요~

영카트 상품등록 중에 상품분류 추가요~

QA

영카트 상품등록 중에 상품분류 추가요~

답변 2

본문

영카트 상품등록할때요.. 상품분류가3개까지 할수 있게 세팅되어있는데요..이거 늘릴수 있나요?

1a5e48e2de8188caa7d848726f05190b_1445244262_8051.jpg 

이 질문에 댓글 쓰기 :

답변 2

DB필드에 ca_id4 ... ca_id5

 

이런식으로 추가하시고 db에 입력하신 후 

 

shop.lib.php

아래와 같이 하신 후에

    function set_category($ca_id, $level=1) {

        if ($level == 2) {

            $this->ca_id2 = $ca_id;

        } else if ($level == 3) {

            $this->ca_id3 = $ca_id;

        } else if ($level == 4) {

            $this->ca_id4 = $ca_id;

        } else if ($level == 5) {

            $this->ca_id5 = $ca_id;

        } else if ($level == 6) {

            $this->ca_id6 = $ca_id;

} else {

            $this->ca_id = $ca_id;

        }

    }

 

 

run()함수에서

 

// add ca_id4,5,6

            if ($this->ca_id || $this->ca_id2 || $this->ca_id3 || $this->ca_id4 || $this->ca_id5 || $this->ca_id6) {

                $where_ca_id = array();

                if ($this->ca_id) {

                    $where_ca_id[] = " ca_id like '{$this->ca_id}%' ";

                }

                if ($this->ca_id2) {

                    $where_ca_id[] = " ca_id2 like '{$this->ca_id2}%' ";

                }

                if ($this->ca_id3) {

                    $where_ca_id[] = " ca_id3 like '{$this->ca_id3}%' ";

                }

                if ($this->ca_id4) {

                    $where_ca_id[] = " ca_id4 like '{$this->ca_id4}%' ";

                }

                if ($this->ca_id5) {

                    $where_ca_id[] = " ca_id5 like '{$this->ca_id5}%' ";

                }

                if ($this->ca_id6) {

                    $where_ca_id[] = " ca_id6 like '{$this->ca_id6}%' ";

                }

$where[] = " ( " . implode(" or ", $where_ca_id) . " ) ";

            }

 

 

 

카테고리 출력하는 부분에는 아래와 같이 추가하시면 작동합니다.

$list->set_category('50', 1);

$list->set_category('50', 2);

$list->set_category('50', 3);

$list->set_category('50', 4);

$list->set_category('50', 5);

$list->set_category('50', 6);

 

 

구현해 놓은게 있는데 설명하려니 좀 복잡하네요 ㅠㅠ


제가 디자이너인데 프로그램을 몰라서요...ㅜㅜ

DB필드가 뭔지요? 어디있나요? 그리고 db에 입력하라고 하시는건 어디에 하라는건지..ㅜㅜ

shop.lib.php 이파일은 뭔지..

좀더 자세히 설명해주실수 있을까요? 부탁드려요

답변을 작성하시기 전에 로그인 해주세요.
전체 1
© SIRSOFT
현재 페이지 제일 처음으로