diff --git a/adm/theme_preview.php b/adm/theme_preview.php index 2dd0b3965..dd5467d4a 100644 --- a/adm/theme_preview.php +++ b/adm/theme_preview.php @@ -33,7 +33,7 @@ $board = sql_fetch(" select * from {$g5['board_table']} where bo_table = '$bo_ta $write_table = $g5['write_prefix'] . $bo_table; // theme.config.php 미리보기 게시판 스킨이 설정돼 있다면 -$tconfig = get_theme_config_value($theme, 'set_default_skin, preview_board_skin, preview_mobile_board_skin, de_shop_skin, de_shop_mobile_skin'); +$tconfig = get_theme_config_value($theme); if($mode == 'list' || $mode == 'view') { if($tconfig['preview_board_skin']) $board['bo_skin'] = preg_match('#^theme/.+$#', $tconfig['preview_board_skin']) ? $tconfig['preview_board_skin'] : 'theme/'.$tconfig['preview_board_skin']; @@ -78,6 +78,27 @@ if($tconfig['de_shop_skin']) if($tconfig['de_shop_mobile_skin']) $default['de_shop_mobile_skin'] = preg_match('#^theme/.+$#', $tconfig['de_shop_mobile_skin']) ? $tconfig['de_shop_mobile_skin'] : 'theme/'.$tconfig['de_shop_mobile_skin']; +// 쇼핑몰초기화면 변수 재설정 +for($i=1; $i<=5; $i++) { + $default['de_type'.$i.'_list_use'] = (isset($tconfig['de_type'.$i.'_list_use']) && $tconfig['de_type'.$i.'_list_use']) ? $tconfig['de_type'.$i.'_list_use'] : $default['de_type'.$i.'_list_use']; + $default['de_type'.$i.'_list_skin'] = (isset($tconfig['de_type'.$i.'_list_skin']) && $tconfig['de_type'.$i.'_list_skin']) ? $tconfig['de_type'.$i.'_list_skin'] : $default['de_type'.$i.'_list_skin']; + $default['de_type'.$i.'_list_mod'] = (isset($tconfig['de_type'.$i.'_list_mod']) && $tconfig['de_type'.$i.'_list_mod']) ? $tconfig['de_type'.$i.'_list_mod'] : $default['de_type'.$i.'_list_mod']; + $default['de_type'.$i.'_list_row'] = (isset($tconfig['de_type'.$i.'_list_row']) && $tconfig['de_type'.$i.'_list_row']) ? $tconfig['de_type'.$i.'_list_row'] : $default['de_type'.$i.'_list_row']; + $default['de_type'.$i.'_img_width'] = (isset($tconfig['de_type'.$i.'_img_width']) && $tconfig['de_type'.$i.'_img_width']) ? $tconfig['de_type'.$i.'_img_width'] : $default['de_type'.$i.'_img_width']; + $default['de_type'.$i.'_img_height'] = (isset($tconfig['de_type'.$i.'_img_height']) && $tconfig['de_type'.$i.'_img_height']) ? $tconfig['de_type'.$i.'_img_height'] : $default['de_type'.$i.'_img_height']; + + $default['de_mobile_type'.$i.'_list_use'] = (isset($tconfig['de_mobile_type'.$i.'_list_use']) && $tconfig['de_mobile_type'.$i.'_list_use']) ? $tconfig['de_mobile_type'.$i.'_list_use'] : $default['de_mobile_type'.$i.'_list_use']; + $default['de_mobile_type'.$i.'_list_skin'] = (isset($tconfig['de_mobile_type'.$i.'_list_skin']) && $tconfig['de_mobile_type'.$i.'_list_skin']) ? $tconfig['de_mobile_type'.$i.'_list_skin'] : $default['de_mobile_type'.$i.'_list_skin']; + $default['de_mobile_type'.$i.'_list_mod'] = (isset($tconfig['de_mobile_type'.$i.'_list_mod']) && $tconfig['de_mobile_type'.$i.'_list_mod']) ? $tconfig['de_mobile_type'.$i.'_list_mod'] : $default['de_mobile_type'.$i.'_list_mod']; + $default['de_mobile_type'.$i.'_list_row'] = (isset($tconfig['de_mobile_type'.$i.'_list_row']) && $tconfig['de_mobile_type'.$i.'_list_row']) ? $tconfig['de_mobile_type'.$i.'_list_row'] : $default['de_mobile_type'.$i.'_list_row']; + $default['de_mobile_type'.$i.'_img_width'] = (isset($tconfig['de_mobile_type'.$i.'_img_width']) && $tconfig['de_mobile_type'.$i.'_img_width']) ? $tconfig['de_mobile_type'.$i.'_img_width'] : $default['de_mobile_type'.$i.'_img_width']; + $default['de_mobile_type'.$i.'_img_height'] = (isset($tconfig['de_mobile_type'.$i.'_img_height']) && $tconfig['de_mobile_type'.$i.'_img_height']) ? $tconfig['de_mobile_type'.$i.'_img_height'] : $default['de_mobile_type'.$i.'_img_height']; +} + +// 상품상세 이미지 사이즈 재설정 +$default['de_mimg_width'] = (isset($tconfig['de_mimg_width']) && $tconfig['de_mimg_width']) ? $tconfig['de_mimg_width'] : $default['de_mimg_width']; +$default['de_mimg_height'] = (isset($tconfig['de_mimg_height']) && $tconfig['de_mimg_height']) ? $tconfig['de_mimg_height'] : $default['de_mimg_height']; + // 테마 경로 설정 if(defined('G5_THEME_PATH')) { define('G5_THEME_SHOP_PATH', G5_THEME_PATH.'/'.G5_SHOP_DIR); diff --git a/mobile/shop/list.php b/mobile/shop/list.php index c3a62d76a..2f2684f46 100644 --- a/mobile/shop/list.php +++ b/mobile/shop/list.php @@ -9,6 +9,15 @@ $ca = sql_fetch($sql); if (!$ca['ca_id']) alert('등록된 분류가 없습니다.', G5_SHOP_URL); +// 테마미리보기 스킨 등의 변수 재설정 +if(defined('_THEME_PREVIEW_') && _THEME_PREVIEW_ === true) { + $ca['ca_mobile_skin'] = (isset($tconfig['ca_mobile_skin']) && $tconfig['ca_mobile_skin']) ? $tconfig['ca_mobile_skin'] : $ca['ca_mobile_skin']; + $ca['ca_mobile_img_width'] = (isset($tconfig['ca_mobile_img_width']) && $tconfig['ca_mobile_img_width']) ? $tconfig['ca_mobile_img_width'] : $ca['ca_mobile_img_width']; + $ca['ca_mobile_img_height'] = (isset($tconfig['ca_mobile_img_height']) && $tconfig['ca_mobile_img_height']) ? $tconfig['ca_mobile_img_height'] : $ca['ca_mobile_img_height']; + $ca['ca_mobile_list_mod'] = (isset($tconfig['ca_mobile_list_mod']) && $tconfig['ca_mobile_list_mod']) ? $tconfig['ca_mobile_list_mod'] : $ca['ca_mobile_list_mod']; + $ca['ca_mobile_list_row'] = (isset($tconfig['ca_mobile_list_row']) && $tconfig['ca_mobile_list_row']) ? $tconfig['ca_mobile_list_row'] : $ca['ca_mobile_list_row']; +} + // 본인인증, 성인인증체크 if(!$is_admin) { $msg = shop_member_cert_check($ca_id, 'list'); @@ -58,6 +67,14 @@ var g5_shop_url = ""; $cate_skin = G5_MSHOP_SKIN_PATH.'/listcategory.skin.php'; include $cate_skin; + // 테마미리보기 베스트상품 재설정 + if(defined('_THEME_PREVIEW_') && _THEME_PREVIEW_ === true) { + if(isset($theme_config['ca_mobile_list_best_mod'])) + $theme_config['ca_mobile_list_best_mod'] = (isset($tconfig['ca_mobile_list_best_mod']) && $tconfig['ca_mobile_list_best_mod']) ? $tconfig['ca_mobile_list_best_mod'] : 0; + if(isset($theme_config['ca_mobile_list_best_mod'])) + $theme_config['ca_mobile_list_best_row'] = (isset($tconfig['ca_mobile_list_best_row']) && $tconfig['ca_mobile_list_best_row']) ? $tconfig['ca_mobile_list_best_row'] : 0; + } + // 분류 Best Item $list_mod = (isset($theme_config['ca_mobile_list_best_mod']) && $theme_config['ca_mobile_list_best_mod']) ? (int)$theme_config['ca_mobile_list_best_mod'] : $ca['ca_mobile_list_mod']; $list_row = (isset($theme_config['ca_mobile_list_best_row']) && $theme_config['ca_mobile_list_best_row']) ? (int)$theme_config['ca_mobile_list_best_row'] : $ca['ca_mobile_list_row']; diff --git a/shop/list.php b/shop/list.php index 85ad760e9..a74e652ec 100644 --- a/shop/list.php +++ b/shop/list.php @@ -11,6 +11,15 @@ $ca = sql_fetch($sql); if (!$ca['ca_id']) alert('등록된 분류가 없습니다.'); +// 테마미리보기 스킨 등의 변수 재설정 +if(defined('_THEME_PREVIEW_') && _THEME_PREVIEW_ === true) { + $ca['ca_skin'] = (isset($tconfig['ca_skin']) && $tconfig['ca_skin']) ? $tconfig['ca_skin'] : $ca['ca_skin']; + $ca['ca_img_width'] = (isset($tconfig['ca_img_width']) && $tconfig['ca_img_width']) ? $tconfig['ca_img_width'] : $ca['ca_img_width']; + $ca['ca_img_height'] = (isset($tconfig['ca_img_height']) && $tconfig['ca_img_height']) ? $tconfig['ca_img_height'] : $ca['ca_img_height']; + $ca['ca_list_mod'] = (isset($tconfig['ca_list_mod']) && $tconfig['ca_list_mod']) ? $tconfig['ca_list_mod'] : $ca['ca_list_mod']; + $ca['ca_list_row'] = (isset($tconfig['ca_list_row']) && $tconfig['ca_list_row']) ? $tconfig['ca_list_row'] : $ca['ca_list_row']; +} + // 본인인증, 성인인증체크 if(!$is_admin) { $msg = shop_member_cert_check($ca_id, 'list');