여러가지 분류의 제품 동시에 노출
제품 노출할때
$list->set_category('01,02', 1);
이런식으로 콤마(,)를 기준으로 노출시키고 싶은 분류를 적어주세요.
echo $list->run();
대신에
echo $list->run2();
로 다중 분류용 함수(run2)를 이용해주세요.
run2함수를 지정하러
/lib/shop.lib.php로 갑니다.
function run() 영역을 그대로 복사해서
run2()로 변경하고
if ($this->ca_id || $this->ca_id2 || $this->ca_id3) {
$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}%' ";
}
$where[] = " ( " . implode(" or ", $where_ca_id) . " ) ";
}
이 부분을
if ($this->ca_id) {
$where_ca_id = array();
if ($this->ca_id) {
$cate_Arr = explode("," , $this->ca_id );
for($i=0; $i<count($cate_Arr); $i++){
$where_ca_id[] = " ca_id like '$cate_Arr[$i]%' ";
}
}
$where[] = " ( " . implode(" or ", $where_ca_id) . " ) ";
}
이렇게 바꿔주세요.
$list->set_category('01,02', 1);
이런식으로 콤마(,)를 기준으로 노출시키고 싶은 분류를 적어주세요.
echo $list->run();
대신에
echo $list->run2();
로 다중 분류용 함수(run2)를 이용해주세요.
run2함수를 지정하러
/lib/shop.lib.php로 갑니다.
function run() 영역을 그대로 복사해서
run2()로 변경하고
if ($this->ca_id || $this->ca_id2 || $this->ca_id3) {
$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}%' ";
}
$where[] = " ( " . implode(" or ", $where_ca_id) . " ) ";
}
이 부분을
if ($this->ca_id) {
$where_ca_id = array();
if ($this->ca_id) {
$cate_Arr = explode("," , $this->ca_id );
for($i=0; $i<count($cate_Arr); $i++){
$where_ca_id[] = " ca_id like '$cate_Arr[$i]%' ";
}
}
$where[] = " ( " . implode(" or ", $where_ca_id) . " ) ";
}
이렇게 바꿔주세요.
댓글 6개
coDribble
5년 전
오..?? 좋은 기능이네요! 공유감사합니다
5년 전
오 좋네요
5년 전
감사합니다
qwaszx
4년 전
감사합니다!
4년 전
감사합니다.~
오늘도행운의날
2년 전
감사합니다
게시판 목록
영카트5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 41 | 11년 전 | 9168 | ||
| 40 | 11년 전 | 3399 | ||
| 39 | 11년 전 | 8904 | ||
| 38 | 11년 전 | 13309 | ||
| 37 | 11년 전 | 4756 | ||
| 36 | 11년 전 | 6875 | ||
| 35 | 11년 전 | 7035 | ||
| 34 | 11년 전 | 9892 | ||
| 33 |
restime
|
11년 전 | 8249 | |
| 32 | 11년 전 | 10300 | ||
| 31 | 11년 전 | 8948 | ||
| 30 |
사악한천사☆
|
11년 전 | 5905 | |
| 29 |
|
11년 전 | 7678 | |
| 28 | 11년 전 | 6986 | ||
| 27 | 11년 전 | 6056 | ||
| 26 | 11년 전 | 13596 | ||
| 25 | 11년 전 | 4859 | ||
| 24 |
sahara
|
11년 전 | 7285 | |
| 23 | 11년 전 | 22873 | ||
| 22 | 11년 전 | 6214 | ||
| 21 | 11년 전 | 8751 | ||
| 20 |
|
11년 전 | 11288 | |
| 19 | 11년 전 | 8882 | ||
| 18 | 11년 전 | 9502 | ||
| 17 | 11년 전 | 8224 | ||
| 16 |
Lemios
|
11년 전 | 7926 | |
| 15 | 11년 전 | 10656 | ||
| 14 | 11년 전 | 7528 | ||
| 13 | 11년 전 | 6132 | ||
| 12 | 11년 전 | 7426 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기