쇼핑몰 구현하실때 하시면 좋을 것같아서 올립니다.
영카트에 있던걸 수정하여 영카트4에 적용을 해보았습니다.
관리자님께서도 올려도 좋다고 하셔서..........
쇼핑몰을 운영하시면서 공동구매가 필요하신 아쉬움이 혹 있으신 분은 참고하시면 좋을 것입니다.
참고사이트는 funnfuns.com 입니다. 실제 운영하는 사이트이니 테스트는 삼가해주세요^^
압축파일안에 공구용 최신글을 추가했어요tab.php파일인데요 임의로 놓으시고 링크를 거시면 될것입니다. 근데 탭형식의 최신글이라 일부 참고하셔서 최신글로 수정하시길 바랍니다. 또한, 이미지는 추가하지 않았습니다 필요한 이미지는 추가로 만드시길 바랍니다.
(제가 관리자에페이지에서 공구상품 등록할때 공구 날짜부분을 못했어요 즉, 0년1월1일로 나와요 ㅠ.ㅠ 기존과 충돌이 일어나는거 같은데 일단 그건 무시하고 올립니다 )
삭제할때 gotourl()이란 함수에러가 있는데 그건 무시했어요 영카트에서 사용하든 링크함수인데
업데이트php 파일 중간 삭제부분에 있는데 goto_url() 이런식으로 밑줄쫙한번해주시면 될것입니다.
수정 gotourl("./gong9list.php"); = > goto_url("./gong9list.php");
심각한 오류가 없어서 일단 올려서 조금더 개선을 시키려고 합니다 양해/개선/추천 등등....
관리자페이지의 메뉴입니다
array("400800", "공동구매관리", "$g4[shop_admin_path]/gong9list.php"),
array("400810", "공동구매신청자", "$g4[shop_admin_path]/gong9applylist.php"),
array("400820", "공동구매메일발송", "$g4[shop_admin_path]/gong9applymail.php"),
아래글은 추가부분 입니다
common.lib.php 추가부분
// 공동구매에서 가장 최근 경매진행중인 상품 정보를 얻는다.
function get_gong9($gg_print, $fields='*')
{
global $g4;
return sql_fetch(" select * from $g4[yc4_gong9] where gg_print = TRIM('$gg_print') order by gg_id desc ");
}
shop.lib.php 입력부분
// 공동구매 신청서를 이용하여 수량, 건수등을 구함
function get_gong9_apply($gg_id)
{
global $g4, $today;
$sql = " select * from $g4[yc4_gong9] where gg_id = '$gg_id' ";
$gg = sql_fetch($sql);
// 공동구매 신청수량의 합
$sumsu = sql_fetch(" select sum(ap_qty) as sum_qty from $g4[yc4_gong9_apply] where gg_id='$gg_id' ");
$arr[신청수량] = $sumsu[sum_qty];
$sumsu1 = sql_fetch(" select count(gg_id) as sum_gg from $g4[yc4_gong9_apply] where gg_id='$gg_id' ");
$arr[신청건수] = $sumsu1[sum_gg];
$arr[마감] = false;
if ($g4[time_ymd] > $gg[gg_to_date] || $arr[신청수량] == $gg[gg_limit_qty])
$arr[마감] = true;
$arr[최저가격도달] = false;
if ($arr[신청수량] >= $gg[gg_3_qty]) {
$arr[현재가격] = (int)$gg[gg_3_amount];
$arr[최저가격도달] = true;
$arr[그래프] = 3;
} else if ($arr[신청수량] >= $gg[gg_2_qty]) {
$arr[현재가격] = (int)$gg[gg_2_amount];
$arr[그래프] = 2;
} else {
$arr[현재가격] = (int)$gg[gg_1_amount];
$arr[그래프] = 1;
}
return $arr;
}
추가 디비입니다--
-- Table structure for table `yc4_gong9`
--
CREATE TABLE yc4_gong9 (
gg_id int(11) NOT NULL auto_increment,
it_id varchar(10) NOT NULL default '',
gg_print tinyint(4) NOT NULL default '0',
gg_fr_date date NOT NULL default '0000-00-00',
gg_to_date date NOT NULL default '0000-00-00',
gg_1_amount int(11) NOT NULL default '0',
gg_2_amount int(11) NOT NULL default '0',
gg_3_amount int(11) NOT NULL default '0',
gg_2_qty int(11) NOT NULL default '0',
gg_3_qty int(11) NOT NULL default '0',
gg_point int(11) NOT NULL default '0',
gg_man_qty int(11) NOT NULL default '0',
gg_limit_qty int(11) NOT NULL default '0',
gg_mail_time datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (gg_id)
) TYPE=MyISAM;
--
-- Table structure for table `yc4_gong9_apply`
--
CREATE TABLE yc4_gong9_apply (
ap_id int(11) NOT NULL auto_increment,
gg_id int(11) NOT NULL default '0',
it_id varchar(10) NOT NULL default '0',
ap_opt1 varchar(255) NOT NULL default '',
ap_opt2 varchar(255) NOT NULL default '',
ap_opt3 varchar(255) NOT NULL default '',
ap_opt4 varchar(255) NOT NULL default '',
ap_opt5 varchar(255) NOT NULL default '',
ap_opt6 varchar(255) NOT NULL default '',
ap_amount int(11) NOT NULL default '0',
ap_point int(11) NOT NULL default '0',
ap_qty int(11) NOT NULL default '0',
mb_id varchar(20) NOT NULL default '',
ap_sendmail tinyint(4) NOT NULL default '0',
ap_time datetime NOT NULL default '0000-00-00 00:00:00',
ap_ip varchar(25) NOT NULL default '',
PRIMARY KEY (ap_id),
KEY index1 (it_id)
) TYPE=MyISAM;
영카트에 있던걸 수정하여 영카트4에 적용을 해보았습니다.
관리자님께서도 올려도 좋다고 하셔서..........
쇼핑몰을 운영하시면서 공동구매가 필요하신 아쉬움이 혹 있으신 분은 참고하시면 좋을 것입니다.
참고사이트는 funnfuns.com 입니다. 실제 운영하는 사이트이니 테스트는 삼가해주세요^^
압축파일안에 공구용 최신글을 추가했어요tab.php파일인데요 임의로 놓으시고 링크를 거시면 될것입니다. 근데 탭형식의 최신글이라 일부 참고하셔서 최신글로 수정하시길 바랍니다. 또한, 이미지는 추가하지 않았습니다 필요한 이미지는 추가로 만드시길 바랍니다.
(제가 관리자에페이지에서 공구상품 등록할때 공구 날짜부분을 못했어요 즉, 0년1월1일로 나와요 ㅠ.ㅠ 기존과 충돌이 일어나는거 같은데 일단 그건 무시하고 올립니다 )
삭제할때 gotourl()이란 함수에러가 있는데 그건 무시했어요 영카트에서 사용하든 링크함수인데
업데이트php 파일 중간 삭제부분에 있는데 goto_url() 이런식으로 밑줄쫙한번해주시면 될것입니다.
수정 gotourl("./gong9list.php"); = > goto_url("./gong9list.php");
심각한 오류가 없어서 일단 올려서 조금더 개선을 시키려고 합니다 양해/개선/추천 등등....
관리자페이지의 메뉴입니다
array("400800", "공동구매관리", "$g4[shop_admin_path]/gong9list.php"),
array("400810", "공동구매신청자", "$g4[shop_admin_path]/gong9applylist.php"),
array("400820", "공동구매메일발송", "$g4[shop_admin_path]/gong9applymail.php"),
아래글은 추가부분 입니다
common.lib.php 추가부분
// 공동구매에서 가장 최근 경매진행중인 상품 정보를 얻는다.
function get_gong9($gg_print, $fields='*')
{
global $g4;
return sql_fetch(" select * from $g4[yc4_gong9] where gg_print = TRIM('$gg_print') order by gg_id desc ");
}
shop.lib.php 입력부분
// 공동구매 신청서를 이용하여 수량, 건수등을 구함
function get_gong9_apply($gg_id)
{
global $g4, $today;
$sql = " select * from $g4[yc4_gong9] where gg_id = '$gg_id' ";
$gg = sql_fetch($sql);
// 공동구매 신청수량의 합
$sumsu = sql_fetch(" select sum(ap_qty) as sum_qty from $g4[yc4_gong9_apply] where gg_id='$gg_id' ");
$arr[신청수량] = $sumsu[sum_qty];
$sumsu1 = sql_fetch(" select count(gg_id) as sum_gg from $g4[yc4_gong9_apply] where gg_id='$gg_id' ");
$arr[신청건수] = $sumsu1[sum_gg];
$arr[마감] = false;
if ($g4[time_ymd] > $gg[gg_to_date] || $arr[신청수량] == $gg[gg_limit_qty])
$arr[마감] = true;
$arr[최저가격도달] = false;
if ($arr[신청수량] >= $gg[gg_3_qty]) {
$arr[현재가격] = (int)$gg[gg_3_amount];
$arr[최저가격도달] = true;
$arr[그래프] = 3;
} else if ($arr[신청수량] >= $gg[gg_2_qty]) {
$arr[현재가격] = (int)$gg[gg_2_amount];
$arr[그래프] = 2;
} else {
$arr[현재가격] = (int)$gg[gg_1_amount];
$arr[그래프] = 1;
}
return $arr;
}
추가 디비입니다--
-- Table structure for table `yc4_gong9`
--
CREATE TABLE yc4_gong9 (
gg_id int(11) NOT NULL auto_increment,
it_id varchar(10) NOT NULL default '',
gg_print tinyint(4) NOT NULL default '0',
gg_fr_date date NOT NULL default '0000-00-00',
gg_to_date date NOT NULL default '0000-00-00',
gg_1_amount int(11) NOT NULL default '0',
gg_2_amount int(11) NOT NULL default '0',
gg_3_amount int(11) NOT NULL default '0',
gg_2_qty int(11) NOT NULL default '0',
gg_3_qty int(11) NOT NULL default '0',
gg_point int(11) NOT NULL default '0',
gg_man_qty int(11) NOT NULL default '0',
gg_limit_qty int(11) NOT NULL default '0',
gg_mail_time datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (gg_id)
) TYPE=MyISAM;
--
-- Table structure for table `yc4_gong9_apply`
--
CREATE TABLE yc4_gong9_apply (
ap_id int(11) NOT NULL auto_increment,
gg_id int(11) NOT NULL default '0',
it_id varchar(10) NOT NULL default '0',
ap_opt1 varchar(255) NOT NULL default '',
ap_opt2 varchar(255) NOT NULL default '',
ap_opt3 varchar(255) NOT NULL default '',
ap_opt4 varchar(255) NOT NULL default '',
ap_opt5 varchar(255) NOT NULL default '',
ap_opt6 varchar(255) NOT NULL default '',
ap_amount int(11) NOT NULL default '0',
ap_point int(11) NOT NULL default '0',
ap_qty int(11) NOT NULL default '0',
mb_id varchar(20) NOT NULL default '',
ap_sendmail tinyint(4) NOT NULL default '0',
ap_time datetime NOT NULL default '0000-00-00 00:00:00',
ap_ip varchar(25) NOT NULL default '',
PRIMARY KEY (ap_id),
KEY index1 (it_id)
) TYPE=MyISAM;
댓글 47개
게시글 목록
| 번호 | 제목 |
|---|---|
| 154028 | |
| 154024 | |
| 153965 | |
| 153936 |
최신글
탭 갤러리 슬라이드 최신글
3
|
| 153927 | |
| 153911 |
게시판
웹진형태의 후기게시판
5
|
| 153910 |
게시판
출납 게시판
3
|
| 153907 | |
| 153885 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기