영카트 [YC5] 회원가격(Lv.2) / 특별가격(Lv.3) / VIP가격(Lv.4 이상)
페이지 정보
본문
영카트4 에서 회원가격(레벨 2) / 특별회원(레벨 3) / VIP회원(레벨4 이상) 일때 다른 금액으로 보이는 기능을 영카트5에 추가합니다.
판매가격 > 비회원가격
(추가) > 회원가격
(추가) > 특별가격
(추가) > VIP가격
디비의 g5_shop_item 에 it_price2 , it_price3 , it_price4 필드를 추가
adm / shop_admin
├ itemform.php
├ itemformupdate.php
└ itemlist.php
lib
└ shop.lib.php
shop
└ cartupdate.php
1-1. 영카트5 / adm / shop_admin / itemlist.php
상단 include_once('./_common.php'); 아래에 내용 추가
// 회원레벨 2 - 상품가격(회원가격) 필드 추가
if(!sql_query(" select it_price2 from {$g5['g5_shop_item_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_price2` int(11) NOT NULL DEFAULT '0' AFTER `it_price` ", true);
}
// 회원레벨 3 - 상품가격(특별가격) 필드 추가
if(!sql_query(" select it_price3 from {$g5['g5_shop_item_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_price3` int(11) NOT NULL DEFAULT '0' AFTER `it_price2` ", true);
}
// 회원레벨 4 - 상품가격(VIP가격) 필드 추가
if(!sql_query(" select it_price4 from {$g5['g5_shop_item_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_price4` int(11) NOT NULL DEFAULT '0' AFTER `it_price3` ", true);
}
위 내용 저장후 > 관리자 > 쇼핑몰관리 > 상품관리 클릭하면 디비에 필드가 추가됩니다
1-2. 영카트5 / adm / shop_admin / itemlist.php
colspan="5" 를 colspan="6" 로 변경 합니다. ( 2개가 있습니다 )
1-3. 영카트5 / adm / shop_admin / itemlist.php
<tr>
<th scope="col" rowspan="2" id="th_img">이미지</th>
<th scope="col" rowspan="2" id="th_pc_title"><?php echo subject_sort_link('it_name', 'sca='.$sca); ?>상품명</a></th>
<th scope="col" id="th_amt"><?php echo subject_sort_link('it_price', 'sca='.$sca); ?>판매가격</a></th>
<th scope="col" id="th_camt"><?php echo subject_sort_link('it_cust_price', 'sca='.$sca); ?>시중가격</a></th>
<th scope="col" id="th_skin">PC스킨</th>
</tr>
<tr>
<th scope="col" id="th_pt"><?php echo subject_sort_link('it_point', 'sca='.$sca); ?>포인트</a></th>
<th scope="col" id="th_qty"><?php echo subject_sort_link('it_stock_qty', 'sca='.$sca); ?>재고</a></th>
<th scope="col" id="th_mskin">모바일스킨</th>
</tr>
를 다음과 같이 변경
<tr>
<th scope="col" rowspan="2" id="th_img">이미지</th>
<th scope="col" rowspan="2" id="th_pc_title"><?php echo subject_sort_link('it_name', 'sca='.$sca); ?>상품명</a></th>
<th scope="col" id="th_amt"><?php echo subject_sort_link('it_price', 'sca='.$sca); ?>비회원가격</a></th>
<th scope="col" id="th_amt"><?php echo subject_sort_link('it_price2', 'sca='.$sca); ?>회원가격</a></th>
<th scope="col" id="th_amt"><?php echo subject_sort_link('it_price3', 'sca='.$sca); ?>특별가격</a></th>
<th scope="col" id="th_skin">PC스킨</th>
</tr>
<tr>
<th scope="col" id="th_camt"><?php echo subject_sort_link('it_cust_price', 'sca='.$sca); ?>시중가격</a></th>
<th scope="col" id="th_pt"><?php echo subject_sort_link('it_point', 'sca='.$sca); ?>포인트</a></th>
<th scope="col" id="th_qty"><?php echo subject_sort_link('it_stock_qty', 'sca='.$sca); ?>재고</a></th>
<th scope="col" id="th_mskin">모바일스킨</th>
</tr>
1-4. 영카트5 / adm / shop_admin / itemlist.php
<tr class="<?php echo $bg; ?>">
<td rowspan="2" class="td_img"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?></a></td>
<td headers="th_pc_title" rowspan="2" class="td_input">
<label for="name_<?php echo $i; ?>" class="sound_only">상품명</label>
<input type="text" name="it_name[<?php echo $i; ?>]" value="<?php echo htmlspecialchars2(cut_str($row['it_name'],250, "")); ?>" id="name_<?php echo $i; ?>" required class="frm_input required" size="30">
</td>
<td headers="th_amt" class="td_numbig td_input">
<label for="price_<?php echo $i; ?>" class="sound_only">판매가격</label>
<input type="text" name="it_price[<?php echo $i; ?>]" value="<?php echo $row['it_price']; ?>" id="price_<?php echo $i; ?>" class="frm_input sit_amt" size="7">
</td>
<td headers="th_camt" class="td_numbig td_input">
<label for="cust_price_<?php echo $i; ?>" class="sound_only">시중가격</label>
<input type="text" name="it_cust_price[<?php echo $i; ?>]" value="<?php echo $row['it_cust_price']; ?>" id="cust_price_<?php echo $i; ?>" class="frm_input sit_camt" size="7">
</td>
<td headers="th_skin" class="td_numbig td_input">
<label for="it_skin_<?php echo $i; ?>" class="sound_only">PC 스킨</label>
<?php echo get_skin_select('shop', 'it_skin_'.$i, 'it_skin['.$i.']', $row['it_skin']); ?>
</td>
</tr>
<tr class="<?php echo $bg; ?>">
<td headers="th_pt" class="td_numbig td_input"><?php echo $it_point; ?></td>
<td headers="th_qty" class="td_numbig td_input">
<label for="stock_qty_<?php echo $i; ?>" class="sound_only">재고</label>
<input type="text" name="it_stock_qty[<?php echo $i; ?>]" value="<?php echo $row['it_stock_qty']; ?>" id="stock_qty_<?php echo $i; ?>" class="frm_input sit_qty" size="7">
</td>
<td headers="th_mskin" class="td_numbig td_input">
<label for="it_mobile_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
<?php echo get_mobile_skin_select('shop', 'it_mobile_skin_'.$i, 'it_mobile_skin['.$i.']', $row['it_mobile_skin']); ?>
</td>
</tr>
를 다음과 같이 변경
<tr class="<?php echo $bg; ?>">
<td rowspan="2" class="td_img"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?></a></td>
<td headers="th_pc_title" rowspan="2" class="td_input">
<label for="name_<?php echo $i; ?>" class="sound_only">상품명</label>
<input type="text" name="it_name[<?php echo $i; ?>]" value="<?php echo htmlspecialchars2(cut_str($row['it_name'],250, "")); ?>" id="name_<?php echo $i; ?>" required class="frm_input required" size="30">
</td>
<td headers="th_amt" class="td_numbig td_input">
<label for="price_<?php echo $i; ?>" class="sound_only">비회원가격</label>
<input type="text" name="it_price[<?php echo $i; ?>]" value="<?php echo $row['it_price']; ?>" id="price_<?php echo $i; ?>" class="frm_input sit_amt" size="7">
</td>
<td headers="th_amt" class="td_numbig td_input">
<label for="price2_<?php echo $i; ?>" class="sound_only">회원가격</label>
<input type="text" name="it_price2[<?php echo $i; ?>]" value="<?php echo $row['it_price2']; ?>" id="price2_<?php echo $i; ?>" class="frm_input sit_amt" size="7">
</td>
<td headers="th_amt" class="td_numbig td_input">
<label for="price3_<?php echo $i; ?>" class="sound_only">특별가격</label>
<input type="text" name="it_price3[<?php echo $i; ?>]" value="<?php echo $row['it_price3']; ?>" id="price3_<?php echo $i; ?>" class="frm_input sit_amt" size="7">
</td>
<td headers="th_skin" class="td_numbig td_input">
<label for="it_skin_<?php echo $i; ?>" class="sound_only">PC 스킨</label>
<?php echo get_skin_select('shop', 'it_skin_'.$i, 'it_skin['.$i.']', $row['it_skin']); ?>
</td>
</tr>
<tr class="<?php echo $bg; ?>">
<td headers="th_camt" class="td_numbig td_input">
<label for="cust_price_<?php echo $i; ?>" class="sound_only">시중가격</label>
<input type="text" name="it_cust_price[<?php echo $i; ?>]" value="<?php echo $row['it_cust_price']; ?>" id="cust_price_<?php echo $i; ?>" class="frm_input sit_camt" size="7">
</td>
<td headers="th_pt" class="td_numbig td_input"><?php echo $it_point; ?></td>
<td headers="th_qty" class="td_numbig td_input">
<label for="stock_qty_<?php echo $i; ?>" class="sound_only">재고</label>
<input type="text" name="it_stock_qty[<?php echo $i; ?>]" value="<?php echo $row['it_stock_qty']; ?>" id="stock_qty_<?php echo $i; ?>" class="frm_input sit_qty" size="7">
</td>
<td headers="th_mskin" class="td_numbig td_input">
<label for="it_mobile_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
<?php echo get_mobile_skin_select('shop', 'it_mobile_skin_'.$i, 'it_mobile_skin['.$i.']', $row['it_mobile_skin']); ?>
</td>
</tr>
2. 영카트5 / adm / shop_admin / itemform.php
<tr>
<th scope="row"><label for="it_price">판매가격</label></th>
<td>
<input type="text" name="it_price" value="<?php echo $it['it_price']; ?>" id="it_price" class="frm_input" size="8"> 원
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_ca_it_price" value="1" id="chk_ca_it_price">
<label for="chk_ca_it_price">분류적용</label>
<input type="checkbox" name="chk_all_it_price" value="1" id="chk_all_it_price">
<label for="chk_all_it_price">전체적용</label>
</td>
</tr>
를 다음과 같이 변경
<tr>
<th scope="row"><label for="it_price">비회원가격</label></th>
<td>
<input type="text" name="it_price" value="<?php echo $it['it_price']; ?>" id="it_price" class="frm_input" size="8"> 원
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_ca_it_price" value="1" id="chk_ca_it_price">
<label for="chk_ca_it_price">분류적용</label>
<input type="checkbox" name="chk_all_it_price" value="1" id="chk_all_it_price">
<label for="chk_all_it_price">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="it_price2">회원가격(Lv.2)</label></th>
<td>
<input type="text" name="it_price2" value="<?php echo $it['it_price2']; ?>" id="it_price2" class="frm_input" size="8"> 원
</td>
<td class="td_grpset">
</td>
</tr>
<tr>
<th scope="row"><label for="it_price3">특별가격(Lv.3)</label></th>
<td>
<input type="text" name="it_price3" value="<?php echo $it['it_price3']; ?>" id="it_price3" class="frm_input" size="8"> 원
</td>
<td class="td_grpset">
</td>
</tr>
<tr>
<th scope="row"><label for="it_price4">VIP가격(Lv.4 이상)</label></th>
<td>
<input type="text" name="it_price4" value="<?php echo $it['it_price4']; ?>" id="it_price4" class="frm_input" size="8"> 원
</td>
<td class="td_grpset">
</td>
</tr>
3. 영카트5 / adm / shop_admin / itemformupdate.php
it_price = '$it_price',
를 다음과 같이 변경
it_price = '{$it_price}',
it_price2 = '{$it_price2}',
it_price3 = '{$it_price3}',
it_price4 = '{$it_price4}',
4. 영카트5 / adm / shop_admin / itemlistupdate.php
it_price = '{$_POST['it_price'][$k]}',
를 아래와 같이 변경
it_price = '{$_POST['it_price'][$k]}',
it_price2 = '{$_POST['it_price2'][$k]}',
it_price3 = '{$_POST['it_price3'][$k]}',
it_price4 = '{$_POST['it_price4'][$k]}',
5. 영카트5 / lib / shop.lib.php
function get_price($it)
{
global $member;
if ($it['it_tel_inq']) return '전화문의';
$price = $it['it_price'];
return (int)$price;
}
를 아래와 같이 변경
function get_price($it)
{
global $member;
if ($it['it_tel_inq']) return '전화문의';
if ($member['mb_level'] >= 4 && $it['it_price4'] > 0) {
$price = $it['it_price4'];
} else if ($member['mb_level'] >= 3 && $it['it_price3'] > 0) {
$price = $it['it_price3'];
} else if ($member['mb_level'] >= 2 && $it['it_price2'] > 0) {
$price = $it['it_price2'];
} else {
$price = $it['it_price'];
}
return (int)$price;
}
6. 영카트5 / shop / cartupdate.php
2017-09-08 04:13 : it['it_price_2'], it['it_price_3'] 를 it['it_price2'], it['it_price3'] 로 변경했습니다.
2017-09-08 04:13 : 영카드 구버전은 '$ct_select_time' 가 없습니다. 원문 비교해서 적용하세요
$sql .= $comma."( '$tmp_cart_id', '{$member['mb_id']}', '{$it['it_id']}', '".addslashes($it['it_name'])."', '{$it['it_sc_type']}', '{$it['it_sc_method']}', '{$it['it_sc_price']}', '{$it['it_sc_minimum']}', '{$it['it_sc_qty']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '$io_value', '$ct_qty', '{$it['it_notax']}', '$io_id', '$io_type', '$io_price', '".G5_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select', '$ct_select_time' )";
를 아래와 같이 변경
if ($member['mb_level'] >= 4 && $it['it_price4'] > 0) { // VIP가격 Lv.4
$it_price = $it['it_price4'];
} else if ($member['mb_level'] >= 3 && $it['it_price3'] > 0) { // 특별가격 Lv.3
$it_price = $it['it_price3'];
} else if ($member['mb_level'] >= 2 && $it['it_price2'] > 0) { // 회원가격 Lv.2
$it_price = $it['it_price2'];
} else { // 비회원가격
$it_price = $it['it_price'];
}
$sql .= $comma."( '{$tmp_cart_id}', '{$member['mb_id']}', '{$it['it_id']}', '".addslashes($it['it_name'])."', '{$it['it_sc_type']}', '{$it['it_sc_method']}', '{$it['it_sc_price']}', '{$it['it_sc_minimum']}', '{$it['it_sc_qty']}', '쇼핑', '{$it_price}', '{$point}', '0', '0', '{$io_value}', '{$ct_qty}', '{$it['it_notax']}', '{$io_id}', '{$io_type}', '{$io_price}', '".G5_TIME_YMDHIS."', '{$REMOTE_ADDR}', '{$ct_send_cost}', '{$sw_direct}', '{$ct_select}', '{$ct_select_time}' )";
관련자료
https://sir.kr/yc5_tip/816
https://sir.kr/yc5_tip/578
동일강좌 https://sir.kr/yc5_tip/860
판매가격 > 비회원가격
(추가) > 회원가격
(추가) > 특별가격
(추가) > VIP가격
디비의 g5_shop_item 에 it_price2 , it_price3 , it_price4 필드를 추가
adm / shop_admin
├ itemform.php
├ itemformupdate.php
└ itemlist.php
lib
└ shop.lib.php
shop
└ cartupdate.php
1-1. 영카트5 / adm / shop_admin / itemlist.php
상단 include_once('./_common.php'); 아래에 내용 추가
// 회원레벨 2 - 상품가격(회원가격) 필드 추가
if(!sql_query(" select it_price2 from {$g5['g5_shop_item_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_price2` int(11) NOT NULL DEFAULT '0' AFTER `it_price` ", true);
}
// 회원레벨 3 - 상품가격(특별가격) 필드 추가
if(!sql_query(" select it_price3 from {$g5['g5_shop_item_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_price3` int(11) NOT NULL DEFAULT '0' AFTER `it_price2` ", true);
}
// 회원레벨 4 - 상품가격(VIP가격) 필드 추가
if(!sql_query(" select it_price4 from {$g5['g5_shop_item_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g5['g5_shop_item_table']}`
ADD `it_price4` int(11) NOT NULL DEFAULT '0' AFTER `it_price3` ", true);
}
위 내용 저장후 > 관리자 > 쇼핑몰관리 > 상품관리 클릭하면 디비에 필드가 추가됩니다
1-2. 영카트5 / adm / shop_admin / itemlist.php
colspan="5" 를 colspan="6" 로 변경 합니다. ( 2개가 있습니다 )
1-3. 영카트5 / adm / shop_admin / itemlist.php
<tr>
<th scope="col" rowspan="2" id="th_img">이미지</th>
<th scope="col" rowspan="2" id="th_pc_title"><?php echo subject_sort_link('it_name', 'sca='.$sca); ?>상품명</a></th>
<th scope="col" id="th_amt"><?php echo subject_sort_link('it_price', 'sca='.$sca); ?>판매가격</a></th>
<th scope="col" id="th_camt"><?php echo subject_sort_link('it_cust_price', 'sca='.$sca); ?>시중가격</a></th>
<th scope="col" id="th_skin">PC스킨</th>
</tr>
<tr>
<th scope="col" id="th_pt"><?php echo subject_sort_link('it_point', 'sca='.$sca); ?>포인트</a></th>
<th scope="col" id="th_qty"><?php echo subject_sort_link('it_stock_qty', 'sca='.$sca); ?>재고</a></th>
<th scope="col" id="th_mskin">모바일스킨</th>
</tr>
를 다음과 같이 변경
<tr>
<th scope="col" rowspan="2" id="th_img">이미지</th>
<th scope="col" rowspan="2" id="th_pc_title"><?php echo subject_sort_link('it_name', 'sca='.$sca); ?>상품명</a></th>
<th scope="col" id="th_amt"><?php echo subject_sort_link('it_price', 'sca='.$sca); ?>비회원가격</a></th>
<th scope="col" id="th_amt"><?php echo subject_sort_link('it_price2', 'sca='.$sca); ?>회원가격</a></th>
<th scope="col" id="th_amt"><?php echo subject_sort_link('it_price3', 'sca='.$sca); ?>특별가격</a></th>
<th scope="col" id="th_skin">PC스킨</th>
</tr>
<tr>
<th scope="col" id="th_camt"><?php echo subject_sort_link('it_cust_price', 'sca='.$sca); ?>시중가격</a></th>
<th scope="col" id="th_pt"><?php echo subject_sort_link('it_point', 'sca='.$sca); ?>포인트</a></th>
<th scope="col" id="th_qty"><?php echo subject_sort_link('it_stock_qty', 'sca='.$sca); ?>재고</a></th>
<th scope="col" id="th_mskin">모바일스킨</th>
</tr>
1-4. 영카트5 / adm / shop_admin / itemlist.php
<tr class="<?php echo $bg; ?>">
<td rowspan="2" class="td_img"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?></a></td>
<td headers="th_pc_title" rowspan="2" class="td_input">
<label for="name_<?php echo $i; ?>" class="sound_only">상품명</label>
<input type="text" name="it_name[<?php echo $i; ?>]" value="<?php echo htmlspecialchars2(cut_str($row['it_name'],250, "")); ?>" id="name_<?php echo $i; ?>" required class="frm_input required" size="30">
</td>
<td headers="th_amt" class="td_numbig td_input">
<label for="price_<?php echo $i; ?>" class="sound_only">판매가격</label>
<input type="text" name="it_price[<?php echo $i; ?>]" value="<?php echo $row['it_price']; ?>" id="price_<?php echo $i; ?>" class="frm_input sit_amt" size="7">
</td>
<td headers="th_camt" class="td_numbig td_input">
<label for="cust_price_<?php echo $i; ?>" class="sound_only">시중가격</label>
<input type="text" name="it_cust_price[<?php echo $i; ?>]" value="<?php echo $row['it_cust_price']; ?>" id="cust_price_<?php echo $i; ?>" class="frm_input sit_camt" size="7">
</td>
<td headers="th_skin" class="td_numbig td_input">
<label for="it_skin_<?php echo $i; ?>" class="sound_only">PC 스킨</label>
<?php echo get_skin_select('shop', 'it_skin_'.$i, 'it_skin['.$i.']', $row['it_skin']); ?>
</td>
</tr>
<tr class="<?php echo $bg; ?>">
<td headers="th_pt" class="td_numbig td_input"><?php echo $it_point; ?></td>
<td headers="th_qty" class="td_numbig td_input">
<label for="stock_qty_<?php echo $i; ?>" class="sound_only">재고</label>
<input type="text" name="it_stock_qty[<?php echo $i; ?>]" value="<?php echo $row['it_stock_qty']; ?>" id="stock_qty_<?php echo $i; ?>" class="frm_input sit_qty" size="7">
</td>
<td headers="th_mskin" class="td_numbig td_input">
<label for="it_mobile_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
<?php echo get_mobile_skin_select('shop', 'it_mobile_skin_'.$i, 'it_mobile_skin['.$i.']', $row['it_mobile_skin']); ?>
</td>
</tr>
를 다음과 같이 변경
<tr class="<?php echo $bg; ?>">
<td rowspan="2" class="td_img"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?></a></td>
<td headers="th_pc_title" rowspan="2" class="td_input">
<label for="name_<?php echo $i; ?>" class="sound_only">상품명</label>
<input type="text" name="it_name[<?php echo $i; ?>]" value="<?php echo htmlspecialchars2(cut_str($row['it_name'],250, "")); ?>" id="name_<?php echo $i; ?>" required class="frm_input required" size="30">
</td>
<td headers="th_amt" class="td_numbig td_input">
<label for="price_<?php echo $i; ?>" class="sound_only">비회원가격</label>
<input type="text" name="it_price[<?php echo $i; ?>]" value="<?php echo $row['it_price']; ?>" id="price_<?php echo $i; ?>" class="frm_input sit_amt" size="7">
</td>
<td headers="th_amt" class="td_numbig td_input">
<label for="price2_<?php echo $i; ?>" class="sound_only">회원가격</label>
<input type="text" name="it_price2[<?php echo $i; ?>]" value="<?php echo $row['it_price2']; ?>" id="price2_<?php echo $i; ?>" class="frm_input sit_amt" size="7">
</td>
<td headers="th_amt" class="td_numbig td_input">
<label for="price3_<?php echo $i; ?>" class="sound_only">특별가격</label>
<input type="text" name="it_price3[<?php echo $i; ?>]" value="<?php echo $row['it_price3']; ?>" id="price3_<?php echo $i; ?>" class="frm_input sit_amt" size="7">
</td>
<td headers="th_skin" class="td_numbig td_input">
<label for="it_skin_<?php echo $i; ?>" class="sound_only">PC 스킨</label>
<?php echo get_skin_select('shop', 'it_skin_'.$i, 'it_skin['.$i.']', $row['it_skin']); ?>
</td>
</tr>
<tr class="<?php echo $bg; ?>">
<td headers="th_camt" class="td_numbig td_input">
<label for="cust_price_<?php echo $i; ?>" class="sound_only">시중가격</label>
<input type="text" name="it_cust_price[<?php echo $i; ?>]" value="<?php echo $row['it_cust_price']; ?>" id="cust_price_<?php echo $i; ?>" class="frm_input sit_camt" size="7">
</td>
<td headers="th_pt" class="td_numbig td_input"><?php echo $it_point; ?></td>
<td headers="th_qty" class="td_numbig td_input">
<label for="stock_qty_<?php echo $i; ?>" class="sound_only">재고</label>
<input type="text" name="it_stock_qty[<?php echo $i; ?>]" value="<?php echo $row['it_stock_qty']; ?>" id="stock_qty_<?php echo $i; ?>" class="frm_input sit_qty" size="7">
</td>
<td headers="th_mskin" class="td_numbig td_input">
<label for="it_mobile_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
<?php echo get_mobile_skin_select('shop', 'it_mobile_skin_'.$i, 'it_mobile_skin['.$i.']', $row['it_mobile_skin']); ?>
</td>
</tr>
2. 영카트5 / adm / shop_admin / itemform.php
<tr>
<th scope="row"><label for="it_price">판매가격</label></th>
<td>
<input type="text" name="it_price" value="<?php echo $it['it_price']; ?>" id="it_price" class="frm_input" size="8"> 원
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_ca_it_price" value="1" id="chk_ca_it_price">
<label for="chk_ca_it_price">분류적용</label>
<input type="checkbox" name="chk_all_it_price" value="1" id="chk_all_it_price">
<label for="chk_all_it_price">전체적용</label>
</td>
</tr>
를 다음과 같이 변경
<tr>
<th scope="row"><label for="it_price">비회원가격</label></th>
<td>
<input type="text" name="it_price" value="<?php echo $it['it_price']; ?>" id="it_price" class="frm_input" size="8"> 원
</td>
<td class="td_grpset">
<input type="checkbox" name="chk_ca_it_price" value="1" id="chk_ca_it_price">
<label for="chk_ca_it_price">분류적용</label>
<input type="checkbox" name="chk_all_it_price" value="1" id="chk_all_it_price">
<label for="chk_all_it_price">전체적용</label>
</td>
</tr>
<tr>
<th scope="row"><label for="it_price2">회원가격(Lv.2)</label></th>
<td>
<input type="text" name="it_price2" value="<?php echo $it['it_price2']; ?>" id="it_price2" class="frm_input" size="8"> 원
</td>
<td class="td_grpset">
</td>
</tr>
<tr>
<th scope="row"><label for="it_price3">특별가격(Lv.3)</label></th>
<td>
<input type="text" name="it_price3" value="<?php echo $it['it_price3']; ?>" id="it_price3" class="frm_input" size="8"> 원
</td>
<td class="td_grpset">
</td>
</tr>
<tr>
<th scope="row"><label for="it_price4">VIP가격(Lv.4 이상)</label></th>
<td>
<input type="text" name="it_price4" value="<?php echo $it['it_price4']; ?>" id="it_price4" class="frm_input" size="8"> 원
</td>
<td class="td_grpset">
</td>
</tr>
3. 영카트5 / adm / shop_admin / itemformupdate.php
it_price = '$it_price',
를 다음과 같이 변경
it_price = '{$it_price}',
it_price2 = '{$it_price2}',
it_price3 = '{$it_price3}',
it_price4 = '{$it_price4}',
4. 영카트5 / adm / shop_admin / itemlistupdate.php
it_price = '{$_POST['it_price'][$k]}',
를 아래와 같이 변경
it_price = '{$_POST['it_price'][$k]}',
it_price2 = '{$_POST['it_price2'][$k]}',
it_price3 = '{$_POST['it_price3'][$k]}',
it_price4 = '{$_POST['it_price4'][$k]}',
5. 영카트5 / lib / shop.lib.php
function get_price($it)
{
global $member;
if ($it['it_tel_inq']) return '전화문의';
$price = $it['it_price'];
return (int)$price;
}
를 아래와 같이 변경
function get_price($it)
{
global $member;
if ($it['it_tel_inq']) return '전화문의';
if ($member['mb_level'] >= 4 && $it['it_price4'] > 0) {
$price = $it['it_price4'];
} else if ($member['mb_level'] >= 3 && $it['it_price3'] > 0) {
$price = $it['it_price3'];
} else if ($member['mb_level'] >= 2 && $it['it_price2'] > 0) {
$price = $it['it_price2'];
} else {
$price = $it['it_price'];
}
return (int)$price;
}
6. 영카트5 / shop / cartupdate.php
2017-09-08 04:13 : it['it_price_2'], it['it_price_3'] 를 it['it_price2'], it['it_price3'] 로 변경했습니다.
2017-09-08 04:13 : 영카드 구버전은 '$ct_select_time' 가 없습니다. 원문 비교해서 적용하세요
$sql .= $comma."( '$tmp_cart_id', '{$member['mb_id']}', '{$it['it_id']}', '".addslashes($it['it_name'])."', '{$it['it_sc_type']}', '{$it['it_sc_method']}', '{$it['it_sc_price']}', '{$it['it_sc_minimum']}', '{$it['it_sc_qty']}', '쇼핑', '{$it['it_price']}', '$point', '0', '0', '$io_value', '$ct_qty', '{$it['it_notax']}', '$io_id', '$io_type', '$io_price', '".G5_TIME_YMDHIS."', '$REMOTE_ADDR', '$ct_send_cost', '$sw_direct', '$ct_select', '$ct_select_time' )";
를 아래와 같이 변경
if ($member['mb_level'] >= 4 && $it['it_price4'] > 0) { // VIP가격 Lv.4
$it_price = $it['it_price4'];
} else if ($member['mb_level'] >= 3 && $it['it_price3'] > 0) { // 특별가격 Lv.3
$it_price = $it['it_price3'];
} else if ($member['mb_level'] >= 2 && $it['it_price2'] > 0) { // 회원가격 Lv.2
$it_price = $it['it_price2'];
} else { // 비회원가격
$it_price = $it['it_price'];
}
$sql .= $comma."( '{$tmp_cart_id}', '{$member['mb_id']}', '{$it['it_id']}', '".addslashes($it['it_name'])."', '{$it['it_sc_type']}', '{$it['it_sc_method']}', '{$it['it_sc_price']}', '{$it['it_sc_minimum']}', '{$it['it_sc_qty']}', '쇼핑', '{$it_price}', '{$point}', '0', '0', '{$io_value}', '{$ct_qty}', '{$it['it_notax']}', '{$io_id}', '{$io_type}', '{$io_price}', '".G5_TIME_YMDHIS."', '{$REMOTE_ADDR}', '{$ct_send_cost}', '{$sw_direct}', '{$ct_select}', '{$ct_select_time}' )";
관련자료
https://sir.kr/yc5_tip/816
https://sir.kr/yc5_tip/578
동일강좌 https://sir.kr/yc5_tip/860
댓글목록
등록된 댓글이 없습니다.