Merge branch 'v5.5.3'
This commit is contained in:
@ -883,7 +883,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<?php echo option_selected("", $config['cf_cert_hp'], "사용안함"); ?>
|
||||
<?php echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인"); ?>
|
||||
<?php echo option_selected("kcp", $config['cf_cert_hp'], "NHN KCP 휴대폰 본인확인"); ?>
|
||||
<?php echo option_selected("lg", $config['cf_cert_hp'], "LG유플러스 휴대폰 본인확인"); ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@ -914,8 +913,7 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcb_cd">코리아크레딧뷰로<br>KCB 회원사ID</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<?php echo help('KCB 회원사ID를 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.<br>이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.<br>아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,<br>휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.') ?>
|
||||
<input type="text" name="cf_cert_kcb_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcb_cd']); ?>" id="cf_cert_kcb_cd" class="frm_input" size="20"> <a href="http://sir.kr/main/service/b_ipin.php" target="_blank" class="btn_frmline">KCB 아이핀 서비스 신청페이지</a>
|
||||
<a href="http://sir.kr/main/service/b_cert.php" target="_blank" class="btn_frmline">KCB 휴대폰 본인확인 서비스 신청페이지</a>
|
||||
<input type="text" name="cf_cert_kcb_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcb_cd']); ?>" id="cf_cert_kcb_cd" class="frm_input" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -926,21 +924,6 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<input type="text" name="cf_cert_kcp_cd" value="<?php echo get_sanitize_input($config['cf_cert_kcp_cd']); ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.kr/main/service/p_cert.php" target="_blank" class="btn_frmline">NHN KCP 휴대폰 본인확인 서비스 신청페이지</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_lg_mid">LG유플러스 상점아이디</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<?php echo help('LG유플러스 상점아이디 중 si_를 제외한 나머지 아이디만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 상점아이디를 발급 받으실 수 있습니다.<br><strong>LG유플러스 휴대폰본인확인은 ActiveX 설치가 필요하므로 Internet Explorer 에서만 사용할 수 있습니다.</strong>') ?>
|
||||
<span class="sitecode">si_</span>
|
||||
<input type="text" name="cf_lg_mid" value="<?php echo get_sanitize_input($config['cf_lg_mid']); ?>" id="cf_lg_mid" class="frm_input" size="20"> <a href="http://sir.kr/main/service/lg_cert.php" target="_blank" class="btn_frmline">LG유플러스 본인확인 서비스 신청페이지</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_lg_mert_key">LG유플러스 MERT KEY</label></th>
|
||||
<td class="cf_cert_service">
|
||||
<?php echo help('LG유플러스 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.') ?>
|
||||
<input type="text" name="cf_lg_mert_key" value="<?php echo get_sanitize_input($config['cf_lg_mert_key']); ?>" id="cf_lg_mert_key" class="frm_input" size="40">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" class="cf_cert_service"><label for="cf_cert_limit">본인확인 이용제한</label></th>
|
||||
<td class="cf_cert_service">
|
||||
|
||||
@ -22,7 +22,7 @@ check_admin_token();
|
||||
|
||||
$cf_social_servicelist = !empty($_POST['cf_social_servicelist']) ? implode(',', $_POST['cf_social_servicelist']) : '';
|
||||
|
||||
$check_keys = array('cf_lg_mid', 'cf_lg_mert_key', 'cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key', 'cf_naver_clientid', 'cf_naver_secret', 'cf_facebook_appid', 'cf_facebook_secret', 'cf_twitter_key', 'cf_twitter_secret', 'cf_google_clientid', 'cf_google_secret', 'cf_googl_shorturl_apikey', 'cf_kakao_rest_key', 'cf_kakao_client_secret', 'cf_kakao_js_apikey', 'cf_payco_clientid', 'cf_payco_secret','cf_cert_kg_cd','cf_cert_kg_mid');
|
||||
$check_keys = array('cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_editor', 'cf_recaptcha_site_key', 'cf_recaptcha_secret_key', 'cf_naver_clientid', 'cf_naver_secret', 'cf_facebook_appid', 'cf_facebook_secret', 'cf_twitter_key', 'cf_twitter_secret', 'cf_google_clientid', 'cf_google_secret', 'cf_googl_shorturl_apikey', 'cf_kakao_rest_key', 'cf_kakao_client_secret', 'cf_kakao_js_apikey', 'cf_payco_clientid', 'cf_payco_secret','cf_cert_kg_cd','cf_cert_kg_mid');
|
||||
|
||||
foreach( $check_keys as $key ){
|
||||
if ( isset($_POST[$key]) && $_POST[$key] ){
|
||||
@ -285,8 +285,6 @@ $sql = " update {$g5['config_table']}
|
||||
cf_cert_kg_mid = '".trim($_POST['cf_cert_kg_mid'])."',
|
||||
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
|
||||
cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}',
|
||||
cf_lg_mid = '{$_POST['cf_lg_mid']}',
|
||||
cf_lg_mert_key = '{$_POST['cf_lg_mert_key']}',
|
||||
cf_cert_limit = '{$_POST['cf_cert_limit']}',
|
||||
cf_cert_req = '{$_POST['cf_cert_req']}',
|
||||
cf_sms_use = '{$_POST['cf_sms_use']}',
|
||||
|
||||
@ -140,7 +140,7 @@ $(function() {
|
||||
});
|
||||
|
||||
$(document).on("click", ".btn_del_menu", function() {
|
||||
if(!confirm("메뉴를 삭제하시겠습니까?"))
|
||||
if(!confirm("메뉴를 삭제하시겠습니까?\n메뉴 삭제후 메뉴설정의 확인 버튼을 눌러 메뉴를 저장해 주세요."))
|
||||
return false;
|
||||
|
||||
var $tr = $(this).closest("tr");
|
||||
|
||||
@ -15,7 +15,7 @@ sql_query($sql);
|
||||
|
||||
$group_code = null;
|
||||
$primary_code = null;
|
||||
$count = count($_POST['code']);
|
||||
$count = isset($_POST['code']) ? count($_POST['code']) : 0;
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
|
||||
@ -458,6 +458,8 @@ $sql = " update {$g5['config_table']}
|
||||
cf_lg_mert_key = '{$cf_lg_mert_key}' ";
|
||||
sql_query($sql);
|
||||
|
||||
run_event('shop_admin_configformupdate');
|
||||
|
||||
if( $warning_msg ){
|
||||
alert($warning_msg, "./configform.php");
|
||||
} else {
|
||||
|
||||
@ -505,7 +505,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
switch($od['od_pg']) {
|
||||
case 'lg':
|
||||
$pg_url = 'http://pgweb.uplus.co.kr';
|
||||
$pg_test = 'LG유플러스';
|
||||
$pg_test = '토스페이먼츠';
|
||||
if ($default['de_card_test']) {
|
||||
$pg_url = 'http://pgweb.uplus.co.kr/tmert';
|
||||
$pg_test .= ' 테스트 ';
|
||||
|
||||
@ -33,7 +33,7 @@ $pg_anchor = '<ul class="anchor">
|
||||
<p>사이트 명을 클릭하시면 해당 사이트로 이동합니다.</p>
|
||||
|
||||
<dl class="price_engine">
|
||||
<dt><a href="http://shopping.naver.com/" target="_blank">네이버 지식쇼핑</a></dt>
|
||||
<dt><a href="http://shopping.naver.com/" target="_blank">네이버쇼핑</a></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>입점 안내 : <a href="http://join.shopping.naver.com/join/intro.nhn" target="_blank">http://join.shopping.naver.com/join/intro.nhn</a></li>
|
||||
@ -41,6 +41,24 @@ $pg_anchor = '<ul class="anchor">
|
||||
<li>요약상품 URL : <a href="<?php echo G5_SHOP_URL; ?>/price/naver_summary.php" target="_blank"><?php echo G5_SHOP_URL; ?>/price/naver_summary.php</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt><a href="" target="_blank">구글 쇼핑</a></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>구글 Merchant Center : <a href="https://www.google.com/intl/ko_kr/retail/solutions/merchant-center" target="_blank">https://www.google.com/intl/ko_kr/retail/solutions/merchant-center</a></li>
|
||||
<li>파일 이름 : google_feed.php</a></li>
|
||||
<li>파일 URL : <a href="<?php echo G5_SHOP_URL; ?>/price/google_feed.php" target="_blank"><?php echo G5_SHOP_URL; ?>/price/google_feed.php</a></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<dt>Feed 설명</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>판매국가 <b>대한민국</b>, 언어 <b>한국어</b> 설정 기준입니다.</li>
|
||||
<li>기본 피드 이름 : 쇼핑몰피드</li>
|
||||
<li>상품 설명 : <b>it_basic</b> (상품기본설명을 필수 입력해주세요. HTML 태그는 자동 제거됩니다.)</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt><a href="http://shopping.daum.net/" target="_blank">다음 쇼핑하우</a></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
|
||||
@ -303,6 +303,7 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
|
||||
`cf_icode_pw` varchar(255) NOT NULL DEFAULT '',
|
||||
`cf_icode_server_ip` varchar(50) NOT NULL DEFAULT '',
|
||||
`cf_icode_server_port` varchar(50) NOT NULL DEFAULT '',
|
||||
`cf_icode_token_key` varchar(100) NOT NULL DEFAULT '',
|
||||
`cf_googl_shorturl_apikey` varchar(50) NOT NULL DEFAULT '',
|
||||
`cf_social_login_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`cf_social_servicelist` varchar(255) NOT NULL DEFAULT '',
|
||||
|
||||
@ -353,6 +353,7 @@ CREATE TABLE IF NOT EXISTS `g5_shop_default` (
|
||||
`de_inicis_sign_key` varchar(255) NOT NULL DEFAULT '',
|
||||
`de_iche_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`de_easy_pay_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`de_easy_pay_services` varchar(255) NOT NULL DEFAULT '',
|
||||
`de_samsung_pay_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`de_inicis_lpay_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`de_inicis_kakaopay_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
|
||||
@ -1527,7 +1527,7 @@ function sql_connect($host, $user, $pass, $db=G5_MYSQL_DB)
|
||||
global $g5;
|
||||
|
||||
if(function_exists('mysqli_connect') && G5_MYSQLI_USE) {
|
||||
$link = mysqli_connect($host, $user, $pass, $db);
|
||||
$link = @mysqli_connect($host, $user, $pass, $db) or die('MySQL Host, User, Password, DB 정보에 오류가 있습니다.');
|
||||
|
||||
// 연결 오류 발생 시 스크립트 종료
|
||||
if (mysqli_connect_errno()) {
|
||||
@ -3358,10 +3358,10 @@ function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false)
|
||||
}
|
||||
}
|
||||
|
||||
if(stripos($url, 'http:') !== false) {
|
||||
if(!isset($p['scheme']) || !$p['scheme'] || !isset($p['host']) || !$p['host'])
|
||||
alert('url 정보가 올바르지 않습니다.', $return_url);
|
||||
}
|
||||
// if(stripos($url, 'http:') !== false) {
|
||||
// if(!isset($p['scheme']) || !$p['scheme'] || !isset($p['host']) || !$p['host'])
|
||||
// alert('url 정보가 올바르지 않습니다.', $return_url);
|
||||
// }
|
||||
|
||||
//php 5.6.29 이하 버전에서는 parse_url 버그가 존재함
|
||||
//php 7.0.1 ~ 7.0.5 버전에서는 parse_url 버그가 존재함
|
||||
|
||||
92
shop/price/google_feed.php
Normal file
92
shop/price/google_feed.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
include_once("./_common.php");
|
||||
|
||||
$sql = "SELECT a.ca_id,
|
||||
a.ca_adult_use AS ca_adult,
|
||||
IF( SUBSTR(a.ca_id, 3) != \"\", (SELECT ca_adult_use FROM `{$g5['g5_shop_category_table']}` WHERE ca_id = SUBSTR(a.ca_id, 3)), 0) AS ca_adult_parent1,
|
||||
IF( SUBSTR(a.ca_id, 5) != \"\", (SELECT ca_adult_use FROM `{$g5['g5_shop_category_table']}` WHERE ca_id = SUBSTR(a.ca_id, 5)), 0) AS ca_adult_parent2,
|
||||
IF( SUBSTR(a.ca_id, 7) != \"\", (SELECT ca_adult_use FROM `{$g5['g5_shop_category_table']}` WHERE ca_id = SUBSTR(a.ca_id, 7)), 0) AS ca_adult_parent3,
|
||||
IF( SUBSTR(a.ca_id, 9) != \"\", (SELECT ca_adult_use FROM `{$g5['g5_shop_category_table']}` WHERE ca_id = SUBSTR(a.ca_id, 9)), 0) AS ca_adult_parent4
|
||||
FROM `{$g5['g5_shop_category_table']}` AS a";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$category_adult_array = array();
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++ ) {
|
||||
$category_adult_array[$row['ca_id']] = array( $row['ca_adult'], // 자기자신 성인인증판단
|
||||
$row['ca_adult_parent1'], // 1depth 성인인증
|
||||
$row['ca_adult_parent2'], // 2depth 성인인증
|
||||
$row['ca_adult_parent3'], // 3depth 성인인증
|
||||
$row['ca_adult_parent4']); // 4depth 성인인증
|
||||
}
|
||||
|
||||
$sql =" SELECT a.*, IFNULL((SELECT MAX(`io_stock_qty`) FROM `{$g5['g5_shop_item_option_table']}` WHERE `it_id` = a.`it_id` GROUP BY `it_id`), a.`it_stock_qty`) AS in_stock
|
||||
FROM `{$g5['g5_shop_item_table']}` as a
|
||||
where a.`it_use` = '1' and a.`it_soldout` = '0' and a.`it_tel_inq` = '0' and a.`it_price` > '0' order by a.`ca_id`";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$xml = new SimpleXMLElement("<rss/>");
|
||||
$xml->addAttribute("xmlns:xmlns:g", "http://base.google.com/ns/1.0");
|
||||
$xml->addAttribute("version", "2.0");
|
||||
$channel = $xml->addChild("channel");
|
||||
$title = $channel->addChild("title", "쇼핑몰피드");
|
||||
$link = $channel->addChild("link", G5_URL);
|
||||
$description = $channel->addChild("description", "");
|
||||
|
||||
for ($i = 0; $row = sql_fetch_array($result); $i++) {
|
||||
$it_id = $row['it_id'];
|
||||
$it_title = $row['it_name'];
|
||||
$it_link = shop_item_url($row['it_id']);
|
||||
$it_basic = strip_tags($row['it_basic']);
|
||||
|
||||
$it_image = "";
|
||||
for($j = 1; $j <= 10; $j++) {
|
||||
$img = $row['it_img'.$j];
|
||||
|
||||
if(empty($img)) continue;
|
||||
|
||||
$it_image = G5_DATA_URL."/item/".$img;
|
||||
break;
|
||||
}
|
||||
|
||||
$stock = "in_stock";
|
||||
if($row['it_stock_qty'] <= 0) {
|
||||
$stock = "out_of_stock";
|
||||
} else {
|
||||
if($row['in_stock'] <= 0) $stock = "out_of_stock";
|
||||
}
|
||||
|
||||
$item = $channel->addChild("item");
|
||||
// 필수 입력 항목
|
||||
$item->addChild("g:g:id", $it_id);
|
||||
$item->addChild("title", $it_title);
|
||||
$item->addChild("description", $it_basic);
|
||||
$item->addChild("link", $it_link);
|
||||
$item->addChild("g:g:image_link", $it_image);
|
||||
$item->addChild("g:g:availability", $stock);
|
||||
|
||||
if($row['it_cust_price'] != null && $row['it_cust_price'] > 0) {
|
||||
$item->addChild("g:g:price", sprintf('%.2fKRW', $row['it_cust_price']));
|
||||
$item->addChild("g:g:sale_price", sprintf('%.2fKRW', $row['it_price']));
|
||||
} else {
|
||||
$item->addChild("g:g:price", sprintf('%.2fKRW', $row['it_price']));
|
||||
}
|
||||
|
||||
// 선택적 입력 항목
|
||||
$item->addChild("g:g:condition", "new");
|
||||
|
||||
$cate_array = array($row['ca_id'], $row['ca_id2'], $row['ca_id3']);
|
||||
|
||||
$adult = "no";
|
||||
foreach($cate_array as $key => $var) {
|
||||
if(in_array(1, $category_adult_array[$var])) {
|
||||
$adult = "yes";
|
||||
}
|
||||
}
|
||||
|
||||
$item->addChild("g:g:adult", $adult);
|
||||
}
|
||||
|
||||
header('Content-type: text/xml');
|
||||
echo $xml->asXML();
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user