diff --git a/css/default_shop.css b/css/default_shop.css
index 923b0f006..3ab67270c 100644
--- a/css/default_shop.css
+++ b/css/default_shop.css
@@ -3,14 +3,15 @@
/* 초기화 */
html {overflow-y:scroll}
-body {margin:0;padding:0;background:#fff;color:#000;font-size:0.75em;font-family:"dotum"}
+body {margin:0;padding:0;background:#f9fafe;color:#000;font-size:0.75em;font-family:dotum}
html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0}
-h1, h2, h3, h4, h5, h6, input, textarea, select, button {font-size:1em;font-family:"dotum"}
+h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:dotum}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
#hd ul, nav ul, #ft ul {margin:0;padding:0;list-style:none}
+legend {position:absolute;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
label, input, select, img {vertical-align:middle}
-input {margin:0;padding:0;border-radius:0}
-button {border-radius:0}
+input, button {margin:0;padding:0;font-family:dotum;font-size:1em}
+textarea, select {font-family:dotum;font-size:1em}
p {margin:0;padding:10px 0;line-height:1.7em;word-break:break-all}
hr {display:none}
pre {overflow-x:scroll;font-size:1.1em}
diff --git a/css/mobile_shop.css b/css/mobile_shop.css
index 0a8b69c44..86ace7f6d 100644
--- a/css/mobile_shop.css
+++ b/css/mobile_shop.css
@@ -10,7 +10,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,
header ul, nav ul, footer ul {margin:0;padding:0;list-style:none}
legend {position:absolute;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
label, input, select, img {vertical-align:middle}
-input,button {margin:0;padding:0;font-size:1em}
+input, button {margin:0;padding:0;font-size:1em}
input[type=text], input[type=password], input[type=submit], input[type=image], button {border-radius:0;font-size:1em;-webkit-appearance:none}
textarea, select {font-size:1em}
textarea {border-radius:0;-webkit-appearance:none}
diff --git a/lib/shop.lib.php b/lib/shop.lib.php
index b0ee68e3f..5ba4213ca 100644
--- a/lib/shop.lib.php
+++ b/lib/shop.lib.php
@@ -77,6 +77,7 @@ class item_list
protected $view_it_id = false; // 상품코드
protected $view_it_img = true; // 상품이미지
protected $view_it_name = true; // 상품명
+ protected $view_it_basic = true; // 기본설명
protected $view_it_price = true; // 판매가격
protected $view_it_cust_price = false; // 소비자가
protected $view_it_icon = false; // 아이콘
@@ -389,6 +390,7 @@ function get_image($img, $width=0, $height=0, $img_id='')
return $str;
}
+
// 상품 이미지를 얻는다
function get_it_image($it_id, $width, $height=0, $anchor=false, $img_id='')
{
@@ -448,6 +450,8 @@ function get_it_image($it_id, $width, $height=0, $anchor=false, $img_id='')
return $img;
}
+
+// 상품이미지 썸네일 생성
function get_it_thumbnail($img, $width, $height=0, $id='')
{
$str = '';
@@ -481,7 +485,8 @@ function get_it_thumbnail($img, $width, $height=0, $id='')
return $str;
}
-//
+
+// 이미지 URL 을 얻는다.
function get_it_imageurl($it_id)
{
global $g5;
@@ -513,6 +518,7 @@ function get_it_imageurl($it_id)
return $str;
}
+
// 상품의 재고 (창고재고수량 - 주문대기수량)
function get_it_stock_qty($it_id)
{
@@ -535,6 +541,7 @@ function get_it_stock_qty($it_id)
return $jaego - $daegi;
}
+
// 옵션의 재고 (창고재고수량 - 주문대기수량)
function get_option_stock_qty($it_id, $io_id, $type)
{
@@ -560,6 +567,7 @@ function get_option_stock_qty($it_id, $io_id, $type)
return $jaego - $daegi;
}
+
// 큰 이미지
function get_large_image($img, $it_id, $btn_image=true)
{
@@ -579,6 +587,7 @@ function get_large_image($img, $it_id, $btn_image=true)
return $str;
}
+
// 금액 표시
function display_price($price, $tel_inq=false)
{
@@ -590,6 +599,7 @@ function display_price($price, $tel_inq=false)
return $price;
}
+
// 금액표시
// $it : 상품 배열
function get_price($it)
@@ -610,12 +620,14 @@ function display_point($point)
return number_format($point, 0).'점';
}
+
// 포인트를 구한다
function get_point($amount, $point)
{
return (int)($amount * $point / 100);
}
+
// HTML 특수문자 변환 htmlspecialchars
function htmlspecialchars2($str)
{
@@ -624,6 +636,7 @@ function htmlspecialchars2($str)
return $str;
}
+
// 상품이미지 업로드
function it_img_upload($srcfile, $filename, $dir)
{
@@ -654,6 +667,7 @@ function it_img_upload($srcfile, $filename, $dir)
return $file;
}
+
// 파일을 업로드 함
function upload_file($srcfile, $destfile, $dir)
{
@@ -664,6 +678,7 @@ function upload_file($srcfile, $destfile, $dir)
return true;
}
+
function message($subject, $content, $align="left", $width="450")
{
$str = "
@@ -689,6 +704,7 @@ function message($subject, $content, $align="left", $width="450")
return $str;
}
+
// 시간이 비어 있는지 검사
function is_null_time($datetime)
{
@@ -701,6 +717,7 @@ function is_null_time($datetime)
return false;
}
+
// 출력유형, 스킨파일, 1라인이미지수, 총라인수, 이미지폭, 이미지높이
// 1.02.01 $ca_id 추가
//function display_type($type, $skin_file, $list_mod, $list_row, $img_width, $img_height, $ca_id="")
@@ -745,6 +762,7 @@ function display_type($type, $list_skin='', $list_mod='', $list_row='', $img_wid
}
}
+
// 모바일 유형별 상품 출력
function mobile_display_type($type, $skin_file, $list_row, $img_width, $img_height, $ca_id="")
{
@@ -774,6 +792,7 @@ function mobile_display_type($type, $skin_file, $list_row, $img_width, $img_heig
}
}
+
// 분류별 출력
// 스킨파일번호, 1라인이미지수, 총라인수, 이미지폭, 이미지높이 , 분류번호
function display_category($no, $list_mod, $list_row, $img_width, $img_height, $ca_id="")
@@ -801,6 +820,7 @@ function display_category($no, $list_mod, $list_row, $img_width, $img_height, $c
}
}
+
// 별
function get_star($score)
{
@@ -814,6 +834,7 @@ function get_star($score)
return $star;
}
+
// 별 이미지
function get_star_image($it_id)
{
@@ -825,6 +846,7 @@ function get_star_image($it_id)
return (int)get_star($row['score']);
}
+
// 메일 보내는 내용을 HTML 형식으로 만든다.
function email_content($str)
{
@@ -840,6 +862,7 @@ function email_content($str)
return $s;
}
+
// 타임스탬프 형식으로 넘어와야 한다.
// 시작시간, 종료시간
function gap_time($begin_time, $end_time)
@@ -864,6 +887,7 @@ function continue_cut_str($str, $len=80)
return preg_replace($pattern, "\\0\n", $str);
}
+
// 제목별로 컬럼 정렬하는 QUERY STRING
// $type 이 1이면 반대
function title_sort($col, $type=0)
@@ -903,6 +927,7 @@ function session_check()
gotourl(G5_SHOP_URL);
}
+
// 상품 선택옵션
function get_item_options($it_id, $subject)
{
@@ -990,6 +1015,7 @@ function get_item_options($it_id, $subject)
return $str;
}
+
// 상품 추가옵션
function get_item_supply($it_id, $subject)
{
@@ -1059,6 +1085,7 @@ function get_item_supply($it_id, $subject)
return $str;
}
+
function print_item_options($it_id, $cart_id)
{
global $g5;
@@ -1079,6 +1106,7 @@ function print_item_options($it_id, $cart_id)
return $str;
}
+
// 일자형식변환
function date_conv($date, $case=1)
{
@@ -1091,6 +1119,7 @@ function date_conv($date, $case=1)
return $date;
}
+
// 배너출력
function display_banner($position, $num="")
{
@@ -1101,6 +1130,7 @@ function display_banner($position, $num="")
include G5_SHOP_SKIN_PATH.'/boxbanner'.$num.'.skin.php';
}
+
// 1.00.02
// 파일번호, 이벤트번호, 1라인이미지수, 총라인수, 이미지폭, 이미지높이
// 1.02.01 $ca_id 추가
@@ -1130,6 +1160,7 @@ function display_event($no, $event, $list_mod, $list_row, $img_width, $img_heigh
}
}
+
function get_yn($val, $case='')
{
switch ($case) {
@@ -1139,6 +1170,7 @@ function get_yn($val, $case='')
return $result;
}
+
// 상품명과 건수를 반환
function get_goods($cart_id)
{
@@ -1213,6 +1245,7 @@ function check_datetime($datetime)
return false;
}
+
// 경고메세지를 경고창으로
function alert_opener($msg='', $url='')
{
@@ -1229,6 +1262,7 @@ function alert_opener($msg='', $url='')
exit;
}
+
// option 리스트에 selected 추가
function conv_selected_option($options, $value)
{
@@ -1240,6 +1274,7 @@ function conv_selected_option($options, $value)
return $options;
}
+
// 주문서 번호를 얻는다.
function get_new_od_id()
{
@@ -1266,6 +1301,7 @@ function get_new_od_id()
return $od_id;
}
+
// cart id 설정
function set_cart_id($direct)
{
@@ -1314,6 +1350,7 @@ function set_cart_id($direct)
}
}
+
// 상품 목록 : 관련 상품 출력
function relation_item($it_id, $width, $height, $rows=3)
{
@@ -1349,6 +1386,7 @@ function relation_item($it_id, $width, $height, $rows=3)
return $str;
}
+
// 상품이미지에 유형 아이콘 출력
function item_icon($it)
{
@@ -1378,6 +1416,7 @@ function item_icon($it)
return $icon;
}
+
// sns 공유하기
function get_sns_share_link($sns, $url, $title, $img)
{
@@ -1399,6 +1438,7 @@ function get_sns_share_link($sns, $url, $title, $img)
return $str;
}
+
// 상품이미지 썸네일 삭제
function delete_item_thumbnail($dir, $file)
{
@@ -1416,6 +1456,7 @@ function delete_item_thumbnail($dir, $file)
}
}
+
// 쿠폰번호 생성함수
function get_coupon_id()
{
@@ -1439,6 +1480,7 @@ function get_coupon_id()
return $str;
}
+
// array_map() 대체
function array_add_callback($func, $array)
{
@@ -1461,6 +1503,7 @@ function array_add_callback($func, $array)
return $array;
}
+
// 주문의 금액, 배송비 과세금액 등의 정보를 가져옴
function get_order_info($od_id)
{
@@ -1605,6 +1648,7 @@ function get_order_info($od_id)
return $info;
}
+
// 상품포인트
function get_item_point($it)
{
@@ -1619,6 +1663,7 @@ function get_item_point($it)
return $it_point;
}
+
// 배송비 구함
function get_sendcost($cart_id, $selected=1)
{
@@ -1672,6 +1717,7 @@ function get_sendcost($cart_id, $selected=1)
return ($total_send_cost + $send_cost);
}
+
// 상품별 배송비
function get_item_sendcost($it_id, $price, $qty)
{
@@ -1708,6 +1754,7 @@ function get_item_sendcost($it_id, $price, $qty)
return $sendcost;
}
+
// 쿠폰 사용체크
function is_used_coupon($mb_id, $cp_id)
{
@@ -1723,6 +1770,33 @@ function is_used_coupon($mb_id, $cp_id)
return $used;
}
+
+
+//------------------------------------------------------------------------------
+// 주문포인트를 적립한다.
+// 설정일이 지난 포인트 부여되지 않은 배송완료된 장바구니 자료에 포인트 부여
+// 설정일이 0 이면 주문서 완료 설정 시점에서 포인트를 바로 부여합니다.
+//------------------------------------------------------------------------------
+function save_order_point($ct_status="완료")
+{
+ global $default;
+
+ $beforedays = date("Y-m-d H:i:s", ( time() - (86400 * (int)$default['de_point_days']) ) ); // 86400초는 하루
+ $sql = " select * from {$g5['g5_shop_cart_table']} where ct_status = '$ct_status' and ct_point_use = '0' and ct_time <= '$beforedays' ";
+ $result = sql_query($sql);
+ for ($i=0; $row=sql_fetch_array($result); $i++) {
+ // 회원 ID 를 얻는다.
+ $od_row = sql_fetch("select od_id, mb_id from {$g5['g5_shop_order_table']} where od_id = '{$row['od_id']}' ");
+ if ($od_row['mb_id'] && $row['ct_point'] > 0) { // 회원이면서 포인트가 0보다 크다면
+ $po_point = $row['ct_point'] * $row['ct_qty'];
+ $po_content = "주문번호 {$od_row['od_id']} ({$row['ct_id']}) 배송완료";
+ insert_point($od_row['mb_id'], $po_point, $po_content, "@delivery", $od_row['mb_id'], "{$od_row['od_id']},{$row['ct_id']}");
+ }
+ sql_query("update {$g5['g5_shop_cart_table']} set ct_point_use = '1' where ct_id = '{$row['ct_id']}' ");
+ }
+}
+
+
//==============================================================================
// 쇼핑몰 라이브러리 모음 끝
//==============================================================================
diff --git a/shop/index.php b/shop/index.php
index abbb261fa..7f33f2b57 100644
--- a/shop/index.php
+++ b/shop/index.php
@@ -32,6 +32,7 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
$list->set_view('it_img', true);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
+ $list->set_view('it_basic', true);
$list->set_view('it_cust_price', false);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
@@ -52,6 +53,7 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
$list->set_type(2);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
+ $list->set_view('it_basic', true);
$list->set_view('it_cust_price', false);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
@@ -72,6 +74,7 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
$list->set_type(3);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
+ $list->set_view('it_basic', true);
$list->set_view('it_cust_price', false);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
@@ -92,6 +95,7 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
$list->set_type(4);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
+ $list->set_view('it_basic', true);
$list->set_view('it_cust_price', false);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
@@ -112,6 +116,7 @@ include_once(G5_SHOP_PATH.'/shop.head.php');
$list->set_type(5);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
+ $list->set_view('it_basic', true);
$list->set_view('it_cust_price', false);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
diff --git a/shop/list.php b/shop/list.php
index b09fb21e0..16be64208 100644
--- a/shop/list.php
+++ b/shop/list.php
@@ -97,6 +97,7 @@ var itemlist_ca_id = "";
$list->set_view('it_img', true);
$list->set_view('it_id', false);
$list->set_view('it_name', true);
+ $list->set_view('it_basic', true);
$list->set_view('it_cust_price', false);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php
index 8690fc252..b7db3fb99 100644
--- a/shop/orderinquiryview.php
+++ b/shop/orderinquiryview.php
@@ -149,12 +149,12 @@ if(openwin != null) {
원
0) { ?>
-
상품할인
+
개별상품 쿠폰할인
원
0) { ?>
-
결제할인
+
주문금액 쿠폰할인
원
@@ -164,7 +164,7 @@ if(openwin != null) {
0) { ?>
-
배송비할인
+
배송비 쿠폰할인
원
diff --git a/shop/search.php b/shop/search.php
index e90ecd36b..7289b4ffa 100644
--- a/shop/search.php
+++ b/shop/search.php
@@ -83,9 +83,9 @@ $total_count = $row['cnt'];
$save['it_id'][$save['cnt']] = $row['it_id'];
$save[cnt]++;
}
+ mysql_free_result($result);
}
- mysql_free_result($result);
write_search_save($save);
function write_search_save($save)
@@ -106,7 +106,7 @@ $total_count = $row['cnt'];
?>
- 상품개
+ 상품개
| 이미지
diff --git a/skin/shop/basic/list.10.skin.php b/skin/shop/basic/list.10.skin.php
index b4d465cc6..b7863d142 100644
--- a/skin/shop/basic/list.10.skin.php
+++ b/skin/shop/basic/list.10.skin.php
@@ -41,6 +41,10 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
echo "".stripslashes($row['it_name'])."\n";
}
+ if ($this->view_it_basic) {
+ echo "".stripslashes($row['it_basic'])."\n";
+ }
+
if ($this->view_it_cust_price) {
echo "".display_price($row['it_cust_price'])."\n";
}
diff --git a/skin/shop/basic/main.10.skin.php b/skin/shop/basic/main.10.skin.php
index 3e3ac1bc7..bea614e97 100644
--- a/skin/shop/basic/main.10.skin.php
+++ b/skin/shop/basic/main.10.skin.php
@@ -41,6 +41,10 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
echo "".stripslashes($row['it_name'])."\n";
}
+ if ($this->view_it_basic) {
+ echo "".stripslashes($row['it_basic'])."\n";
+ }
+
if ($this->view_it_cust_price) {
echo "".display_price($row['it_cust_price'])."\n";
}
|