#243 get 방식 장바구니 담기 및 가격비교 사이트 상품url 변경
This commit is contained in:
52
shop/itembuy.php
Normal file
52
shop/itembuy.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
$it_id = $_GET['it_id'];
|
||||
$io_id = $_GET['opt'];
|
||||
|
||||
// 상품정보
|
||||
$sql = " select * from {$g4['shop_item_table']} where it_id = '$it_id' ";
|
||||
$it = sql_fetch($sql);
|
||||
|
||||
// 옵션정보
|
||||
if($io_id && $it['it_option_subject']) {
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '$it_id' and io_id = '$io_id' ";
|
||||
$opt = sql_fetch($sql);
|
||||
|
||||
$subj = explode(',', $it['it_option_subject']);
|
||||
$arr_opt = explode(chr(30), $io_id);
|
||||
|
||||
if(count($subj) != count($arr_opt))
|
||||
alert('상품의 옵션정보가 올바르지 않습니다.\\n상품페이지에서 다시 주문해 주십시오.', G4_SHOP_URL.'/item.php?it_id='.$it_id);
|
||||
|
||||
$io_value = '';
|
||||
$sep = '';
|
||||
for($n=0; $n<count($subj); $n++) {
|
||||
$io_value .= $sep.$subj[$n].':'.$arr_opt[$n];
|
||||
$sep = ' / ';
|
||||
}
|
||||
} else {
|
||||
$io_value = $it['it_name'];
|
||||
}
|
||||
|
||||
$tot_prc = $it['it_price'] + $opt['io_price'];
|
||||
|
||||
// 배송비결제
|
||||
$ct_send_cost = 0;
|
||||
if($it['it_sc_method'] == 1)
|
||||
$ct_send_cost = 1;
|
||||
|
||||
$_POST['it_id'] = $it['it_id'];
|
||||
$_POST['it_name'] = $it['it_name'];
|
||||
$_POST['it_price'] = $it['it_price'];
|
||||
$_POST['it_point'] = get_item_point($it);
|
||||
$_POST['total_price'] = $tot_prc;
|
||||
$_POST['io_id'][0] = $opt['io_id'];
|
||||
$_POST['io_type'][0] = 0;
|
||||
$_POST['io_price'][0] = $opt['io_price'];
|
||||
$_POST['ct_qty'][0] = 1;
|
||||
$_POST['io_value'][0] = $io_value;
|
||||
$_POST['ct_send_cost'] = $ct_send_cost;
|
||||
|
||||
include_once(G4_SHOP_PATH.'/cartupdate.php');
|
||||
?>
|
||||
3
shop/price2/_common.php
Normal file
3
shop/price2/_common.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
?>
|
||||
162
shop/price2/about.php
Normal file
162
shop/price2/about.php
Normal file
@ -0,0 +1,162 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
$lt = "";
|
||||
$gt = "<!>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$sql =" select * from {$g4['shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$ca_id1 = "";
|
||||
$ca_id2 = "";
|
||||
$ca_id3 = "";
|
||||
$ca_id4 = "";
|
||||
$ca_name1 = "";
|
||||
$ca_name2 = "";
|
||||
$ca_name3 = "";
|
||||
$ca_name4 = "";
|
||||
|
||||
$ca_id1 = substr($row['ca_id'],0,2);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$ca_id1' ");
|
||||
$ca_name1 = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$ca_id2 = substr($row['ca_id'],0,4);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$ca_id2' ");
|
||||
$ca_name2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$ca_id3 = substr($row['ca_id'],0,6);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$ca_id3' ");
|
||||
$ca_name3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$ca_id4 = substr($row['ca_id'],0,8);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$ca_id4' ");
|
||||
$ca_name4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
$PRDATE = substr($row['it_time'], 0, 10);
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo "{$lt}{$row['it_id']}{$gt}"; // 쇼핑몰 상품ID
|
||||
echo "{$lt}C{$gt}"; // 상품구분 C/U/D 전체EP는 일괄적으로 C
|
||||
echo "{$lt}{$it_name}{$gt}"; // 상품명
|
||||
echo "{$lt}{$it_price}{$gt}"; // 판매가격
|
||||
echo "{$lt}{$buy_url}{$gt}"; // 상품의 상세페이지 주소
|
||||
echo "{$lt}".$img_url."{$gt}"; // 이미지 URL
|
||||
echo "{$lt}$ca_id1{$gt}"; // 대분류 카테고리 코드
|
||||
echo "{$lt}$ca_id2{$gt}"; // 중분류 카테고리 코드
|
||||
echo "{$lt}$ca_id3{$gt}"; // 소분류 카테고리 코드
|
||||
echo "{$lt}$ca_id4{$gt}"; // 세분류 카테고리 코드
|
||||
echo "{$lt}$ca_name1{$gt}"; // 대 카테고리명
|
||||
echo "{$lt}$ca_name2{$gt}"; // 중 카테고리명
|
||||
echo "{$lt}$ca_name3{$gt}"; // 소 카테고리명
|
||||
echo "{$lt}$ca_name4{$gt}"; // 세 카테고리명
|
||||
echo "{$lt}{$gt}"; // 모델명
|
||||
echo "{$lt}{$gt}"; // 브랜드
|
||||
echo "{$lt}{$row['it_maker']}{$gt}"; // 메이커
|
||||
echo "{$lt}{$row['it_origin']}{$gt}"; // 원산지
|
||||
echo "{$lt}$PRDATE{$gt}"; // 상품등록일자
|
||||
echo "{$lt}$delivery{$gt}"; // 배송비
|
||||
echo "{$lt}{$gt}"; // 이벤트
|
||||
echo "{$lt}{$gt}"; // 쿠폰금액
|
||||
echo "{$lt}{$gt}"; // 무이자
|
||||
echo "{$lt}{$row['it_point']}{$gt}"; // 적립금
|
||||
echo "{$lt}Y{$gt}"; // 이미지변경여부
|
||||
echo "{$lt}{$gt}"; // 물품특성정보
|
||||
echo "{$lt}{$gt}"; // 상점내 매출비율
|
||||
echo "{$lt}"; // 상품정보 변경시간
|
||||
echo "\r\n";
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
echo "{$lt}{$row['it_id']}{$gt}"; // 쇼핑몰 상품ID
|
||||
echo "{$lt}C{$gt}"; // 상품구분 C/U/D 전체EP는 일괄적으로 C
|
||||
echo "{$lt}{$it_name}{$gt}"; // 상품명
|
||||
echo "{$lt}{$it_price}{$gt}"; // 판매가격
|
||||
echo "{$lt}{$buy_url}{$gt}"; // 상품의 상세페이지 주소
|
||||
echo "{$lt}".$img_url."{$gt}"; // 이미지 URL
|
||||
echo "{$lt}$ca_id1{$gt}"; // 대분류 카테고리 코드
|
||||
echo "{$lt}$ca_id2{$gt}"; // 중분류 카테고리 코드
|
||||
echo "{$lt}$ca_id3{$gt}"; // 소분류 카테고리 코드
|
||||
echo "{$lt}$ca_id4{$gt}"; // 세분류 카테고리 코드
|
||||
echo "{$lt}$ca_name1{$gt}"; // 대 카테고리명
|
||||
echo "{$lt}$ca_name2{$gt}"; // 중 카테고리명
|
||||
echo "{$lt}$ca_name3{$gt}"; // 소 카테고리명
|
||||
echo "{$lt}$ca_name4{$gt}"; // 세 카테고리명
|
||||
echo "{$lt}{$gt}"; // 모델명
|
||||
echo "{$lt}{$gt}"; // 브랜드
|
||||
echo "{$lt}{$row['it_maker']}{$gt}"; // 메이커
|
||||
echo "{$lt}{$row['it_origin']}{$gt}"; // 원산지
|
||||
echo "{$lt}$PRDATE{$gt}"; // 상품등록일자
|
||||
echo "{$lt}$delivery{$gt}"; // 배송비
|
||||
echo "{$lt}{$gt}"; // 이벤트
|
||||
echo "{$lt}{$gt}"; // 쿠폰금액
|
||||
echo "{$lt}{$gt}"; // 무이자
|
||||
echo "{$lt}{$row['it_point']}{$gt}"; // 적립금
|
||||
echo "{$lt}Y{$gt}"; // 이미지변경여부
|
||||
echo "{$lt}{$gt}"; // 물품특성정보
|
||||
echo "{$lt}{$gt}"; // 상점내 매출비율
|
||||
echo "{$lt}"; // 상품정보 변경시간
|
||||
echo "\r\n";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
163
shop/price2/about_new.php
Normal file
163
shop/price2/about_new.php
Normal file
@ -0,0 +1,163 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
$lt = "";
|
||||
$gt = "<!>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$time = date("Y-m-d 00:00:00", G4_SERVER_TIME - 86400);
|
||||
$sql =" select * from {$g4['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$ca_id1 = "";
|
||||
$ca_id2 = "";
|
||||
$ca_id3 = "";
|
||||
$ca_id4 = "";
|
||||
$ca_name1 = "";
|
||||
$ca_name2 = "";
|
||||
$ca_name3 = "";
|
||||
$ca_name4 = "";
|
||||
|
||||
$ca_id1 = substr($row['ca_id'],0,2);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$ca_id1' ");
|
||||
$ca_name1 = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$ca_id2 = substr($row['ca_id'],0,4);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$ca_id2' ");
|
||||
$ca_name2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$ca_id3 = substr($row['ca_id'],0,6);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$ca_id3' ");
|
||||
$ca_name3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$ca_id4 = substr($row['ca_id'],0,8);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$ca_id4' ");
|
||||
$ca_name4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
$PRDATE = substr($row['it_time'], 0, 10);
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo "{$lt}{$row['it_id']}{$gt}"; // 쇼핑몰 상품ID
|
||||
echo "{$lt}C{$gt}"; // 상품구분 C/U/D 전체EP는 일괄적으로 C
|
||||
echo "{$lt}{$it_name}{$gt}"; // 상품명
|
||||
echo "{$lt}{$it_price}{$gt}"; // 판매가격
|
||||
echo "{$lt}".$buy_url."{$gt}"; // 상품의 상세페이지 주소
|
||||
echo "{$lt}".$img_url."{$gt}"; // 이미지 URL
|
||||
echo "{$lt}$ca_id1{$gt}"; // 대분류 카테고리 코드
|
||||
echo "{$lt}$ca_id2{$gt}"; // 중분류 카테고리 코드
|
||||
echo "{$lt}$ca_id3{$gt}"; // 소분류 카테고리 코드
|
||||
echo "{$lt}$ca_id4{$gt}"; // 세분류 카테고리 코드
|
||||
echo "{$lt}$ca_name1{$gt}"; // 대 카테고리명
|
||||
echo "{$lt}$ca_name2{$gt}"; // 중 카테고리명
|
||||
echo "{$lt}$ca_name3{$gt}"; // 소 카테고리명
|
||||
echo "{$lt}$ca_name4{$gt}"; // 세 카테고리명
|
||||
echo "{$lt}{$gt}"; // 모델명
|
||||
echo "{$lt}{$gt}"; // 브랜드
|
||||
echo "{$lt}{$row['it_maker']}{$gt}"; // 메이커
|
||||
echo "{$lt}{$row['it_origin']}{$gt}"; // 원산지
|
||||
echo "{$lt}$PRDATE{$gt}"; // 상품등록일자
|
||||
echo "{$lt}$delivery{$gt}"; // 배송비
|
||||
echo "{$lt}{$gt}"; // 이벤트
|
||||
echo "{$lt}{$gt}"; // 쿠폰금액
|
||||
echo "{$lt}{$gt}"; // 무이자
|
||||
echo "{$lt}{$row['it_point']}{$gt}"; // 적립금
|
||||
echo "{$lt}Y{$gt}"; // 이미지변경여부
|
||||
echo "{$lt}{$gt}"; // 물품특성정보
|
||||
echo "{$lt}{$gt}"; // 상점내 매출비율
|
||||
echo "{$lt}"; // 상품정보 변경시간
|
||||
echo "\r\n";
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
echo "{$lt}{$row['it_id']}{$gt}"; // 쇼핑몰 상품ID
|
||||
echo "{$lt}C{$gt}"; // 상품구분 C/U/D 전체EP는 일괄적으로 C
|
||||
echo "{$lt}{$it_name}{$gt}"; // 상품명
|
||||
echo "{$lt}{$it_price}{$gt}"; // 판매가격
|
||||
echo "{$lt}".$buy_url."{$gt}"; // 상품의 상세페이지 주소
|
||||
echo "{$lt}".$img_url."{$gt}"; // 이미지 URL
|
||||
echo "{$lt}$ca_id1{$gt}"; // 대분류 카테고리 코드
|
||||
echo "{$lt}$ca_id2{$gt}"; // 중분류 카테고리 코드
|
||||
echo "{$lt}$ca_id3{$gt}"; // 소분류 카테고리 코드
|
||||
echo "{$lt}$ca_id4{$gt}"; // 세분류 카테고리 코드
|
||||
echo "{$lt}$ca_name1{$gt}"; // 대 카테고리명
|
||||
echo "{$lt}$ca_name2{$gt}"; // 중 카테고리명
|
||||
echo "{$lt}$ca_name3{$gt}"; // 소 카테고리명
|
||||
echo "{$lt}$ca_name4{$gt}"; // 세 카테고리명
|
||||
echo "{$lt}{$gt}"; // 모델명
|
||||
echo "{$lt}{$gt}"; // 브랜드
|
||||
echo "{$lt}{$row['it_maker']}{$gt}"; // 메이커
|
||||
echo "{$lt}{$row['it_origin']}{$gt}"; // 원산지
|
||||
echo "{$lt}$PRDATE{$gt}"; // 상품등록일자
|
||||
echo "{$lt}$delivery{$gt}"; // 배송비
|
||||
echo "{$lt}{$gt}"; // 이벤트
|
||||
echo "{$lt}{$gt}"; // 쿠폰금액
|
||||
echo "{$lt}{$gt}"; // 무이자
|
||||
echo "{$lt}{$row['it_point']}{$gt}"; // 적립금
|
||||
echo "{$lt}Y{$gt}"; // 이미지변경여부
|
||||
echo "{$lt}{$gt}"; // 물품특성정보
|
||||
echo "{$lt}{$gt}"; // 상점내 매출비율
|
||||
echo "{$lt}"; // 상품정보 변경시간
|
||||
echo "\r\n";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
183
shop/price2/auction.php
Normal file
183
shop/price2/auction.php
Normal file
@ -0,0 +1,183 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
옥션 오픈 쇼핑
|
||||
DB 엔진페이지 제작가이드 다운받기
|
||||
http://openshopping.auction.co.kr/customer/pds/openShoppingGuide1.1.zip
|
||||
|
||||
[[_BEGIN]]
|
||||
[[PRODID]]a111
|
||||
[[PRNAME]]테스트상품1
|
||||
[[_PRICE]]84000
|
||||
[[PRDURL]]http://www.auction.co.kr/pinfo/pdetail.asp?pid=a111
|
||||
[[IMGURL]]http://www.auction.co.kr/images/aa_1.jpg
|
||||
[[CATE_1]]의류
|
||||
[[CATE_2]]여성의류
|
||||
[[CATE_3]]나시
|
||||
[[CATE_4]]
|
||||
[[_MODEL]]쉬폰
|
||||
[[_BRAND]]
|
||||
[[_MAKER]]
|
||||
[[ORIGIN]]중국
|
||||
[[PRDATE]]2008-01-11
|
||||
[[DELIVR]]0/50000/3000
|
||||
[[_EVENT]]
|
||||
[[COUPON]]
|
||||
[[PRCARD]]신한5개월
|
||||
[[_POINT]]
|
||||
[[MODIMG]]
|
||||
[[SRATIO]]3.5
|
||||
[[___END]]
|
||||
|
||||
필수
|
||||
[[_BEGIN]] // 상품시작을 알림
|
||||
[[PRODID]] // 상품아이디
|
||||
[[PRNAME]] // 상품명
|
||||
[[_PRICE]] // 가격 (숫자로만 표시, 컴마 제외)
|
||||
[[PRDURL]] // 상품 상세페이지 URL
|
||||
[[IMGURL]] // 상품 대 이미지
|
||||
[[CATE_1]] // 쇼핑몰 대 카테고리
|
||||
[[___END]] // 상품종료를 알림
|
||||
*/
|
||||
|
||||
$lt = "[[";
|
||||
$gt = "]]";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$sql =" select * from {$g4['shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
$ca_name1 = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
$ca_name2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
|
||||
$ca_name3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
|
||||
$ca_name4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
$PRDATE = substr($row['it_time'], 0, 10);
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}$it_name
|
||||
{$lt}_PRICE{$gt}$it_price
|
||||
{$lt}PRDURL{$gt}$buy_url
|
||||
{$lt}IMGURL{$gt}$img_url
|
||||
{$lt}CATE_1{$gt}$ca_name1
|
||||
{$lt}CATE_2{$gt}$ca_name2
|
||||
{$lt}CATE_3{$gt}$ca_name3
|
||||
{$lt}CATE_4{$gt}$ca_name4
|
||||
{$lt}_MODEL{$gt}
|
||||
{$lt}_BRAND{$gt}
|
||||
{$lt}_MAKER{$gt}{$row['it_maker']}
|
||||
{$lt}ORIGIN{$gt}{$row['it_origin']}
|
||||
{$lt}PRDATE{$gt}$PRDATE
|
||||
{$lt}DELIVR{$gt}0/$delivery_limit/$delivery
|
||||
{$lt}_EVENT{$gt}
|
||||
{$lt}COUPON{$gt}
|
||||
{$lt}PRCARD{$gt}
|
||||
{$lt}_POINT{$gt}{$row['it_point']}
|
||||
{$lt}MODIMG{$gt}Y
|
||||
{$lt}SRATIO{$gt}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}$it_name
|
||||
{$lt}_PRICE{$gt}$it_price
|
||||
{$lt}PRDURL{$gt}$buy_url
|
||||
{$lt}IMGURL{$gt}$img_url
|
||||
{$lt}CATE_1{$gt}$ca_name1
|
||||
{$lt}CATE_2{$gt}$ca_name2
|
||||
{$lt}CATE_3{$gt}$ca_name3
|
||||
{$lt}CATE_4{$gt}$ca_name4
|
||||
{$lt}_MODEL{$gt}
|
||||
{$lt}_BRAND{$gt}
|
||||
{$lt}_MAKER{$gt}{$row['it_maker']}
|
||||
{$lt}ORIGIN{$gt}{$row['it_origin']}
|
||||
{$lt}PRDATE{$gt}$PRDATE
|
||||
{$lt}DELIVR{$gt}0/$delivery_limit/$delivery
|
||||
{$lt}_EVENT{$gt}
|
||||
{$lt}COUPON{$gt}
|
||||
{$lt}PRCARD{$gt}
|
||||
{$lt}_POINT{$gt}{$row['it_point']}
|
||||
{$lt}MODIMG{$gt}Y
|
||||
{$lt}SRATIO{$gt}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
172
shop/price2/auction_new.php
Normal file
172
shop/price2/auction_new.php
Normal file
@ -0,0 +1,172 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
// 신규상품URL은 전체 상품정보 양식에 맞춰서 해당날짜에 추가된 상품만 출력
|
||||
|
||||
/*
|
||||
옥션 오픈 쇼핑
|
||||
DB 엔진페이지 제작가이드 다운받기
|
||||
http://openshopping.auction.co.kr/customer/pds/openShoppingGuide1.1.zip
|
||||
|
||||
[[_BEGIN]]
|
||||
[[PRODID]]a111
|
||||
[[PRNAME]]테스트상품1
|
||||
[[_PRICE]]84000
|
||||
[[PRDURL]]http://www.auction.co.kr/pinfo/pdetail.asp?pid=a111
|
||||
[[IMGURL]]http://www.auction.co.kr/images/aa_1.jpg
|
||||
[[CATE_1]]의류
|
||||
[[CATE_2]]여성의류
|
||||
[[CATE_3]]나시
|
||||
[[CATE_4]]
|
||||
[[_MODEL]]쉬폰
|
||||
[[_BRAND]]
|
||||
[[_MAKER]]
|
||||
[[ORIGIN]]중국
|
||||
[[PRDATE]]2008-01-11
|
||||
[[DELIVR]]0/50000/3000
|
||||
[[_EVENT]]
|
||||
[[COUPON]]
|
||||
[[PRCARD]]신한5개월
|
||||
[[_POINT]]
|
||||
[[MODIMG]]
|
||||
[[SRATIO]]3.5
|
||||
[[___END]]
|
||||
|
||||
필수
|
||||
[[_BEGIN]] // 상품시작을 알림
|
||||
[[PRODID]] // 상품아이디
|
||||
[[PRNAME]] // 상품명
|
||||
[[_PRICE]] // 가격 (숫자로만 표시, 컴마 제외)
|
||||
[[PRDURL]] // 상품 상세페이지 URL
|
||||
[[IMGURL]] // 상품 대 이미지
|
||||
[[CATE_1]] // 쇼핑몰 대 카테고리
|
||||
[[___END]] // 상품종료를 알림
|
||||
*/
|
||||
|
||||
$lt = "[[";
|
||||
$gt = "]]";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비 얼마 금액 이하
|
||||
$tmp = explode(';', $default['de_send_cost_limit']);
|
||||
$delivery_limit = (int)$tmp[0];
|
||||
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
|
||||
$time = date("Y-m-d 00:00:00", G4_SERVER_TIME - 86400);
|
||||
$sql =" select * from {$g4['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
$ca_name1 = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
$ca_name2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
|
||||
$ca_name3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
|
||||
$ca_name4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
$PRDATE = substr($row['it_time'], 0, 10);
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}$it_name
|
||||
{$lt}_PRICE{$gt}$it_price
|
||||
{$lt}PRDURL{$gt}$buy_url
|
||||
{$lt}IMGURL{$gt}$img_url
|
||||
{$lt}CATE_1{$gt}$ca_name1
|
||||
{$lt}CATE_2{$gt}$ca_name2
|
||||
{$lt}CATE_3{$gt}$ca_name3
|
||||
{$lt}CATE_4{$gt}$ca_name4
|
||||
{$lt}_MAKER{$gt}{$row['it_maker']}
|
||||
{$lt}ORIGIN{$gt}{$row['it_origin']}
|
||||
{$lt}PRDATE{$gt}$PRDATE
|
||||
{$lt}DELIVR{$gt}0/$delivery_limit/$delivery
|
||||
{$lt}_POINT{$gt}{$row['it_point']}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}$it_name
|
||||
{$lt}_PRICE{$gt}$it_price
|
||||
{$lt}PRDURL{$gt}$buy_url
|
||||
{$lt}IMGURL{$gt}$img_url
|
||||
{$lt}CATE_1{$gt}$ca_name1
|
||||
{$lt}CATE_2{$gt}$ca_name2
|
||||
{$lt}CATE_3{$gt}$ca_name3
|
||||
{$lt}CATE_4{$gt}$ca_name4
|
||||
{$lt}_MAKER{$gt}{$row['it_maker']}
|
||||
{$lt}ORIGIN{$gt}{$row['it_origin']}
|
||||
{$lt}PRDATE{$gt}$PRDATE
|
||||
{$lt}DELIVR{$gt}0/$delivery_limit/$delivery
|
||||
{$lt}_POINT{$gt}{$row['it_point']}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
46
shop/price2/auction_summary.php
Normal file
46
shop/price2/auction_summary.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
옥션 오픈 쇼핑
|
||||
DB 엔진페이지 제작가이드 다운받기
|
||||
http://openshopping.auction.co.kr/customer/pds/openShoppingGuide1.1.zip
|
||||
|
||||
// 요약상품 URL
|
||||
|
||||
[[_BEGIN]] // 상품시작을 알림
|
||||
[[PRODID]] // 상품아이디
|
||||
[[PRNAME]] // 상품명
|
||||
[[_PRICE]] // 가격 (숫자로만 표시, 컴마 제외)
|
||||
[[___END]] // 상품종료를 알림
|
||||
*/
|
||||
|
||||
$lt = "[[";
|
||||
$gt = "]]";
|
||||
|
||||
$sql =" select * from {$g4['shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}_BEGIN{$gt}
|
||||
{$lt}PRODID{$gt}{$row['it_id']}
|
||||
{$lt}PRNAME{$gt}{$row['it_name']}
|
||||
{$lt}_PRICE{$gt}{$row['it_price']}
|
||||
{$lt}___END{$gt}
|
||||
|
||||
HEREDOC;
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 100124 : 옥션에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
98
shop/price2/bb.php
Normal file
98
shop/price2/bb.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 비비(베스트바이어) 엔진페이지
|
||||
*/
|
||||
function it_image($img)
|
||||
{
|
||||
global $g4;
|
||||
|
||||
$tmp = G4_DATA_PATH.'/item/'.$img;
|
||||
if (file_exists($tmp) && $img) {
|
||||
$str = G4_DATA_URL.'/item/'.$img;
|
||||
} else {
|
||||
$str = G4_SHOP_URL.'/img/no_image.gif';
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
include_once('./_common.php');
|
||||
?>
|
||||
<html>
|
||||
<title>비비 엔진페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
// <p>상품번호^대분류^중분류^소분류^제조사^모델명^상품Url^이미지Url^가격
|
||||
$str = "";
|
||||
$cnt = 0;
|
||||
$sql = " select * from {$g4['shop_item_table']}
|
||||
where it_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$image = get_it_imageurl($row['it_id']);
|
||||
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
|
||||
if (strlen($row['ca_id']) >= 4)
|
||||
$row3 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
|
||||
if (strlen($row['ca_id']) >= 6)
|
||||
$row4 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
$stock = get_it_stock_qty($row['it_id']);
|
||||
if ($stock <= 0)
|
||||
$it_price = 0;
|
||||
|
||||
$str .= "<p>{$row['it_id']}^{$row2['ca_name']}^{$row3['ca_name']}^{$row4['ca_name']}^{$row['it_maker']}^{$row['it_name']}^{$buy_url}^$image^{$it_price}";
|
||||
$str .= "\n";
|
||||
$cnt++;
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
$stock = get_option_stock_qty($row['it_id'], $row2['io_id'], 0);
|
||||
if ($stock <= 0)
|
||||
$it_price = 0;
|
||||
|
||||
$str .= "<p>{$row['it_id']}^{$row2['ca_name']}^{$row3['ca_name']}^{$row4['ca_name']}^{$row['it_maker']}^{$row['it_name']}^{$buy_url}^$image^{$it_price}";
|
||||
$str .= "\n";
|
||||
$cnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "<p>" . $config['cf_title'] . " 입니다. 총 (".$cnt.") 건 입니다.\n";
|
||||
echo $str;
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
108
shop/price2/danawa.php
Normal file
108
shop/price2/danawa.php
Normal file
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 다나와 엔진페이지
|
||||
*/
|
||||
include_once('./_common.php');
|
||||
|
||||
$nl = ""; // new line \n
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$delivery = 0;
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
{
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$tmp = explode(';', $default['de_send_cost_list']);
|
||||
$delivery = (int)$tmp[0];
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
// 상품ID^카테고리^상품명^제조사^이미지URL^상품URL^가격^적립금^할인쿠폰^무이자할부^사은품^모델명^추가정보^출시일^배송료
|
||||
$str = "";
|
||||
$sql = " select * from {$g4['shop_item_table']}
|
||||
where it_use = '1'
|
||||
order by ca_id ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
$ca_name = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$row3 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
$ca_name .= "|" . $row3['ca_name'];
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
$str .= $nl;
|
||||
$str .= $row['it_id']; // 상품ID
|
||||
$str .= "^$ca_name"; // 카테고리
|
||||
$str .= "^{$it_name}"; // 상품명
|
||||
$str .= "^{$row['it_maker']}"; // 제조사
|
||||
$str .= "^".$img_url; // 이미지URL
|
||||
$str .= "^{$buy_url}"; // 상품URL
|
||||
$str .= "^{$it_price}"; // 가격
|
||||
$str .= "^{$row['it_point']}"; // 적립금
|
||||
$str .= "^"; // 할인쿠폰
|
||||
$str .= "^"; // 무이자할부
|
||||
$str .= "^"; // 사은품
|
||||
$str .= "^{$row['it_model']}"; // 모델명
|
||||
$str .= "^"; // 추가정보
|
||||
$str .= "^"; // 출시일
|
||||
$str .= "^$delivery"; // 배송료
|
||||
|
||||
$nl = "\n";
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
$str .= $nl;
|
||||
$str .= $row['it_id']; // 상품ID
|
||||
$str .= "^$ca_name"; // 카테고리
|
||||
$str .= "^{$it_name}"; // 상품명
|
||||
$str .= "^{$row['it_maker']}"; // 제조사
|
||||
$str .= "^".$img_url; // 이미지URL
|
||||
$str .= "^{$buy_url}"; // 상품URL
|
||||
$str .= "^{$it_price}"; // 가격
|
||||
$str .= "^{$row['it_point']}"; // 적립금
|
||||
$str .= "^"; // 할인쿠폰
|
||||
$str .= "^"; // 무이자할부
|
||||
$str .= "^"; // 사은품
|
||||
$str .= "^{$row['it_model']}"; // 모델명
|
||||
$str .= "^"; // 추가정보
|
||||
$str .= "^"; // 출시일
|
||||
$str .= "^$delivery"; // 배송료
|
||||
|
||||
$nl = "\n";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo $str;
|
||||
?>
|
||||
233
shop/price2/daum.php
Normal file
233
shop/price2/daum.php
Normal file
@ -0,0 +1,233 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
/*
|
||||
구분 태그명 내용 설명 크기
|
||||
1 <<<begin>>> 시작 상품시작 알림 필수
|
||||
2 <<<pid>>> 상품ID 해당사 상품 ID 필수,varchar(50)
|
||||
3 <<<price>>> 가격 상품 가격 필수,number
|
||||
4 <<<pname>>> 상품명 상품명 필수,varchar(500)
|
||||
5 <<<pgurl>>> 상품링크 해당 상품으로 갈 상품URL 필수,varchar(255)
|
||||
6 <<<igurl>>> 이미지링크 상품이미지 링크
|
||||
(상품이미지 중 제일 큰이미지링크) 필수,varchar(255)
|
||||
7 <<<cate1>>> 대분류ID 대분류 코드 필수,varchar(20)
|
||||
8 <<<cate2>>> 중분류ID 중분류 코드 varchar(20)
|
||||
9 <<<cate3>>> 소분류ID 소분류 코드 varchar(20)
|
||||
10 <<<cate4>>> 세분류ID 세분류 코드 varchar(20)
|
||||
11 <<<catename1>>> 대분류명 필수,varchar(50)
|
||||
12 <<<catename2>>> 중분류명 varchar(50)
|
||||
13 <<<catename3>>> 소분류명 varchar(50)
|
||||
14 <<<catename4>>> 세분류명 varchar(50)
|
||||
15 <<<model>>> 모델명 varchar(255)
|
||||
16 <<<brand>>> 브랜드명 varchar(255)
|
||||
17 <<<maker>>> 제조사 varchar(255)
|
||||
18 <<<pdate>>> 출시일 예) 20070101 varchar(8)
|
||||
19 <<<weight>>> 가중치값 숫자 ( 0 ~ )
|
||||
쇼핑몰대분류카테고리 기준으로
|
||||
쇼핑몰내부에서 책정되는 상품에 대한
|
||||
인기점수 Numer(14)
|
||||
20 <<<sales>>> 판매량 해당 상품이 팔린 누적판매량 number(14)
|
||||
21 <<<coupon>>> 쿠폰정보 퍼센트 쿠폰인 경우
|
||||
ex) 5%할인쿠폰 -> 5%
|
||||
일정가격할인 쿠폰인 경우
|
||||
ex) 3000원할인쿠폰 -> 3000원
|
||||
만 표기
|
||||
0%, 0원은 값을 제거 varchar(255)
|
||||
|
||||
22 <<<pcard>>> 무이자/할부 카드이름개월수 형식으로 표시
|
||||
ex) 삼성2~3/롯데3/현대6
|
||||
0개월 일 때에는 값을 제거 varchar(255)
|
||||
23 <<<point>>> 적립금/포인트 텍스트정보
|
||||
0일 때에는 값을 제거 varchar(255)
|
||||
24 <<<deliv>>> 배송비 무료일 때는 0
|
||||
유료일 때는 1
|
||||
조건부무료일 때는 2 로 표기 number
|
||||
25 <<<deliv2>>> 배송비 조건 유료(deliv필드 코드1번) or
|
||||
조건부무료(deliv필드 코드2번)
|
||||
인 경우에 상세 조건 표기
|
||||
ex)3만원미만무료 or 2500원 varchar(20)
|
||||
26 <<<review>>> 상품평수 상품의 상품평개수가 몇 개인지 숫자만 표기 number
|
||||
27 <<<event>>> 이벤트 해당 상품의 이벤트 내용을 표기
|
||||
ex) 새봄맞이 행복이벤트! 새출발 아이템 50%SALE
|
||||
신규회원 5%+전상품 3%할인쿠폰 varchar(255)
|
||||
28 <<<eventurl>>> 이벤트url event 페이지 URL varchar(255)
|
||||
29 <<<sellername>>> 실판매자샵명 실제로 상품을 판매하고있는 판매자샵 이름 표기 (판매샵의 대표자명이 아니라 판매샵명)
|
||||
판매자샵명이 없는 경우에는 판매자아이디로 표기 (자체판매하는 경우에는 표기X) varchar(20)
|
||||
30 <<<sellershop>>> 실판매자샵주소 판매자의 미니샵 주소 or 판매자샵주소
|
||||
(자체판매하는 경우에는 표기X) varchar(50)
|
||||
31 <<<sellergrade>>> 실판매자등급 판매자등급을 5점 만점기준으로
|
||||
(자체판매하는 경우에는 표기X) number
|
||||
32 <<<end>>> 끝알림 끝알림 태그 필수
|
||||
*/
|
||||
|
||||
$lt = "<<<";
|
||||
$gt = ">>>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음') {
|
||||
$deliv = 0;
|
||||
$deliv2 = "";
|
||||
}
|
||||
else if($default['de_send_cost_case'] == '상한') {
|
||||
$deliv = 1;
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
$cost_limit = (int)$send_cost_limit[0];
|
||||
$deliv2 = (int)$send_cost_list[0]."원";
|
||||
}
|
||||
|
||||
$sql =" select * from {$g4['shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$cate1 = $cate2 = $cate3 = $cate4 = "";
|
||||
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,2)."' ");
|
||||
$cate1 = $row2['ca_id'];
|
||||
$catename1 = $row2['ca_name'];
|
||||
|
||||
$cate2 = $cate3 = $cate4 = "";
|
||||
$catename2 = $catename3 = $catename4 = "";
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,8)."' ");
|
||||
$cate4 = $row2['ca_id'];
|
||||
$catename4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,6)."' ");
|
||||
$cate3 = $row2['ca_id'];
|
||||
$catename3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$row2 = sql_fetch(" select ca_id, ca_name from {$g4['shop_category_table']} where ca_id = '".substr($row['ca_id'],0,4)."' ");
|
||||
$cate2 = $row2['ca_id'];
|
||||
$catename2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
// 배송비 상한가 미만이면 배송비 적용
|
||||
$delivery = 0;
|
||||
if ($row['it_price'] < $cost_limit) {
|
||||
$delivery = $send_cost;
|
||||
}
|
||||
|
||||
$pdate = date("Ymd", strtotime($row['it_time']));
|
||||
$point = ($row['it_point'] <= 0) ? "" : (int)$row['it_point'];
|
||||
|
||||
// 개별배송비계산
|
||||
if($default['de_send_cost_case'] == '개별') {
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
if($delivery) {
|
||||
$deliv = $delivery;
|
||||
$deliv2 = $delivery.'원';
|
||||
} else {
|
||||
$deliv = 0;
|
||||
$deliv2 = "";
|
||||
}
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
|
||||
if($delivery) {
|
||||
$deliv = $delivery;
|
||||
$deliv2 = $delivery.'원';
|
||||
} else {
|
||||
$deliv = 0;
|
||||
$deliv2 = "";
|
||||
}
|
||||
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
{$lt}pid{$gt}{$row['it_id']}
|
||||
{$lt}price{$gt}$it_price
|
||||
{$lt}pname{$gt}$it_name
|
||||
{$lt}pgurl{$gt}$buy_url
|
||||
{$lt}igurl{$gt}$img_url
|
||||
{$lt}cate1{$gt}$cate1
|
||||
{$lt}cate2{$gt}$cate2
|
||||
{$lt}cate3{$gt}$cate3
|
||||
{$lt}cate4{$gt}$cate4
|
||||
{$lt}catename1{$gt}$catename1
|
||||
{$lt}catename2{$gt}$catename2
|
||||
{$lt}catename3{$gt}$catename3
|
||||
{$lt}catename4{$gt}$catename4
|
||||
{$lt}maker{$gt}{$row['it_maker']}
|
||||
{$lt}pdate{$gt}$pdate
|
||||
{$lt}point{$gt}$point
|
||||
{$lt}deliv{$gt}$deliv
|
||||
{$lt}deliv2{$gt}$deliv2
|
||||
{$lt}end{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
if($delivery) {
|
||||
$deliv = $delivery;
|
||||
$deliv2 = $delivery.'원';
|
||||
} else {
|
||||
$deliv = 0;
|
||||
$deliv2 = "";
|
||||
}
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
{$lt}pid{$gt}{$row['it_id']}
|
||||
{$lt}price{$gt}$it_price
|
||||
{$lt}pname{$gt}$it_name
|
||||
{$lt}pgurl{$gt}$buy_url
|
||||
{$lt}igurl{$gt}$img_url
|
||||
{$lt}cate1{$gt}$cate1
|
||||
{$lt}cate2{$gt}$cate2
|
||||
{$lt}cate3{$gt}$cate3
|
||||
{$lt}cate4{$gt}$cate4
|
||||
{$lt}catename1{$gt}$catename1
|
||||
{$lt}catename2{$gt}$catename2
|
||||
{$lt}catename3{$gt}$catename3
|
||||
{$lt}catename4{$gt}$catename4
|
||||
{$lt}maker{$gt}{$row['it_maker']}
|
||||
{$lt}pdate{$gt}$pdate
|
||||
{$lt}point{$gt}$point
|
||||
{$lt}deliv{$gt}$deliv
|
||||
{$lt}deliv2{$gt}$deliv2
|
||||
{$lt}end{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
206
shop/price2/enuri.php
Normal file
206
shop/price2/enuri.php
Normal file
@ -0,0 +1,206 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 에누리 엔진페이지
|
||||
*/
|
||||
@extract($_GET);
|
||||
|
||||
function paging($write_pages, $cur_page, $total_page, $url )
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
$str = "";
|
||||
|
||||
if ($cur_page > 1)
|
||||
{
|
||||
$str .= "<a href='" . $url . ($cur_page-1) . "'>◀</a>";
|
||||
}
|
||||
|
||||
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
|
||||
$end_page = $start_page + $write_pages - 1;
|
||||
|
||||
if ($end_page >= $total_page) $end_page = $total_page;
|
||||
|
||||
if ($start_page > 1)
|
||||
$str .= "<a href='" . $url . ($start_page-1) . "'>...</a>";
|
||||
|
||||
if ($total_page > 1)
|
||||
for ($k=$start_page;$k<=$end_page;$k++)
|
||||
if ($cur_page != $k)
|
||||
$str .= "[<a href='$url$k'>$k</a>]";
|
||||
else
|
||||
$str .= " <b>$k</b> ";
|
||||
|
||||
if ($total_page > $end_page)
|
||||
$str .= "<a href='" . $url . ($end_page+1) . "'>...</a>";
|
||||
|
||||
if ($cur_page < $total_page)
|
||||
{
|
||||
$str .= "<a href='$url" . ($cur_page+1) . "'>▶</a>";
|
||||
}
|
||||
$str .= "";
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
include_once('./_common.php');
|
||||
|
||||
// 페이지당 행수
|
||||
$page_rows = 1000;
|
||||
|
||||
$sql = " select count(*) as cnt from {$g4['shop_item_table']} where it_use = '1' and ca_id LIKE '$ca_id%'";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
?>
|
||||
<html>
|
||||
<title>에누리 엔진페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
A:link {text-decoration: underline; color:steelblue}
|
||||
A:visited {text-decoration: none; color:steelblue}
|
||||
A:hover {text-decoration: underline; color:RoyalBlue}
|
||||
font {font-family:굴림; font-size:10pt}
|
||||
th,td {font-family:굴림; font-size:10pt ; height:15pt}
|
||||
|
||||
//-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p align=center>상품수 : <?php echo number_format($total_count); ?> 개
|
||||
|
||||
<table border="0" cellspacing="1" cellpadding="5" bgcolor="black" width="90%" align='center'>
|
||||
<tr bgcolor="#ededed" align=center>
|
||||
<td>번호</td>
|
||||
<td>제품명</td>
|
||||
<td>가격</td>
|
||||
<td>재고유무</td>
|
||||
<td>배송</td>
|
||||
<td>웹상품이미지</td>
|
||||
<td>할인쿠폰</td>
|
||||
<td>계산서</td>
|
||||
<td>제조사</td>
|
||||
<td>상품코드</td>
|
||||
</tr>
|
||||
<?php
|
||||
// 전체 페이지 계산
|
||||
$total_page = ceil($total_count / $page_rows);
|
||||
// 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$caid = addslashes($ca_id);
|
||||
$sql = " select * from {$g4['shop_item_table']}
|
||||
where it_use = '1'
|
||||
and ca_id LIKE '$caid%'
|
||||
order by ca_id
|
||||
limit $from_record, $page_rows ";
|
||||
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = (($page - 1) * $page_rows) + $i + 1;
|
||||
|
||||
if ($default['de_send_cost_case'] == '없음')
|
||||
$send_cost = '무료';
|
||||
else if($default['de_send_cost_case'] == '상한')
|
||||
$send_cost = '유료';
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
if($delivery)
|
||||
$send_cost = '유료';
|
||||
else
|
||||
$send_cost = '무료';
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
$stock = get_it_stock_qty($row['it_id']);
|
||||
if ($stock)
|
||||
$stock = "재고있음";
|
||||
else
|
||||
$stock = "재고없음";
|
||||
|
||||
echo '
|
||||
<tr bgcolor="white">
|
||||
<td align="center">'.$num.'</td>
|
||||
<td><a href="'.$buy_url.'">'.$it_name.'</a></td>
|
||||
<td align="center">'.number_format($it_price).'</td>
|
||||
<td align="center">'.$stock.'</td>
|
||||
<td align="center">'.$send_cost.'</td>
|
||||
<td align="center">'.$img_url.'</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">N</td>
|
||||
<td align="center">'.get_text($row['it_maker']).'</td>
|
||||
<td align="center">'.$row['it_id'].'</td>
|
||||
</tr>
|
||||
';
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
if($delivery)
|
||||
$send_cost = '유료';
|
||||
else
|
||||
$send_cost = '무료';
|
||||
|
||||
$stock = get_option_stock_qty($row['it_id'], $row2['io_id'], 0);
|
||||
if ($stock)
|
||||
$stock = "재고있음";
|
||||
else
|
||||
$stock = "재고없음";
|
||||
|
||||
echo '
|
||||
<tr bgcolor="white">
|
||||
<td align="center">'.$num.'</td>
|
||||
<td><a href="'.$buy_url.'">'.$it_name.'</a></td>
|
||||
<td align="center">'.number_format($it_price).'</td>
|
||||
<td align="center">'.$stock.'</td>
|
||||
<td align="center">'.$send_cost.'</td>
|
||||
<td align="center">'.$img_url.'</td>
|
||||
<td align="center">1</td>
|
||||
<td align="center">N</td>
|
||||
<td align="center">'.get_text($row['it_maker']).'</td>
|
||||
<td align="center">'.$row['it_id'].'</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
|
||||
<p align=center>
|
||||
<?php echo paging(1000, $page, $total_page, "./enuri.php?ca_id=$caid&page="); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
72
shop/price2/enuri_list.php
Normal file
72
shop/price2/enuri_list.php
Normal file
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 에누리 분류페이지
|
||||
*/
|
||||
include_once('./_common.php');
|
||||
?>
|
||||
<html>
|
||||
<title>에누리 분류페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
A:link {text-decoration: underline; color:steelblue}
|
||||
A:visited {text-decoration: none; color:steelblue}
|
||||
A:hover {text-decoration: underline; color:RoyalBlue}
|
||||
font {font-family:굴림; font-size:10pt}
|
||||
th,td {font-family:굴림; font-size:10pt ; height:15pt}
|
||||
|
||||
//-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="1" cellpadding="5" bgcolor="black" width="91%" align='center'>
|
||||
<tr bgcolor="#ededed">
|
||||
<th width=60 align='center'>대분류</th>
|
||||
<th>중분류</th>
|
||||
</tr>
|
||||
<tr bgcolor="white">
|
||||
|
||||
<?php
|
||||
$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
|
||||
|
||||
$sql =" SELECT LENGTH(ca_id)=2 AS cnt, ca_id
|
||||
FROM {$g4['shop_category_table']}
|
||||
HAVING cnt";
|
||||
$result = @mysql_query($sql);
|
||||
|
||||
$tr = "";
|
||||
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '".$row['ca_id']."'");
|
||||
echo $tr;
|
||||
echo " <td align=center><a href='./enuri.php?ca_id={$row['ca_id']}'>{$row2['ca_name']}</a></td>\n";
|
||||
$str = " <td>";
|
||||
$sql3 = "select ca_name,ca_id from {$g4['shop_category_table']} where ca_id LIKE '".$row['ca_id']."%' AND LENGTH(ca_id) !=2 AND LENGTH(ca_id) < 5";
|
||||
$result3 = @mysql_query($sql3);
|
||||
|
||||
$bar = "";
|
||||
|
||||
for ($j=0;$row3=mysql_fetch_array($result3);$j++)
|
||||
{
|
||||
$str .= $bar;
|
||||
$str .= "<a href=\"./enuri.php?ca_id={$row3['ca_id']}\">{$row3['ca_name']}</a>";
|
||||
$bar = " | \n";
|
||||
}
|
||||
|
||||
$str .= " </td>\n";
|
||||
|
||||
echo $str;
|
||||
|
||||
$tr = " </tr>\n <tr bgcolor=\"white\">\n";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
175
shop/price2/mymargin.php
Normal file
175
shop/price2/mymargin.php
Normal file
@ -0,0 +1,175 @@
|
||||
<?php
|
||||
/*
|
||||
** 가격비교사이트 마이마진 엔진페이지
|
||||
*/
|
||||
@extract($_GET);
|
||||
|
||||
function paging($write_pages, $cur_page, $total_page, $url)
|
||||
{
|
||||
global $cfg;
|
||||
|
||||
$str = "";
|
||||
|
||||
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
|
||||
$end_page = $start_page + $write_pages - 1;
|
||||
|
||||
if ($end_page >= $total_page) $end_page = $total_page;
|
||||
|
||||
if ($start_page > 1)
|
||||
$str .= "<a href='" . $url . ($start_page-1) . "'>...</a>";
|
||||
|
||||
if ($total_page > 1)
|
||||
for ($k=$start_page;$k<=$end_page;$k++)
|
||||
if ($cur_page != $k)
|
||||
$str .= "[<a href='$url$k'>$k</a>]";
|
||||
else
|
||||
$str .= " <b>$k</b> ";
|
||||
|
||||
if ($total_page > $end_page)
|
||||
$str .= "<a href='" . $url . ($end_page+1) . "'>...</a>";
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
function it_image($img)
|
||||
{
|
||||
global $g4;
|
||||
|
||||
$tmp = G4_DATA_PATH.'/item/'.$img;
|
||||
if (file_exists($tmp) && $img) {
|
||||
$str = G4_DATA_URL.'/item/'.$img;
|
||||
} else {
|
||||
$str = G4_SHOP_URL.'/img/no_image.gif';
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
include_once('./_common.php');
|
||||
|
||||
// 페이지당 행수
|
||||
$page_rows = 100;
|
||||
|
||||
$sql = " select count(*) as cnt from {$g4['shop_item_table']} where it_use = '1' ";
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
?>
|
||||
<html>
|
||||
<title>마이마진 엔진페이지</title>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="0"/>
|
||||
<meta http-equiv="Pragma" content="no-cache"/>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body, td {font-family:굴림; font-size:10pt;}
|
||||
|
||||
//-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>일련번호</td>
|
||||
<td>제품코드</td>
|
||||
<td>제품명</td>
|
||||
<td>제품가격</td>
|
||||
<td>상품분류</td>
|
||||
<td>제조사</td>
|
||||
<td>이미지</td>
|
||||
</tr>
|
||||
<?php
|
||||
// 전체 페이지 계산
|
||||
$total_page = ceil($total_count / $page_rows);
|
||||
// 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
if ($page == "") $page = 1;
|
||||
// 시작 레코드 구함
|
||||
$from_record = ($page - 1) * $page_rows;
|
||||
|
||||
$sql = " select * from {$g4['shop_item_table']}
|
||||
where it_use = '1'
|
||||
order by ca_id
|
||||
limit $from_record, $page_rows ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++)
|
||||
{
|
||||
$num = (($page - 1) * $page_rows) + $i;
|
||||
|
||||
$category = $bar = "";
|
||||
$len = strlen($row['ca_id']) / 2;
|
||||
for ($k=1; $k<=$len; $k++)
|
||||
{
|
||||
$code = substr($row['ca_id'],0,$k*2);
|
||||
|
||||
$sql3 = " select ca_name from {$g4['shop_category_table']} where ca_id = '$code' ";
|
||||
$row3 = sql_fetch($sql3);
|
||||
|
||||
$category .= $bar . $row3['ca_name'];
|
||||
$bar = "/";
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$image = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td>$num</td>
|
||||
<td>{$row['it_id']}</td>
|
||||
<td><a href='".$buy_url."'>{$it_name}</a></td>
|
||||
<td>{$it_price}</td>
|
||||
<td>$category</td>
|
||||
<td>{$row['it_maker']}</td>
|
||||
<td>$image</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td>$num</td>
|
||||
<td>{$row['it_id']}</td>
|
||||
<td><a href='".$buy_url."'>{$it_name}</a></td>
|
||||
<td>{$it_price}</td>
|
||||
<td>$category</td>
|
||||
<td>{$row['it_maker']}</td>
|
||||
<td>$image</td>
|
||||
</tr>
|
||||
";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td colspan=7><?php echo paging(1000, $page, $total_page, "./mymargin.php?page="); ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
196
shop/price2/naver.php
Normal file
196
shop/price2/naver.php
Normal file
@ -0,0 +1,196 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
네이버지식쇼핑상품EP (Engine Page) 제작및연동가이드 (제휴사제공용)
|
||||
http://imgshopping.naver.net/admin/join/download/db_url/db_url_guide_20101205.pdf
|
||||
|
||||
Field Status Notes
|
||||
<<<begin>>> 필수 상품의 시작을 알리는 필드
|
||||
<<<mapid>>> 필수 판매하는 상품의 유니크한 상품ID
|
||||
<<<pname>>> 필수 실제 서비스에 반영될 상품명(Title)
|
||||
<<<price>>> 필수 해당 상품의 판매가격
|
||||
<<<pgurl>>> 필수 해당 상품을 구매할 수 있는 상품URL
|
||||
<<<igurl>>> 필수 해당 상품의 이미지URL
|
||||
<<<cate1>>> 필수 판매하는 상품의 카테고리명(대분류)
|
||||
<<<cate2>>> 선택 판매하는 상품의 카테고리명(중분류)
|
||||
<<<cate3>>> 선택 판매하는 상품의 카테고리명(소분류)
|
||||
<<<cate4>>> 선택 판매하는 상품의 카테고리명(세분류)
|
||||
<<<caid1>>> 필수 판매하는 상품의 카테고리명(대분류)
|
||||
<<<caid2>>> 선택 판매하는 상품의 카테고리명(중분류)
|
||||
<<<caid3>>> 선택 판매하는 상품의 카테고리명(소분류)
|
||||
<<<caid4>>> 선택 판매하는 상품의 카테고리명(세분류)
|
||||
<<<model>>> 선택 모델명
|
||||
<<<brand>>> 선택 브랜드
|
||||
<<<maker>>> 선택 제조사
|
||||
<<<origi>>> 선택 원산지
|
||||
<<<deliv>>> 필수 배송료
|
||||
<<<event>>> 선택 이벤트
|
||||
<<<coupo>>> 선택 쿠폰
|
||||
<<<pcard>>> 선택 무이자
|
||||
<<<point>>> 선택 포인트
|
||||
<<<mvurl>>> 선택 동영상 상품 여부
|
||||
<<<selid>>> 선택 셀러 ID (오픈마켓에 한함)
|
||||
<<<barcode>>> 선택 바코드 (전체EP만 사용)
|
||||
<<<ftend>>> 필수 상품의 마지막을 알리는 필드
|
||||
*/
|
||||
|
||||
$lt = "<<<";
|
||||
$gt = ">>>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음') {
|
||||
$send_cost = 0;
|
||||
}
|
||||
else if($default['de_send_cost_case'] == '상한') {
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
$cost_limit = (int)$send_cost_limit[0];
|
||||
$send_cost = (int)$send_cost_list[0];
|
||||
}
|
||||
|
||||
$sql =" select * from {$g4['shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$cate1 = $cate2 = $cate3 = $cate4 = "";
|
||||
$caid1 = $caid2 = $caid3 = $caid4 = "";
|
||||
|
||||
$caid1 = substr($row['ca_id'],0,2);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$caid1' ");
|
||||
$cate1 = $row2['ca_name'];
|
||||
|
||||
$caid2 = $caid3 = $caid4 = "";
|
||||
$cate2 = $cate3 = $cate4 = "";
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$caid4 = substr($row['ca_id'],0,8);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$caid4' ");
|
||||
$cate4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$caid3 = substr($row['ca_id'],0,6);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$caid3' ");
|
||||
$cate3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$caid2 = substr($row['ca_id'],0,4);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$caid2' ");
|
||||
$cate2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 배송비 상한가 미만이면 배송비 적용
|
||||
$delivery = 0;
|
||||
if ($default['de_send_cost_case'] == '상한' && $row['it_price'] < $cost_limit) {
|
||||
$delivery = $send_cost;
|
||||
}
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
{$lt}mapid{$gt}{$row['it_id']}
|
||||
{$lt}pname{$gt}$it_name
|
||||
{$lt}price{$gt}$it_price
|
||||
{$lt}pgurl{$gt}$buy_url
|
||||
{$lt}igurl{$gt}$img_url
|
||||
{$lt}cate1{$gt}$cate1
|
||||
{$lt}cate2{$gt}$cate2
|
||||
{$lt}cate3{$gt}$cate3
|
||||
{$lt}cate4{$gt}$cate4
|
||||
{$lt}caid1{$gt}$caid1
|
||||
{$lt}caid2{$gt}$caid2
|
||||
{$lt}caid3{$gt}$caid3
|
||||
{$lt}caid4{$gt}$caid4
|
||||
{$lt}model{$gt}
|
||||
{$lt}brand{$gt}
|
||||
{$lt}maker{$gt}{$row['it_maker']}
|
||||
{$lt}origi{$gt}{$row['it_origin']}
|
||||
{$lt}deliv{$gt}$delivery
|
||||
{$lt}event{$gt}
|
||||
{$lt}coupo{$gt}
|
||||
{$lt}pcard{$gt}
|
||||
{$lt}point{$gt}{$row['it_point']}
|
||||
{$lt}mvurl{$gt}
|
||||
{$lt}selid{$gt}
|
||||
{$lt}barcode{$gt}
|
||||
{$lt}ftend{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
{$lt}mapid{$gt}{$row['it_id']}
|
||||
{$lt}pname{$gt}$it_name
|
||||
{$lt}price{$gt}$it_price
|
||||
{$lt}pgurl{$gt}$buy_url
|
||||
{$lt}igurl{$gt}$img_url
|
||||
{$lt}cate1{$gt}$cate1
|
||||
{$lt}cate2{$gt}$cate2
|
||||
{$lt}cate3{$gt}$cate3
|
||||
{$lt}cate4{$gt}$cate4
|
||||
{$lt}caid1{$gt}$caid1
|
||||
{$lt}caid2{$gt}$caid2
|
||||
{$lt}caid3{$gt}$caid3
|
||||
{$lt}caid4{$gt}$caid4
|
||||
{$lt}model{$gt}
|
||||
{$lt}brand{$gt}
|
||||
{$lt}maker{$gt}{$row['it_maker']}
|
||||
{$lt}origi{$gt}{$row['it_origin']}
|
||||
{$lt}deliv{$gt}$delivery
|
||||
{$lt}event{$gt}
|
||||
{$lt}coupo{$gt}
|
||||
{$lt}pcard{$gt}
|
||||
{$lt}point{$gt}{$row['it_point']}
|
||||
{$lt}mvurl{$gt}
|
||||
{$lt}selid{$gt}
|
||||
{$lt}barcode{$gt}
|
||||
{$lt}ftend{$gt}
|
||||
|
||||
HEREDOC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
198
shop/price2/naver_new.php
Normal file
198
shop/price2/naver_new.php
Normal file
@ -0,0 +1,198 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
// 신규상품URL은 전체 상품정보 양식에 맞춰서 해당날짜에 추가된 상품만 출력
|
||||
|
||||
/*
|
||||
네이버지식쇼핑상품EP (Engine Page) 제작및연동가이드 (제휴사제공용)
|
||||
http://imgshopping.naver.net/admin/join/download/db_url/db_url_guide_20101205.pdf
|
||||
|
||||
Field Status Notes
|
||||
<<<begin>>> 필수 상품의 시작을 알리는 필드
|
||||
<<<mapid>>> 필수 판매하는 상품의 유니크한 상품ID
|
||||
<<<pname>>> 필수 실제 서비스에 반영될 상품명(Title)
|
||||
<<<price>>> 필수 해당 상품의 판매가격
|
||||
<<<pgurl>>> 필수 해당 상품을 구매할 수 있는 상품URL
|
||||
<<<igurl>>> 필수 해당 상품의 이미지URL
|
||||
<<<cate1>>> 필수 판매하는 상품의 카테고리명(대분류)
|
||||
<<<cate2>>> 선택 판매하는 상품의 카테고리명(중분류)
|
||||
<<<cate3>>> 선택 판매하는 상품의 카테고리명(소분류)
|
||||
<<<cate4>>> 선택 판매하는 상품의 카테고리명(세분류)
|
||||
<<<caid1>>> 필수 판매하는 상품의 카테고리명(대분류)
|
||||
<<<caid2>>> 선택 판매하는 상품의 카테고리명(중분류)
|
||||
<<<caid3>>> 선택 판매하는 상품의 카테고리명(소분류)
|
||||
<<<caid4>>> 선택 판매하는 상품의 카테고리명(세분류)
|
||||
<<<model>>> 선택 모델명
|
||||
<<<brand>>> 선택 브랜드
|
||||
<<<maker>>> 선택 제조사
|
||||
<<<origi>>> 선택 원산지
|
||||
<<<deliv>>> 필수 배송료
|
||||
<<<event>>> 선택 이벤트
|
||||
<<<coupo>>> 선택 쿠폰
|
||||
<<<pcard>>> 선택 무이자
|
||||
<<<point>>> 선택 포인트
|
||||
<<<mvurl>>> 선택 동영상 상품 여부
|
||||
<<<selid>>> 선택 셀러 ID (오픈마켓에 한함)
|
||||
<<<barcode>>> 선택 바코드 (전체EP만 사용)
|
||||
<<<ftend>>> 필수 상품의 마지막을 알리는 필드
|
||||
*/
|
||||
|
||||
$lt = "<<<";
|
||||
$gt = ">>>";
|
||||
|
||||
// 배송비
|
||||
if ($default['de_send_cost_case'] == '없음') {
|
||||
$send_cost = 0;
|
||||
}
|
||||
else if($default['de_send_cost_case'] == '상한') {
|
||||
// 배송비 상한일 경우 제일 앞에 배송비
|
||||
$send_cost_limit = explode(";", $default['de_send_cost_limit']);
|
||||
$send_cost_list = explode(";", $default['de_send_cost_list']);
|
||||
$cost_limit = (int)$send_cost_limit[0];
|
||||
$send_cost = (int)$send_cost_list[0];
|
||||
}
|
||||
|
||||
// 하루전의 상품
|
||||
$time = date("Y-m-d 00:00:00", G4_SERVER_TIME - 86400);
|
||||
$sql =" select * from {$g4['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$cate1 = $cate2 = $cate3 = $cate4 = "";
|
||||
$caid1 = $caid2 = $caid3 = $caid4 = "";
|
||||
|
||||
$caid1 = substr($row['ca_id'],0,2);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$caid1' ");
|
||||
$cate1 = $row2['ca_name'];
|
||||
|
||||
if (strlen($row['ca_id']) >= 8) {
|
||||
$caid4 = substr($row['ca_id'],0,8);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$caid4' ");
|
||||
$cate4 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 6) {
|
||||
$caid3 = substr($row['ca_id'],0,6);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$caid3' ");
|
||||
$cate3 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
if (strlen($row['ca_id']) >= 4) {
|
||||
$caid2 = substr($row['ca_id'],0,4);
|
||||
$row2 = sql_fetch(" select ca_name from {$g4['shop_category_table']} where ca_id = '$caid2' ");
|
||||
$cate2 = $row2['ca_name'];
|
||||
}
|
||||
|
||||
// 배송비 상한가 미만이면 배송비 적용
|
||||
$delivery = 0;
|
||||
if ($row['it_price'] < $cost_limit) {
|
||||
$delivery = $send_cost;
|
||||
}
|
||||
|
||||
// 상품이미지
|
||||
$img_url = get_it_imageurl($row['it_id']);
|
||||
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], $row['it_price'], 1);
|
||||
$it_price = $row['it_price'];
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
{$lt}mapid{$gt}{$row['it_id']}
|
||||
{$lt}pname{$gt}$it_name
|
||||
{$lt}price{$gt}$it_price
|
||||
{$lt}pgurl{$gt}$buy_url
|
||||
{$lt}igurl{$gt}$img_url
|
||||
{$lt}cate1{$gt}$cate1
|
||||
{$lt}cate2{$gt}$cate2
|
||||
{$lt}cate3{$gt}$cate3
|
||||
{$lt}cate4{$gt}$cate4
|
||||
{$lt}caid1{$gt}$caid1
|
||||
{$lt}caid2{$gt}$caid2
|
||||
{$lt}caid3{$gt}$caid3
|
||||
{$lt}caid4{$gt}$caid4
|
||||
{$lt}model{$gt}
|
||||
{$lt}brand{$gt}
|
||||
{$lt}maker{$gt}{$row['it_maker']}
|
||||
{$lt}origi{$gt}{$row['it_origin']}
|
||||
{$lt}deliv{$gt}$delivery
|
||||
{$lt}event{$gt}
|
||||
{$lt}coupo{$gt}
|
||||
{$lt}pcard{$gt}
|
||||
{$lt}point{$gt}{$row['it_point']}
|
||||
{$lt}mvurl{$gt}
|
||||
{$lt}selid{$gt}
|
||||
{$lt}barcode{$gt}
|
||||
{$lt}ftend{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$buy_url = G4_SHOP_URL.'/itembuy.php?it_id='.$row['it_id'].'&opt='.$row2['io_id'];
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
if($default['de_send_cost_case'] == '개별' && $row['it_sc_method'] != 1)
|
||||
$delivery = get_item_sendcost($row['it_id'], ($row['it_price'] + $row2['io_price']), 1);
|
||||
|
||||
echo <<< HEREDOC
|
||||
{$lt}begin{$gt}
|
||||
{$lt}mapid{$gt}{$row['it_id']}
|
||||
{$lt}pname{$gt}$it_name
|
||||
{$lt}price{$gt}$it_price
|
||||
{$lt}pgurl{$gt}$buy_url
|
||||
{$lt}igurl{$gt}$img_url
|
||||
{$lt}cate1{$gt}$cate1
|
||||
{$lt}cate2{$gt}$cate2
|
||||
{$lt}cate3{$gt}$cate3
|
||||
{$lt}cate4{$gt}$cate4
|
||||
{$lt}caid1{$gt}$caid1
|
||||
{$lt}caid2{$gt}$caid2
|
||||
{$lt}caid3{$gt}$caid3
|
||||
{$lt}caid4{$gt}$caid4
|
||||
{$lt}model{$gt}
|
||||
{$lt}brand{$gt}
|
||||
{$lt}maker{$gt}{$row['it_maker']}
|
||||
{$lt}origi{$gt}{$row['it_origin']}
|
||||
{$lt}deliv{$gt}$delivery
|
||||
{$lt}event{$gt}
|
||||
{$lt}coupo{$gt}
|
||||
{$lt}pcard{$gt}
|
||||
{$lt}point{$gt}{$row['it_point']}
|
||||
{$lt}mvurl{$gt}
|
||||
{$lt}selid{$gt}
|
||||
{$lt}barcode{$gt}
|
||||
{$lt}ftend{$gt}
|
||||
|
||||
HEREDOC;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
97
shop/price2/naver_new_summary.php
Normal file
97
shop/price2/naver_new_summary.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
// 신규상품요약URL은 요약 상품정보 양식에 맞춰서 해당날짜에 추가된 상품만 출력
|
||||
|
||||
/*
|
||||
요약 상품페이지
|
||||
|
||||
Field Status Notes
|
||||
<<<begin>>> 필수 상품의 시작을 알리는 필드
|
||||
<<<mapid>>> 판매하는 상품의 유니크한 상품ID
|
||||
<<<pname>>> 실제 서비스에 반영될 상품명(Title)
|
||||
<<<price>>> 해당 상품의 판매가격
|
||||
<<<class>>> I(신규상품) / U (업데이트상품) / D (품절상품)
|
||||
<<<utime>>> 상품정보 생성 시각
|
||||
<<<ftend>>> 필수 상품의 마지막을 알리는 필드
|
||||
*/
|
||||
|
||||
$lt = "<<<";
|
||||
$gt = ">>>";
|
||||
|
||||
$time = date("Y-m-d 00:00:00", G4_SERVER_TIME - 86400);
|
||||
$sql =" select * from {$g4['shop_item_table']} where it_use = '1' and it_time >= '$time' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$it_price = $row['it_price'];
|
||||
$stock_qty = get_it_stock_qty($row['it_id']);
|
||||
|
||||
echo "{$lt}begin{$gt}\n";
|
||||
echo "{$lt}mapid{$gt}{$row['it_id']}\n";
|
||||
if ($stock_qty <= 0)
|
||||
{
|
||||
// 품절 상품 양식
|
||||
echo "{$lt}class{$gt}D\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
// 업데이트 상품 양식 & 품절 복구 상품 양식
|
||||
echo "{$lt}pname{$gt}{$it_name}\n";
|
||||
echo "{$lt}price{$gt}{$it_price}\n";
|
||||
echo "{$lt}class{$gt}U\n";
|
||||
}
|
||||
echo "{$lt}utime{$gt}{$row['it_time']}\n";
|
||||
echo "{$lt}ftend{$gt}\n";
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
$stock_qty = get_option_stock_qty($row['it_id'], $row2['io_id'], 0);
|
||||
|
||||
echo "{$lt}begin{$gt}\n";
|
||||
echo "{$lt}mapid{$gt}{$row['it_id']}\n";
|
||||
if ($stock_qty <= 0)
|
||||
{
|
||||
// 품절 상품 양식
|
||||
echo "{$lt}class{$gt}D\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
// 업데이트 상품 양식 & 품절 복구 상품 양식
|
||||
echo "{$lt}pname{$gt}{$it_name}\n";
|
||||
echo "{$lt}price{$gt}{$it_price}\n";
|
||||
echo "{$lt}class{$gt}U\n";
|
||||
}
|
||||
echo "{$lt}utime{$gt}{$row['it_time']}\n";
|
||||
echo "{$lt}ftend{$gt}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
95
shop/price2/naver_summary.php
Normal file
95
shop/price2/naver_summary.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
ob_start();
|
||||
|
||||
/*
|
||||
요약 상품페이지
|
||||
|
||||
Field Status Notes
|
||||
<<<begin>>> 필수 상품의 시작을 알리는 필드
|
||||
<<<mapid>>> 판매하는 상품의 유니크한 상품ID
|
||||
<<<pname>>> 실제 서비스에 반영될 상품명(Title)
|
||||
<<<price>>> 해당 상품의 판매가격
|
||||
<<<class>>> I(신규상품) / U (업데이트상품) / D (품절상품)
|
||||
<<<utime>>> 상품정보 생성 시각
|
||||
<<<ftend>>> 필수 상품의 마지막을 알리는 필드
|
||||
*/
|
||||
|
||||
$lt = "<<<";
|
||||
$gt = ">>>";
|
||||
|
||||
$sql =" select it_id, it_name, it_price, it_time from {$g4['shop_item_table']} where it_use = '1' order by ca_id";
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
// 상품별옵션
|
||||
$sql = " select * from {$g4['shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' and io_use = '1' order by io_no asc ";
|
||||
$result2 = sql_query($sql);
|
||||
$opt_count = @mysql_num_rows($result2);
|
||||
|
||||
if(!$opt_count) {
|
||||
$it_name = $row['it_name'];
|
||||
$it_price = $row['it_price'];
|
||||
$stock_qty = get_it_stock_qty($row['it_id']);
|
||||
|
||||
echo "{$lt}begin{$gt}\n";
|
||||
echo "{$lt}mapid{$gt}{$row['it_id']}\n";
|
||||
if ($stock_qty <= 0)
|
||||
{
|
||||
// 품절 상품 양식
|
||||
echo "{$lt}class{$gt}D\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
// 업데이트 상품 양식 & 품절 복구 상품 양식
|
||||
echo "{$lt}pname{$gt}{$it_name}\n";
|
||||
echo "{$lt}price{$gt}{$it_price}\n";
|
||||
echo "{$lt}class{$gt}U\n";
|
||||
}
|
||||
echo "{$lt}utime{$gt}{$row['it_time']}\n";
|
||||
echo "{$lt}ftend{$gt}\n";
|
||||
|
||||
} else {
|
||||
$subj = explode(',', $row['it_option_subject']);
|
||||
for($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||
$it_name = $row['it_name'].' ';
|
||||
$opt = explode(chr(30), $row2['io_id']);
|
||||
$sep = '';
|
||||
for($j=0; $j<count($subj); $j++) {
|
||||
$it_name .= $sep.$subj[$j].':'.$opt[$j];
|
||||
$sep = ' ';
|
||||
}
|
||||
$it_price = $row['it_price'] + $row2['io_price'];
|
||||
$stock_qty = get_option_stock_qty($row['it_id'], $row2['io_id'], 0);
|
||||
|
||||
echo "{$lt}begin{$gt}\n";
|
||||
echo "{$lt}mapid{$gt}{$row['it_id']}\n";
|
||||
if ($stock_qty <= 0)
|
||||
{
|
||||
// 품절 상품 양식
|
||||
echo "{$lt}class{$gt}D\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
// 업데이트 상품 양식 & 품절 복구 상품 양식
|
||||
echo "{$lt}pname{$gt}{$it_name}\n";
|
||||
echo "{$lt}price{$gt}{$it_price}\n";
|
||||
echo "{$lt}class{$gt}U\n";
|
||||
}
|
||||
echo "{$lt}utime{$gt}{$row['it_time']}\n";
|
||||
echo "{$lt}ftend{$gt}\n";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
// 091223 : 네이버에서는 아직 utf-8 을 지원하지 않고 있음
|
||||
$content = iconv('utf-8', 'euc-kr', $content);
|
||||
|
||||
echo $content;
|
||||
?>
|
||||
Reference in New Issue
Block a user