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

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

QA

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

답변 1

본문

// 상품이미지에 유형 아이콘 출력
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

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 27
© SIRSOFT
현재 페이지 제일 처음으로