제품 노출할때
$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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 1634 | |
| 1632 | |
| 1631 | |
| 1630 | |
| 1629 | |
| 1625 | |
| 1608 | |
| 1595 | |
| 1578 | |
| 1571 | |
| 1567 | |
| 1561 | |
| 1560 | |
| 1558 | |
| 1555 | |
| 1554 | |
| 1553 | |
| 1552 | |
| 1551 | |
| 1547 | |
| 1538 | |
| 1531 | |
| 1527 | |
| 1523 | |
| 1522 | |
| 1512 | |
| 1511 | |
| 1506 | |
| 1503 | |
| 1489 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기