영카트 관리자모드 분류출력 개선
This commit is contained in:
@ -67,7 +67,9 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
|||||||
for ($i=0; $i<$len; $i++)
|
for ($i=0; $i<$len; $i++)
|
||||||
$nbsp .= " ";
|
$nbsp .= " ";
|
||||||
|
|
||||||
$category_select .= "<option value=\"{$row['ca_id']}\">$nbsp{$row['ca_name']}</option>\n";
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row['ca_id']) : $row['ca_name'];
|
||||||
|
$category_select .= "<option value=\"{$row['ca_id']}\">$nbsp{$category_path}</option>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 모바일 1줄당 이미지수 필드 추가
|
// 모바일 1줄당 이미지수 필드 추가
|
||||||
|
|||||||
@ -107,7 +107,9 @@ if($ev_id) {
|
|||||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||||
$nbsp = "";
|
$nbsp = "";
|
||||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||||
|
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -146,9 +146,11 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
|||||||
$nbsp = "";
|
$nbsp = "";
|
||||||
for ($i=0; $i<$len; $i++)
|
for ($i=0; $i<$len; $i++)
|
||||||
$nbsp .= " ";
|
$nbsp .= " ";
|
||||||
|
|
||||||
$category_select .= "<option value=\"{$row['ca_id']}\">$nbsp{$row['ca_name']}</option>\n";
|
// 전체 카테고리 경로 표시 (예: 남성의류 > 상의 > 셔츠)
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row['ca_id']) : $row['ca_name'];
|
||||||
|
$category_select .= "<option value=\"{$row['ca_id']}\">$nbsp{$category_path}</option>\n";
|
||||||
|
|
||||||
$script .= "ca_use['{$row['ca_id']}'] = {$row['ca_use']};\n";
|
$script .= "ca_use['{$row['ca_id']}'] = {$row['ca_use']};\n";
|
||||||
$script .= "ca_stock_qty['{$row['ca_id']}'] = {$row['ca_stock_qty']};\n";
|
$script .= "ca_stock_qty['{$row['ca_id']}'] = {$row['ca_stock_qty']};\n";
|
||||||
//$script .= "ca_explan_html['$row[ca_id]'] = $row[ca_explan_html];\n";
|
//$script .= "ca_explan_html['$row[ca_id]'] = $row[ca_explan_html];\n";
|
||||||
@ -1394,7 +1396,9 @@ $(function(){
|
|||||||
for ($i=0; $i<$len; $i++)
|
for ($i=0; $i<$len; $i++)
|
||||||
$nbsp .= " ";
|
$nbsp .= " ";
|
||||||
|
|
||||||
echo "<option value=\"{$row['ca_id']}\">$nbsp{$row['ca_name']}</option>\n";
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row['ca_id']) : $row['ca_name'];
|
||||||
|
echo "<option value=\"{$row['ca_id']}\">$nbsp{$category_path}</option>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -25,7 +25,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
|
|||||||
for ($i=0; $i<$len; $i++) {
|
for ($i=0; $i<$len; $i++) {
|
||||||
$nbsp .= ' ';
|
$nbsp .= ' ';
|
||||||
}
|
}
|
||||||
$ca_list .= '<option value="'.$row['ca_id'].'">'.$nbsp.$row['ca_name'].'</option>'.PHP_EOL;
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row['ca_id']) : $row['ca_name'];
|
||||||
|
$ca_list .= '<option value="'.$row['ca_id'].'">'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
$where = " and ";
|
$where = " and ";
|
||||||
@ -100,7 +101,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||||
$nbsp = '';
|
$nbsp = '';
|
||||||
for ($i=0; $i<$len; $i++) $nbsp .= ' ';
|
for ($i=0; $i<$len; $i++) $nbsp .= ' ';
|
||||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sca, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||||
|
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sca, $row1['ca_id']).'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -79,7 +79,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
$nbsp = "";
|
$nbsp = "";
|
||||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||||
$selected = ($row1['ca_id'] == $sca) ? ' selected="selected"' : '';
|
$selected = ($row1['ca_id'] == $sca) ? ' selected="selected"' : '';
|
||||||
echo '<option value="'.$row1['ca_id'].'"'.$selected.'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||||
|
echo '<option value="'.$row1['ca_id'].'"'.$selected.'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -83,7 +83,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||||
$nbsp = "";
|
$nbsp = "";
|
||||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||||
|
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -82,7 +82,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||||
$nbsp = "";
|
$nbsp = "";
|
||||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||||
|
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -98,7 +98,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||||
$nbsp = "";
|
$nbsp = "";
|
||||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sca, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].PHP_EOL;
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||||
|
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sca, $row1['ca_id']).'>'.$nbsp.$category_path.PHP_EOL;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -81,7 +81,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
$nbsp = "";
|
$nbsp = "";
|
||||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||||
$selected = ($row1['ca_id'] == $sca) ? ' selected="selected"' : '';
|
$selected = ($row1['ca_id'] == $sca) ? ' selected="selected"' : '';
|
||||||
echo '<option value="'.$row1['ca_id'].'"'.$selected.'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||||
|
echo '<option value="'.$row1['ca_id'].'"'.$selected.'>'.$nbsp.$category_path.PHP_EOL;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -84,7 +84,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||||
$nbsp = "";
|
$nbsp = "";
|
||||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||||
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$row1['ca_name'].'</option>'.PHP_EOL;
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||||
|
echo '<option value="'.$row1['ca_id'].'" '.get_selected($sel_ca_id, $row1['ca_id']).'>'.$nbsp.$category_path.'</option>'.PHP_EOL;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -71,7 +71,9 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
|
|||||||
$len = strlen($row1['ca_id']) / 2 - 1;
|
$len = strlen($row1['ca_id']) / 2 - 1;
|
||||||
$nbsp = "";
|
$nbsp = "";
|
||||||
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
for ($i=0; $i<$len; $i++) $nbsp .= " ";
|
||||||
echo "<option value='{$row1['ca_id']}'".get_selected($row1['ca_id'], $sel_ca_id).">$nbsp{$row1['ca_name']}\n";
|
// 전체 카테고리 경로 표시
|
||||||
|
$category_path = function_exists('get_shop_category_path') ? get_shop_category_path($row1['ca_id']) : $row1['ca_name'];
|
||||||
|
echo "<option value='{$row1['ca_id']}'".get_selected($row1['ca_id'], $sel_ca_id).">$nbsp{$category_path}\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -2770,6 +2770,50 @@ function get_item_images_info($it, $size=array(), $image_width=0, $image_height=
|
|||||||
return $images;
|
return $images;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 카테고리 전체 경로를 가져오는 함수 (예: 남성의류 > 상의 > 셔츠)
|
||||||
|
function get_shop_category_path($ca_id, $separator = ' > ')
|
||||||
|
{
|
||||||
|
global $g5;
|
||||||
|
static $category_cache = array(); // 카테고리명 캐시
|
||||||
|
static $path_cache = array(); // 경로 캐시
|
||||||
|
|
||||||
|
if (!$ca_id) return '';
|
||||||
|
|
||||||
|
// 동일한 separator로 이미 조회한 경로가 있으면 캐시에서 반환
|
||||||
|
$cache_key = $ca_id . '|' . $separator;
|
||||||
|
if (isset($path_cache[$cache_key])) {
|
||||||
|
return $path_cache[$cache_key];
|
||||||
|
}
|
||||||
|
|
||||||
|
$path_arr = array();
|
||||||
|
$ca_id_len = strlen($ca_id);
|
||||||
|
|
||||||
|
// 카테고리 ID를 2자리씩 분할하여 각 단계의 카테고리명을 조회
|
||||||
|
for ($i = 2; $i <= $ca_id_len; $i += 2) {
|
||||||
|
$current_ca_id = substr($ca_id, 0, $i);
|
||||||
|
|
||||||
|
// 캐시에 없으면 DB 조회
|
||||||
|
if (!isset($category_cache[$current_ca_id])) {
|
||||||
|
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$current_ca_id' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
if ($row) {
|
||||||
|
$category_cache[$current_ca_id] = $row['ca_name'];
|
||||||
|
} else {
|
||||||
|
$category_cache[$current_ca_id] = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($category_cache[$current_ca_id]) {
|
||||||
|
$path_arr[] = $category_cache[$current_ca_id];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = implode($separator, $path_arr);
|
||||||
|
$path_cache[$cache_key] = $result; // 결과를 캐시에 저장
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
function check_payment_method($od_settle_case) {
|
function check_payment_method($od_settle_case) {
|
||||||
global $default;
|
global $default;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user