shop.lib.php확인 부탁드립니다.

shop.lib.php확인 부탁드립니다.

QA

shop.lib.php확인 부탁드립니다.

본문

// 상품이미지에 유형 아이콘 출력
function item_icon($it)
{   

 global $g5;

    $icon = '<span class="sit_icon">';
    // 품절
    if (is_soldout($it['it_id']))
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_soldout.gif" alt="품절"> ';

    if ($it['it_type1'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/eco01.gif" alt="히트상품"> ';

    if ($it['it_type2'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_rec.gif" alt="추천상품"> ';

    if ($it['it_type3'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_new.gif" alt="최신상품"> ';

    if ($it['it_type4'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_best.gif" alt="인기상품"> ';

    if ($it['it_type5'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/eco01.gif" alt="할인상품">';

    // 쿠폰상품
    $sql = " select count(*) as cnt
                from {$g5['g5_shop_coupon_table']}
                where cp_start <= '".G5_TIME_YMD."'
                  and cp_end >= '".G5_TIME_YMD."'
                  and (
                        ( cp_method = '0' and cp_target = '{$it['it_id']}' )
                        OR
                        ( cp_method = '1' and ( cp_target IN ( '{$it['ca_id']}', '{$it['ca_id2']}', '{$it['ca_id3']}' ) ) )
                      ) ";
    $row = sql_fetch($sql);
    if($row['cnt'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_cp.gif" alt="쿠폰상품">';

    $icon .= '</span>';

    return $icon;
}

// 상품이미지에 유형 아이콘2 출력
function item_icon2($it)
{
    global $g5;

    $icon = '<span class="sit_icon">';
    if ($it['it_type1'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/eco01.gif" alt="히트상품eco"> ';

    if ($it['it_type2'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_rec.gif" alt="추천상품"> ';

    if ($it['it_type3'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_new.gif" alt="최신상품"> ';

    if ($it['it_type4'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/eco01.gif" alt="인기상품"> ';

    if ($it['it_type5'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_discount.gif" alt="할인상품">';

}​

 

 

// 상품이미지에 유형 아이콘 출력
function item_icon($it)
{
    global $g5;
    $icon = '<span class="sit_icon">';
    // 품절
    if (is_soldout($it['it_id']))
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_soldout.gif" alt="품절"> ';
    if ($it['it_type1'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/eco01.gif" alt="히트상품"> ';
    if ($it['it_type2'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_rec.gif" alt="추천상품"> ';
    if ($it['it_type3'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_new.gif" alt="최신상품"> ';
    if ($it['it_type4'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_best.gif" alt="인기상품"> ';
    if ($it['it_type5'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/eco01.gif" alt="할인상품">';
    // 쿠폰상품
    $sql = " select count(*) as cnt
                from {$g5['g5_shop_coupon_table']}
                where cp_start <= '".G5_TIME_YMD."'
                  and cp_end >= '".G5_TIME_YMD."'
                  and (
                        ( cp_method = '0' and cp_target = '{$it['it_id']}' )
                        OR
                        ( cp_method = '1' and ( cp_target IN ( '{$it['ca_id']}', '{$it['ca_id2']}', '{$it['ca_id3']}' ) ) )
                      ) ";
    $row = sql_fetch($sql);
    if($row['cnt'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_cp.gif" alt="쿠폰상품">';
    $icon .= '</span>';
    return $icon;
}
// 상품이미지에 유형 아이콘2 출력
function item_icon2($it)
{
    global $g5;
    $icon = '<span class="sit_icon">';
    if ($it['it_type1'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/eco01.gif" alt="히트상품eco"> ';
    if ($it['it_type2'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_rec.gif" alt="추천상품"> ';
    if ($it['it_type3'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_new.gif" alt="최신상품"> ';
    if ($it['it_type4'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/eco01.gif" alt="인기상품"> ';
    if ($it['it_type5'])
        $icon .= '<img src="'.G5_SHOP_URL.'/img/icon_discount.gif" alt="할인상품">';
}​

붉은색을 추가 하였는데...

<?php echo item_icon2($it); ?>이렇게 해도 eco01.gif유형아이콘이노출이 안됩니다.

어떻게 해야하는지 지도 부탁드립니다.

 

 

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 123,620 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT