선택옵션 0원 으로 나오는거 금액이 없을때 안나오게 하기
선택옵션 0원 으로 나오는거 금액이 없을때 안나오게 하기
/js/shop.js 에 아래처럼 소스변경 add_sel_option() 함수내용 변경 - 360번째줄
[code]
opt += "<li class=\""+li_class+"\">";
opt += "<input type=\"hidden\" name=\"io_type["+item_code+"][]\" value=\""+type+"\">";
opt += "<input type=\"hidden\" name=\"io_id["+item_code+"][]\" value=\""+id+"\">";
opt += "<input type=\"hidden\" name=\"io_value["+item_code+"][]\" value=\""+option+"\">";
opt += "<input type=\"hidden\" class=\"io_price\" value=\""+price+"\">";
opt += "<input type=\"hidden\" class=\"io_stock\" value=\""+stock+"\">";
opt += "<span class=\"sit_opt_subj\">"+option+"</span>";
opt += "<span class=\"sit_opt_prc\">"+opt_prc+"</span>";
opt += "<div><input type=\"text\" name=\"ct_qty["+item_code+"][]\" value=\"1\" class=\"frm_input\" size=\"5\">";
opt += "<button type=\"button\" class=\"sit_qty_plus btn_frmline\">증가</button>";
opt += "<button type=\"button\" class=\"sit_qty_minus btn_frmline\">감소</button>";
opt += "<button type=\"button\" class=\"sit_opt_del btn_frmline\">삭제</button></div>";
opt += "</li>";
[/code]
아래같이 변경↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
[code]
opt += "<li class=\""+li_class+"\">";
opt += "<input type=\"hidden\" name=\"io_type["+item_code+"][]\" value=\""+type+"\">";
opt += "<input type=\"hidden\" name=\"io_id["+item_code+"][]\" value=\""+id+"\">";
opt += "<input type=\"hidden\" name=\"io_value["+item_code+"][]\" value=\""+option+"\">";
opt += "<input type=\"hidden\" class=\"io_price\" value=\""+price+"\">";
opt += "<input type=\"hidden\" class=\"io_stock\" value=\""+stock+"\">";
opt += "<span class=\"sit_opt_subj\">"+option+"</span>";
if(price > 0){
opt += "<span class=\"sit_opt_prc\">"+opt_prc+"</span>";
}else{
opt += "<span class=\"sit_opt_prc\" style='display:none;'>"+opt_prc+"</span>";
}
opt += "<div><input type=\"text\" name=\"ct_qty["+item_code+"][]\" value=\"1\" class=\"frm_input\" size=\"5\">";
opt += "<button type=\"button\" class=\"sit_qty_plus btn_frmline\">증가</button>";
opt += "<button type=\"button\" class=\"sit_qty_minus btn_frmline\">감소</button>";
opt += "<button type=\"button\" class=\"sit_opt_del btn_frmline\">삭제</button></div>";
opt += "</li>";
[/code]
/lib/shop.lib.php에 아래처럼 소스변경 get_item_options 함수내용 변경 - 996번째줄 변경
[code]
$select .= '<option value="'.$row['io_id'].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$row['io_id'].$price.$soldout.'</option>'.PHP_EOL;
[/code]
아래같이 변경↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
[code]
if($price > 0){
$select .= '<option value="'.$row['io_id'].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$row['io_id'].$price.$soldout.'</option>'.PHP_EOL;
}else{
$select .= '<option value="'.$row['io_id'].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$row['io_id'].$soldout.'</option>'.PHP_EOL;
}
[/code]
/lib/shop.lib.php에 아래처럼 소스변경 print_item_options 함수내용 변경 -대략 1093?1099?번째줄 변경
[code]
$str .= '<li>'.$row['ct_option'].' '.$row['ct_qty'].'개 ('.$price_plus.display_price($row['io_price']).')</li>'.PHP_EOL;
[/code]
아래같이 변경↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
[code]
if($row['io_price'] > 0){
$str .= '<li>'.$row['ct_option'].' '.$row['ct_qty'].'개 ('.$price_plus.display_price($row['io_price']).')</li>'.PHP_EOL;
}else{
$str .= '<li>'.$row['ct_option'].' '.$row['ct_qty'].'개 </li>'.PHP_EOL;
}
[/code]
/shop/itemoption.php에 아래처럼 소스변경 42번째줄 부터
[code]
if($row['io_price'] >= 0)
$price = ' + '.number_format($row['io_price']).'원';
else
$price = ' '.number_format($row['io_price']).'원';
[/code]
아래같이 변경↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
[code]
if($row['io_price'] >= 0){
if($row['io_price'] == 0){
$price = ' ';
}else{
$price = ' + '.number_format($row['io_price']).'원';
}
}else{
$price = ' '.number_format($row['io_price']).'원';
}
[/code]
/js/shop.js 에 아래처럼 소스변경 add_sel_option() 함수내용 변경 - 360번째줄
[code]
opt += "<li class=\""+li_class+"\">";
opt += "<input type=\"hidden\" name=\"io_type["+item_code+"][]\" value=\""+type+"\">";
opt += "<input type=\"hidden\" name=\"io_id["+item_code+"][]\" value=\""+id+"\">";
opt += "<input type=\"hidden\" name=\"io_value["+item_code+"][]\" value=\""+option+"\">";
opt += "<input type=\"hidden\" class=\"io_price\" value=\""+price+"\">";
opt += "<input type=\"hidden\" class=\"io_stock\" value=\""+stock+"\">";
opt += "<span class=\"sit_opt_subj\">"+option+"</span>";
opt += "<span class=\"sit_opt_prc\">"+opt_prc+"</span>";
opt += "<div><input type=\"text\" name=\"ct_qty["+item_code+"][]\" value=\"1\" class=\"frm_input\" size=\"5\">";
opt += "<button type=\"button\" class=\"sit_qty_plus btn_frmline\">증가</button>";
opt += "<button type=\"button\" class=\"sit_qty_minus btn_frmline\">감소</button>";
opt += "<button type=\"button\" class=\"sit_opt_del btn_frmline\">삭제</button></div>";
opt += "</li>";
[/code]
아래같이 변경↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
[code]
opt += "<li class=\""+li_class+"\">";
opt += "<input type=\"hidden\" name=\"io_type["+item_code+"][]\" value=\""+type+"\">";
opt += "<input type=\"hidden\" name=\"io_id["+item_code+"][]\" value=\""+id+"\">";
opt += "<input type=\"hidden\" name=\"io_value["+item_code+"][]\" value=\""+option+"\">";
opt += "<input type=\"hidden\" class=\"io_price\" value=\""+price+"\">";
opt += "<input type=\"hidden\" class=\"io_stock\" value=\""+stock+"\">";
opt += "<span class=\"sit_opt_subj\">"+option+"</span>";
if(price > 0){
opt += "<span class=\"sit_opt_prc\">"+opt_prc+"</span>";
}else{
opt += "<span class=\"sit_opt_prc\" style='display:none;'>"+opt_prc+"</span>";
}
opt += "<div><input type=\"text\" name=\"ct_qty["+item_code+"][]\" value=\"1\" class=\"frm_input\" size=\"5\">";
opt += "<button type=\"button\" class=\"sit_qty_plus btn_frmline\">증가</button>";
opt += "<button type=\"button\" class=\"sit_qty_minus btn_frmline\">감소</button>";
opt += "<button type=\"button\" class=\"sit_opt_del btn_frmline\">삭제</button></div>";
opt += "</li>";
[/code]
/lib/shop.lib.php에 아래처럼 소스변경 get_item_options 함수내용 변경 - 996번째줄 변경
[code]
$select .= '<option value="'.$row['io_id'].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$row['io_id'].$price.$soldout.'</option>'.PHP_EOL;
[/code]
아래같이 변경↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
[code]
if($price > 0){
$select .= '<option value="'.$row['io_id'].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$row['io_id'].$price.$soldout.'</option>'.PHP_EOL;
}else{
$select .= '<option value="'.$row['io_id'].','.$row['io_price'].','.$row['io_stock_qty'].'">'.$row['io_id'].$soldout.'</option>'.PHP_EOL;
}
[/code]
/lib/shop.lib.php에 아래처럼 소스변경 print_item_options 함수내용 변경 -대략 1093?1099?번째줄 변경
[code]
$str .= '<li>'.$row['ct_option'].' '.$row['ct_qty'].'개 ('.$price_plus.display_price($row['io_price']).')</li>'.PHP_EOL;
[/code]
아래같이 변경↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
[code]
if($row['io_price'] > 0){
$str .= '<li>'.$row['ct_option'].' '.$row['ct_qty'].'개 ('.$price_plus.display_price($row['io_price']).')</li>'.PHP_EOL;
}else{
$str .= '<li>'.$row['ct_option'].' '.$row['ct_qty'].'개 </li>'.PHP_EOL;
}
[/code]
/shop/itemoption.php에 아래처럼 소스변경 42번째줄 부터
[code]
if($row['io_price'] >= 0)
$price = ' + '.number_format($row['io_price']).'원';
else
$price = ' '.number_format($row['io_price']).'원';
[/code]
아래같이 변경↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
[code]
if($row['io_price'] >= 0){
if($row['io_price'] == 0){
$price = ' ';
}else{
$price = ' + '.number_format($row['io_price']).'원';
}
}else{
$price = ' '.number_format($row['io_price']).'원';
}
[/code]
댓글 10개
11년 전
좋은 팁 감사합니다.
적용 후 선택 옵션의 수량을 조정하면 '올바른 방법으로 이용해 주십시오. 경고창이 뜹니다.
저만 그런 것인지 모르겠습니다만, [증가][감소] 글자 대신 [+][-] 기호로 나타나면 오류가 발생하는 것 같습니다.
적용 후 선택 옵션의 수량을 조정하면 '올바른 방법으로 이용해 주십시오. 경고창이 뜹니다.
저만 그런 것인지 모르겠습니다만, [증가][감소] 글자 대신 [+][-] 기호로 나타나면 오류가 발생하는 것 같습니다.
11년 전
+ -바꾸는건 또 js파일에두 바꿔야 할게 있습니다
그것두 보구 팁자료실에 업데이트 할게요
그것두 보구 팁자료실에 업데이트 할게요
11년 전
좋은 팁입니다. 헌데 2개의 옵션이 있는 경우에는 적용이 되지 않는 것 같습니다.
의류의 경우 색상을 1차옵션, 2차에 사이즈를 넣는다고 치면 1차에서는 뜨지 않지만 2차옵션에서는 발생합니다.
의류의 경우 색상을 1차옵션, 2차에 사이즈를 넣는다고 치면 1차에서는 뜨지 않지만 2차옵션에서는 발생합니다.
10년 전
/shop/itemoption.php 44줄에
else if($row['io_price'] == 0)
$price = '';
삽입하세요.
else if($row['io_price'] == 0)
$price = '';
삽입하세요.
10년 전
오래된 문의였었는데 친절하신 답변 감사합니다!!
10년 전
감사합니다.
10년 전
좋은팁 정말 감사합니다^^
10년 전
좋은팁감사합니다^^
5년 전
좋은팁 감사합니다 덕분에 잘 써먹었어요! 추천하고싶은데 오래된 글이라 추천이 안되네요 ㅠㅠ
5년 전
영카트 옵션
게시판 목록
영카트5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 71 | 10년 전 | 7872 | ||
| 70 | 10년 전 | 5643 | ||
| 69 | 10년 전 | 5786 | ||
| 68 | 11년 전 | 11894 | ||
| 67 | 11년 전 | 8073 | ||
| 66 | 11년 전 | 6184 | ||
| 65 | 11년 전 | 6312 | ||
| 64 | 11년 전 | 6624 | ||
| 63 | 11년 전 | 7038 | ||
| 62 | 11년 전 | 10229 | ||
| 61 | 11년 전 | 23165 | ||
| 60 |
xepiesta
|
11년 전 | 4875 | |
| 59 | 11년 전 | 8271 | ||
| 58 | 11년 전 | 9005 | ||
| 57 | 11년 전 | 6684 | ||
| 56 |
|
11년 전 | 7169 | |
| 55 |
|
11년 전 | 6205 | |
| 54 | 11년 전 | 15791 | ||
| 53 |
kiplayer
|
11년 전 | 6656 | |
| 52 | 11년 전 | 7177 | ||
| 51 | 11년 전 | 10054 | ||
| 50 |
|
11년 전 | 5160 | |
| 49 | 11년 전 | 8439 | ||
| 48 | 11년 전 | 6143 | ||
| 47 | 11년 전 | 7210 | ||
| 46 | 11년 전 | 4209 | ||
| 45 | 11년 전 | 8044 | ||
| 44 | 11년 전 | 3926 | ||
| 43 | 11년 전 | 5438 | ||
| 42 | 11년 전 | 8194 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기