class item_list 모바일 적용

This commit is contained in:
gnuboard
2013-07-26 16:48:09 +09:00
parent b543227e23
commit 1d2c04146f
14 changed files with 328 additions and 395 deletions

View File

@ -179,7 +179,7 @@ $pg_anchor .= '</ul>';
<td>
<?php echo help("기본으로 제공하는 스킨은 ".G4_SHOP_DIR."/list.skin.*.php 입니다."); ?>
<select id="ca_skin" name="ca_skin">
<?php echo get_list_skin_options("^list.skin.(.*)\.php", G4_SHOP_PATH, $ca['ca_skin']); ?>
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $ca['ca_skin']); ?>
</select>
</td>
</tr>

View File

@ -155,9 +155,7 @@ $pg_anchor = '<ul class="anchor">
<table class="frm_tbl">
<colgroup>
<col class="grid_3">
<col class="grid_6">
<col class="grid_3">
<col class="grid_6">
<col>
</colgroup>
<tbody>
<tr>
@ -212,7 +210,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_type1_list_use" value="1" id="de_type1_list_use" <?php echo $default['de_type1_list_use']?"checked":""; ?>>
<label for="de_type1_list_skin">스킨</label>
<select name="de_type1_list_skin" id="de_type1_list_skin">
<?php echo get_list_skin_options("^type[^\.]+\.skin\.php", $shop_skin_path, $default['de_type1_list_skin']); ?>
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type1_list_skin']); ?>
</select>
<label for="de_type1_list_row">출력할 줄 수</label>
<input type="text" name="de_type1_list_row" value="<?php echo $default['de_type1_list_row']; ?>" id="de_type1_list_row" class="frm_input" size="3">
@ -231,7 +229,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_type2_list_use" value="1" id="de_type2_list_use" <?php echo $default['de_type2_list_use']?"checked":""; ?>>
<label for="de_type2_list_skin">스킨</label>
<select name="de_type2_list_skin" id="de_type2_list_skin">
<?php echo get_list_skin_options("^type[^\.]+\.skin\.php", $shop_skin_path, $default['de_type2_list_skin']); ?>
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type2_list_skin']); ?>
</select>
<label for="de_type2_list_row">출력할 줄 수</label>
<input type="text" name="de_type2_list_row" value="<?php echo $default['de_type2_list_row']; ?>" id="de_type2_list_row" class="frm_input" size="3">
@ -250,7 +248,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_type3_list_use" value="1" id="de_type3_list_use" <?php echo $default['de_type3_list_use']?"checked":""; ?>>
<label for="de_type3_list_skin">스킨</label>
<select name="de_type3_list_skin" id="de_type3_list_skin">
<?php echo get_list_skin_options("^type[^\.]+\.skin\.php", $shop_skin_path, $default['de_type3_list_skin']); ?>
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type3_list_skin']); ?>
</select>
<label for="de_type3_list_row">출력할 줄 수</label>
<input type="text" name="de_type3_list_row" value="<?php echo $default['de_type3_list_row']; ?>" id="de_type3_list_row" class="frm_input" size="3">
@ -269,7 +267,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_type4_list_use" value="1" id="de_type4_list_use" <?php echo $default['de_type4_list_use']?"checked":""; ?>>
<label for="de_type4_list_skin">스킨</label>
<select name="de_type4_list_skin" id="de_type4_list_skin">
<?php echo get_list_skin_options("^type[^\.]+\.skin\.php", $shop_skin_path, $default['de_type4_list_skin']); ?>
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type4_list_skin']); ?>
</select>
<label for="de_type4_list_row">출력할 줄 수</label>
<input type="text" name="de_type4_list_row" value="<?php echo $default['de_type4_list_row']; ?>" id="de_type4_list_row" class="frm_input" size="3">
@ -288,7 +286,7 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_type5_list_use" value="1" id="de_type5_list_use" <?php echo $default['de_type5_list_use']?"checked":""; ?>>
<label for="de_type5_list_skin">스킨</label>
<select name="de_type5_list_skin" id="de_type5_list_skin">
<?php echo get_list_skin_options("^type[^\.]+\.skin\.php", $shop_skin_path, $default['de_type5_list_skin']); ?>
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $default['de_type5_list_skin']); ?>
</select>
<label for="de_type5_list_row">출력할 줄 수</label>
<input type="text" name="de_type5_list_row" value="<?php echo $default['de_type5_list_row']; ?>" id="de_type5_list_row" class="frm_input" size="3">
@ -317,33 +315,17 @@ $pg_anchor = '<ul class="anchor">
<col class="grid_15">
</colgroup>
<tbody>
<tr>
<th scope="row">최신상품출력</th>
<td>
<label for="de_mobile_type3_list_use">출력</label>
<input type="checkbox" name="de_mobile_type3_list_use" value="1" id="de_mobile_type3_list_use" <?php echo $default['de_mobile_type3_list_use']?"checked":""; ?>>
<label for="de_mobile_type3_list_skin">스킨</label>
<select name="de_mobile_type3_list_skin" id="de_mobile_type3_list_skin">
<?php echo get_list_skin_options("^type(.*)\.php", G4_MSHOP_PATH, $default['de_mobile_type3_list_skin']); ?>
</select>
<label for="de_mobile_type3_list_row">출력할 이미지 수</label>
<input type="text" name="de_mobile_type3_list_row" value="<?php echo $default['de_mobile_type3_list_row']; ?>" id="de_mobile_type3_list_row" class="frm_input" size="3">
<label for="de_mobile_type3_img_width">이미지 폭</label>
<input type="text" name="de_mobile_type3_img_width" value="<?php echo $default['de_mobile_type3_img_width']; ?>" id="de_mobile_type3_img_width" class="frm_input" size="3">
<label for="de_mobile_type3_img_height">이미지 높이</label>
<input type="text" name="de_mobile_type3_img_height" value="<?php echo $default['de_mobile_type3_img_height']; ?>" id="de_mobile_type3_img_height" class="frm_input" size="3">
</td>
</tr>
<tr>
<th scope="row">히트상품출력</th>
<td>
<label for="de_mobile_type1_list_use">출력</label> <input type="checkbox" name="de_mobile_type1_list_use" value="1" id="de_mobile_type1_list_use" <?php echo $default['de_mobile_type1_list_use']?"checked":""; ?>>
<label for="de_mobile_type1_list_skin">스킨 </label>
<label for="de_mobile_type1_list_use">출력</label>
<input type="checkbox" name="de_mobile_type1_list_use" value="1" id="de_mobile_type1_list_use" <?php echo $default['de_mobile_type1_list_use']?"checked":""; ?>>
<label for="de_mobile_type1_list_skin">스킨</label>
<select name="de_mobile_type1_list_skin" id="de_mobile_type1_list_skin">
<?php echo get_list_skin_options("^type(.*)\.php", G4_MSHOP_PATH, $default['de_mobile_type1_list_skin']); ?>
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type1_list_skin']); ?>
</select>
<label for="de_mobile_type1_list_row">출력할 이미지 수</label>
<input type="text" name="de_mobile_type1_list_row" value="<?php echo $default['de_mobile_type1_list_row']; ?>" id="de_mobile_type1_list_row" class="frm_input" size="3">
<label for="de_mobile_type1_list_mod">출력할 이미지 수</label>
<input type="text" name="de_mobile_type1_list_mod" value="<?php echo $default['de_mobile_type1_list_mod']; ?>" id="de_mobile_type1_list_mod" class="frm_input" size="3">
<label for="de_mobile_type1_img_width">이미지 폭</label>
<input type="text" name="de_mobile_type1_img_width" value="<?php echo $default['de_mobile_type1_img_width']; ?>" id="de_mobile_type1_img_width" class="frm_input" size="3">
<label for="de_mobile_type1_img_height">이미지 높이</label>
@ -353,20 +335,36 @@ $pg_anchor = '<ul class="anchor">
<tr>
<th scope="row">추천상품출력</th>
<td>
<label for="de_mobile_type2_list_use">출력</label>
<input type="checkbox" name="de_mobile_type2_list_use" value="1" id="de_mobile_type2_list_use" <?php echo $default['de_mobile_type2_list_use']?"checked":""; ?>>
<label for="de_mobile_type2_list_skin">스킨</label>
<label for="de_mobile_type2_list_use">출력</label> <input type="checkbox" name="de_mobile_type2_list_use" value="1" id="de_mobile_type2_list_use" <?php echo $default['de_mobile_type2_list_use']?"checked":""; ?>>
<label for="de_mobile_type2_list_skin">스킨 </label>
<select name="de_mobile_type2_list_skin" id="de_mobile_type2_list_skin">
<?php echo get_list_skin_options("^type(.*)\.php", G4_MSHOP_PATH, $default['de_mobile_type2_list_skin']); ?>
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type2_list_skin']); ?>
</select>
<label for="de_mobile_type2_list_row">출력할 이미지 수</label>
<input type="text" name="de_mobile_type2_list_row" value="<?php echo $default['de_mobile_type2_list_row']; ?>" id="de_mobile_type2_list_row" class="frm_input" size="3">
<label for="de_mobile_type2_list_mod">출력할 이미지 수</label>
<input type="text" name="de_mobile_type2_list_mod" value="<?php echo $default['de_mobile_type2_list_mod']; ?>" id="de_mobile_type2_list_mod" class="frm_input" size="3">
<label for="de_mobile_type2_img_width">이미지 폭</label>
<input type="text" name="de_mobile_type2_img_width" value="<?php echo $default['de_mobile_type2_img_width']; ?>" id="de_mobile_type2_img_width" class="frm_input" size="3">
<label for="de_mobile_type2_img_height">이미지 높이</label>
<input type="text" name="de_mobile_type2_img_height" value="<?php echo $default['de_mobile_type2_img_height']; ?>" id="de_mobile_type2_img_height" class="frm_input" size="3">
</td>
</tr>
<tr>
<th scope="row">최신상품출력</th>
<td>
<label for="de_mobile_type3_list_use">출력</label>
<input type="checkbox" name="de_mobile_type3_list_use" value="1" id="de_mobile_type3_list_use" <?php echo $default['de_mobile_type3_list_use']?"checked":""; ?>>
<label for="de_mobile_type3_list_skin">스킨</label>
<select name="de_mobile_type3_list_skin" id="de_mobile_type3_list_skin">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type3_list_skin']); ?>
</select>
<label for="de_mobile_type3_list_mod">출력할 이미지 수</label>
<input type="text" name="de_mobile_type3_list_mod" value="<?php echo $default['de_mobile_type3_list_mod']; ?>" id="de_mobile_type3_list_mod" class="frm_input" size="3">
<label for="de_mobile_type3_img_width">이미지 폭</label>
<input type="text" name="de_mobile_type3_img_width" value="<?php echo $default['de_mobile_type3_img_width']; ?>" id="de_mobile_type3_img_width" class="frm_input" size="3">
<label for="de_mobile_type3_img_height">이미지 높이</label>
<input type="text" name="de_mobile_type3_img_height" value="<?php echo $default['de_mobile_type3_img_height']; ?>" id="de_mobile_type3_img_height" class="frm_input" size="3">
</td>
</tr>
<tr>
<th scope="row">인기상품출력</th>
<td>
@ -374,10 +372,10 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_mobile_type4_list_use" value="1" id="de_mobile_type4_list_use" <?php echo $default['de_mobile_type4_list_use']?"checked":""; ?>>
<label for="de_mobile_type4_list_skin">스킨</label>
<select name="de_mobile_type4_list_skin" id="de_mobile_type4_list_skin">
<?php echo get_list_skin_options("^type(.*)\.php", G4_MSHOP_PATH, $default['de_mobile_type4_list_skin']); ?>
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type4_list_skin']); ?>
</select>
<label for="de_mobile_type4_list_row">출력할 이미지 수</label>
<input type="text" name="de_mobile_type4_list_row" value="<?php echo $default['de_mobile_type4_list_row']; ?>" id="de_mobile_type4_list_row" class="frm_input" size="3">
<label for="de_mobile_type4_list_mod">출력할 이미지 수</label>
<input type="text" name="de_mobile_type4_list_mod" value="<?php echo $default['de_mobile_type4_list_mod']; ?>" id="de_mobile_type4_list_mod" class="frm_input" size="3">
<label for="de_mobile_type4_img_width">이미지 폭</label>
<input type="text" name="de_mobile_type4_img_width" value="<?php echo $default['de_mobile_type4_img_width']; ?>" id="de_mobile_type4_img_width" class="frm_input" size="3">
<label for="de_mobile_type4_img_height">이미지 높이</label>
@ -391,10 +389,10 @@ $pg_anchor = '<ul class="anchor">
<input type="checkbox" name="de_mobile_type5_list_use" value="1" id="de_mobile_type5_list_use" <?php echo $default['de_mobile_type5_list_use']?"checked":""; ?>>
<label for="de_mobile_type5_list_skin">스킨</label>
<select id="de_mobile_type5_list_skin" name="de_mobile_type5_list_skin">
<?php echo get_list_skin_options("^type(.*)\.php", G4_MSHOP_PATH, $default['de_mobile_type5_list_skin']); ?>
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_MSHOP_SKIN_PATH, $default['de_mobile_type5_list_skin']); ?>
</select>
<label for="de_mobile_type5_list_row">출력할 이미지 수</label>
<input type="text" name="de_mobile_type5_list_row" value="<?php echo $default['de_mobile_type5_list_row']; ?>" id="de_mobile_type5_list_row" class="frm_input" size="3">
<label for="de_mobile_type5_list_mod">출력할 이미지 수</label>
<input type="text" name="de_mobile_type5_list_mod" value="<?php echo $default['de_mobile_type5_list_mod']; ?>" id="de_mobile_type5_list_mod" class="frm_input" size="3">
<label for="de_mobile_type5_img_width">이미지 폭</label>
<input type="text" name="de_mobile_type5_img_width" value="<?php echo $default['de_mobile_type5_img_width']; ?>" id="de_mobile_type5_img_width" class="frm_input" size="3">
<label for="de_mobile_type5_img_height">이미지 높이</label>

