채택완료

shop.js / cart.php 안에서 특정 카테고리를 인식하려면..ㅜ

2015-01-29 (목) 03:33:24 3,820

shop.js 내에서 특정 카테고리를 인식하여 처리하는 루틴을 만들고 있는데요,,

(마지막 줄)

if ($ca_id == 20) {

$("#sit_tot_price").empty(1).html("※ 총 금액 : <font color=#ff2233 style='font-size:1em;'>"+number_format(String(total))+"</font> 원"); }​

else {....

 

//////////////////////////////

 

cart.php 안에서는

 

<th scope="col">상품이미지</th>

            <th scope="col">상품명</th>

<? if ($ca_id == "10") ?>

           <th scope="col">할인가</th>

<? else ?>

           <th scope="col">판매가</th>

            <th scope="col">소계</th>

            <th scope="col">포인트</th>

            <th scope="col">배송비</th>

            <th scope="col">

                <label for="ct_a 

..........

 

이런 식으로는 안되는건가요..? ㅜㅜ 

if 문만 쓰면 에러가 나네요..;;;

|

답변 1개

채택된 답변
+20 포인트
2015-01-29 (목) 08:01:30
블럭열고 닫고 오타났는지 확인해보세요
If문 써도 잘되네요

답변을 작성하려면 로그인이 필요합니다.