View File

@ -3,9 +3,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('G4_USE_SHOP') || !G4_USE_SHOP) return;
include_once(G4_LIB_PATH.'/shop.lib.php');
include_once(G4_LIB_PATH.'/thumbnail.lib.php');
//------------------------------------------------------------------------------
// 쇼핑몰 상수 모음 시작
//------------------------------------------------------------------------------
@ -53,18 +50,20 @@ define(_MISU_QUERY_, "
//==============================================================================
// 쇼핑몰 필수 실행코드 모음 시작
//==============================================================================
// 쇼핑몰 설정값 배열변수
$default = sql_fetch(" select * from {$g4['shop_default_table']} ");
if (G4_IS_MOBILE) {
$shop_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/shop/'.$default['de_shop_mobile_skin'];
$shop_skin_url = G4_MOBILE_URL .'/'.G4_SKIN_DIR.'/shop/'.$default['de_shop_mobile_skin'];
} else {
$shop_skin_path = G4_PATH.'/'.G4_SKIN_DIR.'/shop/'.$default['de_shop_mobile_skin'];
$shop_skin_url = G4_URL .'/'.G4_SKIN_DIR.'/shop/'.$default['de_shop_mobile_skin'];
}
define('G4_SHOP_SKIN_PATH', G4_PATH.'/'.G4_SKIN_DIR.'/shop/'.$default['de_shop_skin']);
define('G4_SHOP_SKIN_URL', G4_URL .'/'.G4_SKIN_DIR.'/shop/'.$default['de_shop_skin']);
define('G4_MSHOP_SKIN_PATH', G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/shop/'.$default['de_shop_mobile_skin']);
define('G4_MSHOP_SKIN_URL', G4_MOBILE_URL .'/'.G4_SKIN_DIR.'/shop/'.$default['de_shop_mobile_skin']);
//==============================================================================
// 쇼핑몰 필수 실행코드 모음 끝
//==============================================================================
include_once(G4_LIB_PATH.'/shop.lib.php');
include_once(G4_LIB_PATH.'/thumbnail.lib.php');
?>

View File

@ -14,7 +14,7 @@ $disp = new display_item(1);
// 사용할 스킨을 바꿉니다.
$disp->set_list_skin("type_user.skin.php");
// 1단계분류를 20으로 시작되는 분류로 지정합니다.
$disp->set_ca_id("20", 1);
$disp->set_category("20", 1);
echo $disp->run();
@ -82,7 +82,21 @@ class item_list
protected $view_it_icon = false; // 아이콘
protected $view_sns = false; // SNS
protected $count = 1; // 몇번째 class 호출인지를 저장합니다.
// 몇번째 class 호출인지를 저장합니다.
protected $count = 0;
// true 인 경우 페이지를 구한다.
protected $is_page = false;
// 페이지 표시를 위하여 총 상품 갯수를 구합니다.
public $total_count = 0;
// sql limit 의 시작 레코드
protected $from_record = 0;
// 외부에서 쿼리문을 넘겨줄 경우에 담아두는 변수
protected $query = "";
// $type : 상품유형 (기본으로 1~5까지 사용)
// $list_skin : 상품리스트를 노출할 스킨을 설정합니다. 스킨위치는 skin/shop/쇼핑몰설정스킨/type??.skin.php
@ -115,7 +129,7 @@ class item_list
// 1단계 분류는 (분류코드, 1)
// 2단계 분류는 (분류코드, 2)
// 3단계 분류는 (분류코드, 3)
function set_ca_id($ca_id, $level=1) {
function set_category($ca_id, $level=1) {
if ($level == 2) {
$this->ca_id2 = $ca_id;
} else if ($level == 3) {
@ -135,29 +149,48 @@ class item_list
// 특별히 설정하지 않는 경우 상품유형을 사용하는 경우는 쇼핑몰설정 값을 그대로 따릅니다.
function set_list_skin($list_skin) {
global $default;
$this->list_skin = $list_skin ? $list_skin : $default['de_type'.$this->type.'_list_skin'];
if ($this->is_mobile) {
$this->list_skin = $list_skin ? $list_skin : $default['de_mobile_type'.$this->type.'_list_skin'];
} else {
$this->list_skin = $list_skin ? $list_skin : $default['de_type'.$this->type.'_list_skin'];
}
}
// 1줄에 몇개를 노출할지를 사용한다.
// 특별히 설정하지 않는 경우 상품유형을 사용하는 경우는 쇼핑몰설정 값을 그대로 따릅니다.
function set_list_mod($list_mod) {
global $default;
$this->list_mod = $list_mod ? $list_mod : $default['de_type'.$this->type.'_list_mod'];
if ($this->is_mobile) {
$this->list_mod = $list_mod ? $list_mod : $default['de_mobile_type'.$this->type.'_list_mod'];
} else {
$this->list_mod = $list_mod ? $list_mod : $default['de_type'.$this->type.'_list_mod'];
}
}
// 몇줄을 노출할지를 사용한다.
// 특별히 설정하지 않는 경우 상품유형을 사용하는 경우는 쇼핑몰설정 값을 그대로 따릅니다.
function set_list_row($list_row) {
global $default;
$this->list_row = $list_row ? $list_row : $default['de_type'.$this->type.'_list_row'];
if ($this->is_mobile) {
$this->list_row = $list_row ? $list_row : $default['de_mobile_type'.$this->type.'_list_row'];
} else {
$this->list_row = $list_row ? $list_row : $default['de_type'.$this->type.'_list_row'];
}
if (!$this->list_row)
$this->list_row = 1;
}
// 노출이미지(썸네일생성)의 폭, 높이를 설정합니다. 높이를 0 으로 설정하는 경우 쎰네일 비율에 따릅니다.
// 특별히 설정하지 않는 경우 상품유형을 사용하는 경우는 쇼핑몰설정 값을 그대로 따릅니다.
function set_img_size($img_width, $img_height=0) {
global $default;
$this->img_width = $img_width ? $img_width : $default['de_type'.$this->type.'_img_width'];
$this->img_height = $img_height ? $img_height : $default['de_type'.$this->type.'_img_height'];
if ($this->is_mobile) {
$this->img_width = $img_width ? $img_width : $default['de_mobile_type'.$this->type.'_img_width'];
$this->img_height = $img_height ? $img_height : $default['de_mobile_type'.$this->type.'_img_height'];
} else {
$this->img_width = $img_width ? $img_width : $default['de_type'.$this->type.'_img_width'];
$this->img_height = $img_height ? $img_height : $default['de_type'.$this->type.'_img_height'];
}
}
// 특정 필드만 select 하는 경우에는 필드명을 , 로 구분하여 "field1, field2, field3, ... fieldn" 으로 인수를 넘겨줍니다.
@ -200,294 +233,96 @@ class item_list
$this->css = $css;
}
// 페이지를 노출하기 위해 true 로 설정할때 사용합니다.
function set_is_page($is_page) {
$this->is_page = $is_page;
}
// select ... limit 의 시작값
function set_from_record($from_record) {
$this->from_record = $from_record;
}
// 외부에서 쿼리문을 넘겨줄 경우에 담아둡니다.
function set_query($query) {
$this->query = $query;
}
// class 에 설정된 값으로 최종 실행합니다.
function run() {
global $g4, $config, $member, $default, $shop_skin_path, $shop_skin_url;
global $g4, $config, $member, $default;
$where = array();
if ($this->use) {
$where[] = " it_use = '1' ";
}
if ($this->type) {
$where[] = " it_type{$this->type} = '1' ";
}
if ($this->query) {
$sql = $this->query;
$result = sql_query($sql);
$this->total_count = @mysql_num_rows($result);
if ($this->ca_id || $this->ca_id2 || $this->ca_id3) {
$where_ca_id = array();
if ($this->ca_id) {
$where_ca_id[] = " ca_id like '{$this->ca_id}%' ";
}
if ($this->ca_id2) {
$where_ca_id[] = " ca_id2 like '{$this->ca_id2}%' ";
}
if ($this->ca_id3) {
$where_ca_id[] = " ca_id3 like '{$this->ca_id3}%' ";
}
$where[] = implode(" or ", $where_ca_id);
}
if ($this->order_by) {
$sql_order = " order by {$this->order_by} ";
}
if ($this->event) {
//$sql_common = " select {$this->fields} from `{$g4['shop_event_item_table']}` a left join `{$g4['shop_item_table']}` b on (a.it_id = b.it_id and a.ev_id = '{$this->event}') ";
$sql_common = " select {$this->fields} from `{$g4['shop_event_item_table']}` a left join `{$g4['shop_item_table']}` b on (a.it_id = b.it_id) ";
$where[] = " a.ev_id = '{$this->event}' ";
} else {
$sql_common = " select {$this->fields} from `{$g4['shop_item_table']}` ";
}
$sql_where = " where " . implode(" and ", $where);
$sql = $sql_common . $sql_where . " limit " . ($this->list_mod * $this->list_row);
$result = sql_query($sql);
//echo (int)mysql_num_rows($result);
$where = array();
if ($this->use) {
$where[] = " it_use = '1' ";
}
if ($this->type) {
$where[] = " it_type{$this->type} = '1' ";
}
if ($this->ca_id || $this->ca_id2 || $this->ca_id3) {
$where_ca_id = array();
if ($this->ca_id) {
$where_ca_id[] = " ca_id like '{$this->ca_id}%' ";
}
if ($this->ca_id2) {
$where_ca_id[] = " ca_id2 like '{$this->ca_id2}%' ";
}
if ($this->ca_id3) {
$where_ca_id[] = " ca_id3 like '{$this->ca_id3}%' ";
}
$where[] = implode(" or ", $where_ca_id);
}
if ($this->order_by) {
$sql_order = " order by {$this->order_by} ";
}
if ($this->event) {
$sql_select = " select {$this->fields} ";
$sql_common = " from `{$g4['shop_event_item_table']}` a left join `{$g4['shop_item_table']}` b on (a.it_id = b.it_id) ";
$where[] = " a.ev_id = '{$this->event}' ";
} else {
$sql_select = " select {$this->fields} ";
$sql_common = " from `{$g4['shop_item_table']}` ";
}
$sql_where = " where " . implode(" and ", $where);
$sql_limit = " limit " . $this->from_record . " , " . ($this->list_mod * $this->list_row);
$sql = $sql_select . $sql_common . $sql_where . $sql_limit;
$result = sql_query($sql);
if ($this->is_page) {
$sql2 = " select count(*) as cnt " . $sql_common . $sql_where;
$row2 = sql_fetch($sql2);
$this->total_count = $row2['cnt'];
}
}
$sns_url = G4_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']);
if ($this->is_mobile) {
$file = G4_MSHOP_PATH."/{$this->list_skin}";
$file = G4_MSHOP_SKIN_PATH."/{$this->list_skin}";
} else {
$file = "{$shop_skin_path}/{$this->list_skin}";
$file = G4_SHOP_SKIN_PATH."/{$this->list_skin}";
}
if ($this->list_skin == "") {
return $this->count."번 item_list() 의 스킨파일이 지정되지 않았습니다.";
} else if (!file_exists($file)) {
return "{$shop_skin_url}/{$this->list_skin} 파일을 찾을 수 없습니다.";
} else {
ob_start();
$list_mod = $this->list_mod;
include($file);
$content = ob_get_contents();
ob_end_clean();
return $content;
}
}
}
class display_item
{
// 상품유형 : 기본적으로 1~5 까지 사용할수 있으며 0 으로 설정하는 경우 상품유형별로 노출하지 않습니다.
// 분류나 이벤트로 노출하는 경우 상품유형을 0 으로 설정하면 됩니다.
protected $type;
protected $list_skin;
protected $list_mod;
protected $list_row;
protected $img_width;
protected $img_height;
// 상품상세보기 경로
protected $href = "";
// select 에 사용되는 필드
protected $fields = "*";
// 분류코드로만 사용하는 경우 상품유형($type)을 0 으로 설정하면 됩니다.
protected $ca_id = "";
protected $ca_id2 = "";
protected $ca_id3 = "";
// 노출순서
protected $order_by = "it_order, it_id desc";
// 상품의 이벤트번호를 저장합니다.
protected $event = "";
// 스킨의 기본 css 를 다른것으로 사용하고자 할 경우에 사용합니다.
protected $css = "";
// 상품의 사용여부를 따져 노출합니다. 0 인 경우 모든 상품을 노출합니다.
protected $use = 1;
// 모바일에서 노출하고자 할 경우에 true 로 설정합니다.
protected $is_mobile = false;
// 기본으로 보여지는 필드들
protected $view_it_id = false; // 상품코드
protected $view_it_img = true; // 상품이미지
protected $view_it_name = true; // 상품명
protected $view_it_price = true; // 판매가격
protected $view_it_cust_price = false; // 소비자가
protected $view_it_icon = false; // 아이콘
protected $view_sns = false; // SNS
protected $count = 1; // 몇번째 class 호출인지를 저장합니다.
// $type : 상품유형 (기본으로 1~5까지 사용)
// $list_skin : 상품리스트를 노출할 스킨을 설정합니다. 스킨위치는 skin/shop/쇼핑몰설정스킨/type??.skin.php
// $list_mod : 1줄에 몇개의 상품을 노출할지를 설정합니다.
// $list_row : 상품을 몇줄에 노출할지를 설정합니다.
// $img_width : 상품이미지의 폭을 설정합니다.
// $img_height : 상품이미지의 높이을 설정합니다. 0 으로 설정하는 경우 썸네일 이미지의 높이는 폭에 비례하여 생성합니다.
function __construct($type=0, $list_skin='', $list_mod='', $list_row='', $img_width='', $img_height=0) {
global $default;
$this->type = $type;
if ($type) {
$this->set_list_skin($list_skin);
$this->set_list_mod($list_mod);
$this->set_list_row($list_row);
$this->set_img_size($img_width);
}
$this->ca_id = $ca_id;
$this->set_href(G4_SHOP_URL.'/item.php?it_id=');
$this->count++;
}
// 리스트 스킨을 바꾸고자 하는 경우에 사용합니다.
// 리스트 스킨의 위치는 skin/shop/쇼핑몰설정스킨/type??.skin.php 입니다.
// 특별히 설정하지 않는 경우 상품유형을 사용하는 경우는 쇼핑몰설정 값을 그대로 따릅니다.
function set_list_skin($list_skin) {
global $default;
$this->list_skin = $list_skin ? $list_skin : $default['de_type'.$this->type.'_list_skin'];
}
// 1줄에 몇개를 노출할지를 사용한다.
// 특별히 설정하지 않는 경우 상품유형을 사용하는 경우는 쇼핑몰설정 값을 그대로 따릅니다.
function set_list_mod($list_mod) {
global $default;
$this->list_mod = $list_mod ? $list_mod : $default['de_type'.$this->type.'_list_mod'];
}
// 몇줄을 노출할지를 사용한다.
// 특별히 설정하지 않는 경우 상품유형을 사용하는 경우는 쇼핑몰설정 값을 그대로 따릅니다.
function set_list_row($list_row) {
global $default;
$this->list_row = $list_row ? $list_row : $default['de_type'.$this->type.'_list_row'];
}
// 노출이미지(썸네일생성)의 폭, 높이를 설정합니다. 높이를 0 으로 설정하는 경우 쎰네일 비율에 따릅니다.
// 특별히 설정하지 않는 경우 상품유형을 사용하는 경우는 쇼핑몰설정 값을 그대로 따릅니다.
function set_img_size($img_width, $img_height=0) {
global $default;
$this->img_width = $img_width ? $img_width : $default['de_type'.$this->type.'_img_width'];
$this->img_height = $img_height ? $img_height : $default['de_type'.$this->type.'_img_height'];
}
// 특정 필드만 select 하는 경우에는 필드명을 , 로 구분하여 "field1, field2, field3, ... fieldn" 으로 인수를 넘겨줍니다.
function set_fields($str) {
$this->fields = $str;
}
// 특정 필드로 정렬을 하는 경우 필드와 정렬순서를 , 로 구분하여 "field1 desc, field2 asc, ... fieldn desc " 으로 인수를 넘겨줍니다.
function set_order_by($str) {
$this->order_by = $str;
}
// 사용하는 상품외에 모든 상품을 노출하려면 0 을 인수로 넘겨줍니다.
function set_use($use) {
$this->use = $use;
}
// 모바일로 사용하려는 경우 true 를 인수로 넘겨줍니다.
function set_mobile($mobile=true) {
$this->is_mobile = $mobile;
}
// 분류코드로 검색을 하고자 하는 경우 아래와 같이 인수를 넘겨줍니다.
// 1단계 분류는 (분류코드, 1)
// 2단계 분류는 (분류코드, 2)
// 3단계 분류는 (분류코드, 3)
function set_ca_id($ca_id, $level=1) {
if ($level == 2) {
$this->ca_id2 = $ca_id;
} else if ($level == 3) {
$this->ca_id3 = $ca_id;
} else {
$this->ca_id = $ca_id;
}
}
// 스킨에서 특정 필드를 노출하거나 하지 않게 할수 있습니다.
// 가령 소비자가는 처음에 노출되지 않도록 설정되어 있짐나 노출을 하려면
// ("it_cust_price", true) 와 같이 인수를 넘겨줍니다.
// 이때 인수로 넘겨주는 값은 스킨에 정의된 필드만 가능하다는 것입니다.
function set_view($field, $view=true) {
$this->{"view_".$field} = $view;
}
// anchor 태그에 하이퍼링크를 다른 주소로 걸거나 아예 링크를 걸지 않을 수 있습니다.
// 인수를 "" 공백으로 넘기면 링크를 걸지 않습니다.
function set_href($href) {
$this->href = $href;
}
// 이벤트코드를 인수로 넘기게 되면 해당 이벤트에 속한 상품을 노출합니다.
function set_event($ev_id) {
$this->event = $ev_id;
}
// ul 태그의 css 를 교체할수 있다. "sct sct_abc" 를 인수로 넘기게 되면
// 기존의 ul 태그에 걸린 css 는 무시되며 인수로 넘긴 css 가 사용됩니다.
function set_css($css) {
$this->css = $css;
}
// class 에 설정된 값으로 최종 실행합니다.
function run() {
global $g4, $config, $member, $default, $shop_skin_path, $shop_skin_url;
$where = array();
if ($this->use) {
$where[] = " it_use = '1' ";
}
if ($this->type) {
$where[] = " it_type{$this->type} = '1' ";
}
if ($this->ca_id || $this->ca_id2 || $this->ca_id3) {
$where_ca_id = array();
if ($this->ca_id) {
$where_ca_id[] = " ca_id like '{$this->ca_id}%' ";
}
if ($this->ca_id2) {
$where_ca_id[] = " ca_id2 like '{$this->ca_id2}%' ";
}
if ($this->ca_id3) {
$where_ca_id[] = " ca_id3 like '{$this->ca_id3}%' ";
}
$where[] = implode(" or ", $where_ca_id);
}
if ($this->order_by) {
$sql_order = " order by {$this->order_by} ";
}
if ($this->event) {
//$sql_common = " select {$this->fields} from `{$g4['shop_event_item_table']}` a left join `{$g4['shop_item_table']}` b on (a.it_id = b.it_id and a.ev_id = '{$this->event}') ";
$sql_common = " select {$this->fields} from `{$g4['shop_event_item_table']}` a left join `{$g4['shop_item_table']}` b on (a.it_id = b.it_id) ";
$where[] = " a.ev_id = '{$this->event}' ";
} else {
$sql_common = " select {$this->fields} from `{$g4['shop_item_table']}` ";
}
$sql_where = " where " . implode(" and ", $where);
$sql = $sql_common . $sql_where . " limit " . ($this->list_mod * $this->list_row);
$result = sql_query($sql);
//echo (int)mysql_num_rows($result);
$sns_url = G4_SHOP_URL.'/item.php?it_id='.$row['it_id'];
$sns_title = get_text($row['it_name']).' | '.get_text($config['cf_title']);
if ($this->is_mobile) {
$file = G4_MSHOP_PATH."/{$this->list_skin}";
} else {
$file = "{$shop_skin_path}/{$this->list_skin}";
}
if ($this->list_skin == "") {
return $this->count."번 display_item() 의 스킨파일이 지정되지 않았습니다.";
} else if (!file_exists($file)) {
return "{$shop_skin_url}/{$this->list_skin} 파일을 찾을 수 없습니다.";
return $file." 파일을 찾을 수 없습니다.";
} else {
ob_start();
$list_mod = $this->list_mod;
@ -855,7 +690,7 @@ function is_null_time($datetime)
//function display_type($type, $skin_file, $list_mod, $list_row, $img_width, $img_height, $ca_id="")
function display_type($type, $list_skin='', $list_mod='', $list_row='', $img_width='', $img_height='', $ca_id='')
{
global $member, $g4, $config, $default, $shop_skin_path, $shop_skin_url;
global $member, $g4, $config, $default;
if (!$default["de_type{$type}_list_use"]) return "";
@ -881,9 +716,9 @@ function display_type($type, $list_skin='', $list_mod='', $list_row='', $img_wid
*/
//$file = G4_SHOP_PATH.'/'.$skin_file;
$file = $shop_skin_path.'/'.$list_skin;
$file = G4_SHOP_SKIN_PATH.'/'.$list_skin;
if (!file_exists($file)) {
return $shop_skin_url.'/'.$list_skin.' 파일을 찾을 수 없습니다.';
return G4_SHOP_SKIN_URL.'/'.$list_skin.' 파일을 찾을 수 없습니다.';
} else {
$td_width = (int)(100 / $list_mod);
ob_start();

View File

@ -13,13 +13,11 @@ include_once(G4_MSHOP_PATH.'/shop.head.php');
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=3">최신상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 최신상품 모음</p>
</header>
<?php
// 최신상품
$type = 3;
if ($default['de_mobile_type'.$type.'_list_use'])
{
mobile_display_type($type, $default["de_mobile_type{$type}_list_skin"], $default["de_mobile_type{$type}_list_row"], $default["de_mobile_type{$type}_img_width"], $default["de_mobile_type{$type}_img_height"]);
}
<?php
$list = new item_list();
$list->set_mobile(true);
$list->set_type(1);
echo $list->run();
?>
</section>
@ -28,13 +26,11 @@ include_once(G4_MSHOP_PATH.'/shop.head.php');
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=1">히트상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 히트상품 모음</p>
</header>
<?php
// 히트상품
$type = 1;
if ($default['de_mobile_type'.$type.'_list_use'])
{
mobile_display_type($type, $default["de_mobile_type{$type}_list_skin"], $default["de_mobile_type{$type}_list_row"], $default["de_mobile_type{$type}_img_width"], $default["de_mobile_type{$type}_img_height"]);
}
<?php
$list = new item_list();
$list->set_mobile(true);
$list->set_type(2);
echo $list->run();
?>
</section>
@ -43,13 +39,11 @@ include_once(G4_MSHOP_PATH.'/shop.head.php');
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=2">추천상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 추천상품 모음</p>
</header>
<?php
// 추천상품
$type = 2;
if ($default['de_mobile_type'.$type.'_list_use'])
{
mobile_display_type($type, $default["de_mobile_type{$type}_list_skin"], $default["de_mobile_type{$type}_list_row"], $default["de_mobile_type{$type}_img_width"], $default["de_mobile_type{$type}_img_height"]);
}
<?php
$list = new item_list();
$list->set_mobile(true);
$list->set_type(3);
echo $list->run();
?>
</section>
@ -58,13 +52,11 @@ include_once(G4_MSHOP_PATH.'/shop.head.php');
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=4">인기상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 인기상품 모음</p>
</header>
<?php
// 인기상품
$type = 4;
if ($default['de_mobile_type'.$type.'_list_use'])
{
mobile_display_type($type, $default["de_mobile_type{$type}_list_skin"], $default["de_mobile_type{$type}_list_row"], $default["de_mobile_type{$type}_img_width"], $default["de_mobile_type{$type}_img_height"]);
}
<?php
$list = new item_list();
$list->set_mobile(true);
$list->set_type(4);
echo $list->run();
?>
</section>
@ -73,13 +65,11 @@ include_once(G4_MSHOP_PATH.'/shop.head.php');
<h2><a href="<?php echo G4_SHOP_URL; ?>/listtype.php?type=5">할인상품</a></h2>
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 할인상품 모음</p>
</header>
<?php
// 할인상품
$type = 5;
if ($default['de_mobile_type'.$type.'_list_use'])
{
mobile_display_type($type, $default["de_mobile_type{$type}_list_skin"], $default["de_mobile_type{$type}_list_row"], $default["de_mobile_type{$type}_img_width"], $default["de_mobile_type{$type}_img_height"]);
}
<?php
$list = new item_list();
$list->set_mobile(true);
$list->set_type(5);
echo $list->run();
?>
</section>

View File

@ -252,10 +252,10 @@ else
$sns_url = G4_SHOP_URL.'/item.php?it_id='.$it['it_id'];
?>
고객선호도 <span>별<?php echo $score?>개</span>
<img src="<?php echo G4_URL; ?>/img/shop/s_star<?php echo $score?>.png" alt="" class="sit_star">
<?php echo get_sns_share_link('facebook', $sns_url, $sns_title, G4_URL.'/img/shop/sns_fb2.png'); ?>
<?php echo get_sns_share_link('twitter', $sns_url, $sns_title, G4_URL.'/img/shop/sns_twt2.png'); ?>
<?php echo get_sns_share_link('googleplus', $sns_url, $sns_title, G4_URL.'/img/shop/sns_goo2.png'); ?>
<img src="<?php echo G4_SHOP_URL; ?>/img/s_star<?php echo $score?>.png" alt="" class="sit_star">
<?php echo get_sns_share_link('facebook', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_fb2.png'); ?>
<?php echo get_sns_share_link('twitter', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_twt2.png'); ?>
<?php echo get_sns_share_link('googleplus', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_goo2.png'); ?>
</div>
<?php } ?>
<table class="sit_ov_tbl">
@ -609,6 +609,7 @@ else
<div class="sct_wrap">
<?php
/*
$img_width = 230;
$img_height = 230;
@ -619,10 +620,21 @@ else
and b.it_use='1' ";
$result = sql_query($sql);
$num = @mysql_num_rows($result);
*/
$sql = " select b.* from {$g4['shop_item_relation_table']} a left join {$g4['shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' ";
$list = new item_list("list.10.skin.php", 3, 1, 150, 0);
$list->set_mobile(true);
$list->set_query($sql);
echo $list->run();
/*
if ($num)
include G4_MSHOP_PATH.'/maintype10.inc.php';
else
echo '<p class="sit_empty">이 상품과 관련된 상품이 없습니다.</p>';
*/
?>
</div>
</section>

View File

@ -2,7 +2,7 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<link rel="stylesheet" href="<?php echo $shop_skin_url ?>/style.css">
<link rel="stylesheet" href="<?php echo G4_SHOP_SKIN_URL; ?>/style.css">
<!-- 상품진열 10 시작 { -->
<?php

View File

@ -52,8 +52,9 @@ exit;
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 히트상품 모음</p>
</header>
<?php
$disp = new display_item(1);
echo $disp->run();
$list = new item_list();
$list->set_type(1);
echo $list->run();
?>
</section>
<!-- } 히트상품 끝 -->
@ -65,8 +66,9 @@ exit;
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 추천상품 모음</p>
</header>
<?php
$disp = new display_item(2);
echo $disp->run();
$list = new item_list();
$list->set_type(2);
echo $list->run();
?>
</section>
<!-- } 추천상품 끝 -->
@ -78,8 +80,9 @@ exit;
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 최신상품 모음</p>
</header>
<?php
$disp = new display_item(3);
echo $disp->run();
$list = new item_list();
$list->set_type(3);
echo $list->run();
?>
</section>
<!-- } 최신상품 끝 -->
@ -91,8 +94,9 @@ exit;
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 인기상품 모음</p>
</header>
<?php
$disp = new display_item(4);
echo $disp->run();
$list = new item_list();
$list->set_type(4);
echo $list->run();
?>
</section>
<!-- } 인기상품 끝 -->
@ -104,8 +108,9 @@ exit;
<p class="sct_wrap_hdesc"><?php echo $config['cf_title']; ?> 할인상품 모음</p>
</header>
<?php
$disp = new display_item(5);
echo $disp->run();
$list = new item_list();
$list->set_type(5);
echo $list->run();
?>
</section>
<!-- } 할인상품 끝 -->

View File

@ -620,17 +620,25 @@ else
<div class="sct_wrap">
<?php
/*
$list_mod = 3;
$img_width = 230;
$img_height = 230;
*/
$sql = " select b.* from {$g4['shop_item_relation_table']} a left join {$g4['shop_item_table']} b on (a.it_id2=b.it_id) where a.it_id = '{$it['it_id']}' and b.it_use='1' ";
$result = sql_query($sql);
$num = @mysql_num_rows($result);
$list = new item_list("list.10.skin.php", 3, 1, 150, 0);
$list->set_mobile(true);
$list->set_query($sql);
echo $list->run();
/*
if ($num)
include G4_SHOP_PATH.'/maintype10.inc.php';
else
echo '<p class="sit_empty">이 상품과 관련된 상품이 없습니다.</p>';
*/
?>
</div>
</section>

View File

@ -80,7 +80,7 @@ if ($is_admin)
$error = '<p class="sct_noitem">등록된 상품이 없습니다.</p>';
// 리스트 유형별로 출력
$list_file = G4_SHOP_PATH.'/'.$ca['ca_skin'];
$list_file = G4_SHOP_SKIN_PATH.'/'.$ca['ca_skin'];
if (file_exists($list_file)) {
//display_type(2, "maintype10.inc.php", 4, 2, 100, 100, $ca[ca_id]);
@ -101,9 +101,23 @@ if ($is_admin)
echo '</div>';
*/
$list = new item_list(0, "type10.skin.php", $ca['ca_list_mod'], $ca['ca_list_row'], $ca['ca_img_width'], $ca['ca_img_height'], $ca_id);
// 총몇개 = 한줄에 몇개 * 몇줄
$items = $ca['ca_list_mod'] * $ca['ca_list_row'];
// 페이지가 없으면 첫 페이지 (1 페이지)
if ($page == "") $page = 1;
// 시작 레코드 구함
$from_record = ($page - 1) * $items;
$list = new item_list($ca['ca_skin'], $ca['ca_list_mod'], $ca['ca_list_row'], $ca['ca_img_width'], $ca['ca_img_height']);
$list->set_category($ca['ca_id']);
$list->set_is_page(true);
$list->set_from_record($from_record);
echo $list->run();
// where 된 전체 상품수
$total_count = $list->total_count;
// 전체 페이지 계산
$total_page = ceil($total_count / $items);
}
else
{

View File

@ -0,0 +1,75 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<link rel="stylesheet" href="<?php echo G4_SHOP_SKIN_URL; ?>/style.css">
<!-- 상품진열 10 시작 { -->
<?php
for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($this->list_mod >= 2) { // 1줄 이미지 : 2개 이상
if ($i%$this->list_mod == 0) $sct_last = 'sct_last'; // 줄 마지막
else if ($i%$this->list_mod == 1) $sct_last = 'sct_clear'; // 줄 첫번째
else $sct_last = '';
} else { // 1줄 이미지 : 1개
$sct_last = 'sct_clear';
}
if ($i == 1) {
if ($this->css) {
echo "<ul class=\"{$this->css}\">\n";
} else {
echo "<ul class=\"sct sct_10\">\n";
}
}
echo "<li class=\"sct_li {$sct_last}\">\n";
if ($this->href) {
echo "<a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
}
if ($this->view_it_img) {
echo "<span class=\"sct_img\">".get_it_image($row['it_id'], $this->img_width, $this->img_height)."</span>\n";
}
if ($this->view_it_id) {
echo "<b>".stripslashes($row['it_id'])."</b>\n";
}
if ($this->view_it_name) {
echo "<b>".stripslashes($row['it_name'])."</b>\n";
}
if ($this->view_it_cust_price) {
echo "<span class=\"sct_cost\">".display_price($row['it_cust_price'])."</span>\n";
}
if ($this->view_it_price) {
echo "<span class=\"sct_cost\">".display_price(get_price($row), $row['it_tel_inq'])."</span>\n";
}
if ($this->view_it_icon) {
echo "<span class=\"sct_icon\">".item_icon($row)."</span>\n";
}
if ($this->view_sns) {
echo "<div class=\"sct_sns\">";
echo get_sns_share_link('facebook', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_fb.png');
echo get_sns_share_link('twitter', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_twt.png');
echo get_sns_share_link('googleplus', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_goo.png');
echo "</div>\n";
}
if ($this->href) {
echo "</a>\n";
}
echo "</li>\n";
}
if ($i > 1) echo "</ul>\n";
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
?>
<!-- } 상품진열 10 끝 -->

View File

@ -2,7 +2,7 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<link rel="stylesheet" href="<?php echo $shop_skin_url ?>/style.css">
<link rel="stylesheet" href="<?php echo G4_SHOP_SKIN_URL; ?>/style.css">
<!-- 상품진열 11 시작 { -->
<?php

View File

@ -1,9 +1,8 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// $list_mod 가로 나열 수
?>
<link rel="stylesheet" href="<?php echo $shop_skin_url ?>/style.css">
<link rel="stylesheet" href="<?php echo G4_SHOP_SKIN_URL; ?>/style.css">
<!-- 상품진열 12 시작 { -->
<?php

View File

@ -2,11 +2,9 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 관련상품 스킨은 사품을 한줄에 하나만 표시하며 해당 상품에 관련상품이 등록되어 있는 경우 기본으로 7개까지 노출합니다.
// $list_mod 가로 나열 수
?>
<link rel="stylesheet" href="<?php echo $shop_skin_url ?>/style.css">
<link rel="stylesheet" href="<?php echo G4_SHOP_SKIN_URL; ?>/style.css">
<!-- 상품진열 13 시작 { -->
<?php