변경 파일 목록
총 123개
Admin (37)
_index_service_info.phpbase/_index_service_state.phpbase/index.phpbase/layer_screen_security.phpbase/board_register_function_setting.phpboard/board_register/plus_review_milage.phpboard/message_config.phpcrm/layer_member_sms_history_result.phpcrm/mobile_message_history/layer_sms_history_result.phpcrm/mobile_message_history/layer_sms_history_search.phpcrm/mobile_message_history/design_skin_list.phpdesign/goods_register_option_stock.phpgoods/goods_restock_view.phpgoods/head.phpheader.phpheader_myapp.phpheader_no_breadcrumb.phplayout_design_editor.phplayout_dev_source.phplayout_popup_design.phpexcel_member_up.phpmember/member_batch_approval_with_group.phpmember/member_batch_deposit.phpmember/member_batch_mileage.phpmember/member_group_appraisal_config.phpmember/member_group_list.phpmember/member_mileage_basic.phpmember/member_sleep.phpmember/manage_register.phppolicy/manage_security.phppolicy/member_password_find.phppolicy/cart_remind_list.phppromotion/comeback_coupon_list.phppromotion/coupon_regist.phppromotion/coupon_save.phppromotion/ifdo_config.phpservice/layer_sms_password.phpshare/DesignEditor (3)
_head.htmlfront/outline/header/_share_head.htmlfront/outline/header/_category_side.htmlfront/proc/Component (22)
AdminMenu.phpAdmin/Cart.phpCart/ValidationException.phpCart/Exception/ReorderCart.phpCart/CouponAdmin.phpCoupon/ExcelDataConvert.phpExcel/ExcelOrderConvert.phpExcel/ExcelOrderSort.phpExcel/ExcelRequest.phpExcel/Faq.phpFaq/Goods.phpGoods/GoodsAdmin.phpGoods/MemberDAO.phpMember/PageAccess.phpMember/Mileage.phpMileage/Order.phpOrder/OrderAdmin.phpOrder/OrderAdminNew.phpOrder/OrderNew.phpOrder/PasswordException.phpSms/Exception/SmsSender.phpSms/BirthDay.phpWorker/Controller (28)
IndexController.phpAdmin/Base/LayerScreenSecurityController.phpAdmin/Base/LoginController.phpAdmin/Base/LoginPsController.phpAdmin/Base/MessageConfigController.phpAdmin/Crm/MessageConfigPsController.phpAdmin/Crm/LayerMessageHistoryDetailController.phpAdmin/Crm/MobileMessageHistory/LayerSmsHistoryResultPsController.phpAdmin/Crm/MobileMessageHistory/DesignSkinListController.phpAdmin/Design/LayerPopupDesignPageEditController.phpAdmin/Design/IfdoConfigController.phpAdmin/Service/IfdoPsController.phpAdmin/Service/AdminPanelApiController.phpAdmin/Share/EditorFileUploaderHtml5PsController.phpAdmin/Share/LayerSmsPasswordController.phpAdmin/Share/HackOutPsController.phpFront/Mypage/IndexController.phpFront/Mypage/OrderListController.phpFront/Mypage/OrderViewController.phpFront/Mypage/OrderController.phpFront/Order/OrderEndController.phpFront/Order/ReorderPsController.phpFront/Order/FaqController.phpFront/Service/OrderListController.phpMobile/Mypage/OrderViewController.phpMobile/Mypage/OrderController.phpMobile/Order/OrderEndController.phpMobile/Order/ReorderPsController.phpMobile/Order/DTO (1)
CartRequestDTO.phpCart/Repository (6)
CartRepository.phpCart/AddGoodsRepository.phpGoods/GoodsOptionRepository.phpGoods/GoodsOptionTextRepository.phpGoods/GoodsRepository.phpGoods/MemberOrderGoodsCountRepository.phpMember/data (26)
button.cssskin/front/moment/css/mypage.cssskin/front/moment/css/mypage/_reorder_goods_list.htmlskin/front/moment/mypage/index.htmlskin/front/moment/mypage/order_list.htmlskin/front/moment/mypage/order_view.htmlskin/front/moment/mypage/order.htmlskin/front/moment/order/button.cssskin/front/mygreek/css/mypage.cssskin/front/mygreek/css/mypage/_reorder_goods_list.htmlskin/front/mygreek/mypage/index.htmlskin/front/mygreek/mypage/order_list.htmlskin/front/mygreek/mypage/order_view.htmlskin/front/mygreek/mypage/order.htmlskin/front/mygreek/order/datetimepicker.cssskin/mobile/moment/css/common/mypage.cssskin/mobile/moment/css/mypage/_reorder_goods_list.htmlskin/mobile/moment/mypage/order_list.htmlskin/mobile/moment/mypage/order_view.htmlskin/mobile/moment/mypage/order.htmlskin/mobile/moment/order/datetimepicker.cssskin/mobile/mygreek/css/common/mypage.cssskin/mobile/mygreek/css/mypage/_reorder_goods_list.htmlskin/mobile/mygreek/mypage/order_list.htmlskin/mobile/mygreek/mypage/order_view.htmlskin/mobile/mygreek/mypage/order.htmlskin/mobile/mygreek/order/변경 파일 코드
추가삭제
변경 전_index_service_info.php
| <?php } ?> | |
| </li> | |
| <li class="sms-cnt pdlr30"> | |
| <strong>SMS 잔여 포인트</strong> | |
| <strong class="text-danger"><?= number_format($smsPoint, 1); ?> 포인트</strong> | |
| <span>[ SMS 발송 시: <?= number_format($availableSmsCount); ?> 건 | 알림톡 발송 시: <?= number_format($availableAlrimTalkCount); ?> 건 ]</span> | |
| <a href="../member/sms_charge.php" class="btn btn-gray btn-xs">충전</a> | |
| </li> | |
| </ul> | |
| </div> | |
변경 후_index_service_info.php
| <?php } ?> | |
| </li> | |
| <li class="sms-cnt pdlr30"> | |
| <strong>메시지 잔여 포인트</strong> | |
| <strong class="text-danger"><?= number_format($smsPoint, 1); ?> 포인트</strong> | |
| <span>[ SMS 발송 시: <?= number_format($availableSmsCount); ?> 건 | 알림톡 발송 시: <?= number_format($availableAlrimTalkCount); ?> 건 ]</span> | |
| <a href="../crm/message_config.php" class="btn btn-gray btn-xs">충전</a> | |
| </li> | |
| </ul> | |
| </div> | |
변경 전_index_service_state.php
| } ?>"><a href="<?php echo URI_ADMIN; ?>policy/member_auth_cellphone.php">휴대폰 본인확인</a></td> | |
| <td class="<?php if ($svcStates['sms'] === true) { | |
| echo 'active'; | |
| } ?>"><a href="<?php echo URI_ADMIN; ?>member/sms_auto.php">SMS</a></td> | |
| </tr> | |
| <tr> | |
| <!--<td class="<?php if ($svcStates['acecounter'] === true) { | |
변경 후_index_service_state.php
| } ?>"><a href="<?php echo URI_ADMIN; ?>policy/member_auth_cellphone.php">휴대폰 본인확인</a></td> | |
| <td class="<?php if ($svcStates['sms'] === true) { | |
| echo 'active'; | |
| } ?>"><a href="<?php echo URI_ADMIN; ?>crm/message_config.php">SMS</a></td> | |
| </tr> | |
| <tr> | |
| <!--<td class="<?php if ($svcStates['acecounter'] === true) { | |
변경 전index.php
| <?php } ?> | |
| <!-- 관리자 메인 측면 배너 끝 --> | |
| </div> | |
| <script type="text/javascript"> | |
| /** | |
| * 개발서버 가이드 팝업 표시 | |
| */ | |
| function showDevelopmentServerGuide() { | |
| development_manager('dev_shop_guide.php'); | |
| } | |
| // 페이지 로드 시 개발서버 가이드 팝업 표시 | |
| $(document).ready(function() { | |
| const isDevShop = <?= $isDevShop ?>; | |
| if (isDevShop) { | |
| setTimeout(function() { | |
| showDevelopmentServerGuide(); | |
| }, 500); | |
| } | |
| }); | |
| </script> | |
변경 후index.php
| <?php } ?> | |
| <!-- 관리자 메인 측면 배너 끝 --> | |
| </div> | |
변경 전layer_screen_security.php
| $('.js-layer-send').removeClass("display-none"); | |
| if (data.error == 1) { | |
| if (data.message == 'SMS Point Fail') { | |
| dialog_alert('SMS 포인트가 소진되어 인증수단이 이메일로 자동 전환됩니다.', '알림', {isReload: true}); | |
| } else { | |
| dialog_alert('SMS 인증번호 전송에 실패하였습니다. 다시 시도해 주세요.', '알림', {isReload: true}); | |
| } | |
| } else if(data.error == 2) { | |
| // 이메일 발송실패 | |
| $.post('../base/screen_security_ps.php', params, function (data) { | |
| if (data.error == 1) { | |
| if (data.message == 'SMS Point Fail') { | |
| dialog_alert('SMS 포인트가 소진되어 인증수단이 이메일로 자동 전환됩니다.', '알림', {isReload: true}); | |
| } else { | |
| dialog_alert('SMS 인증번호 전송에 실패하였습니다. 다시 시도해 주세요.', '알림', {isReload: true}); | |
| } | |
| } else if(data.error == 2) { | |
| // 이메일 발송실패 | |
변경 후layer_screen_security.php
| $('.js-layer-send').removeClass("display-none"); | |
| if (data.error == 1) { | |
| if (data.message == 'SMS Point Fail') { | |
| dialog_alert('메시지 포인트가 소진되어 인증수단이 이메일로 자동 전환됩니다.', '알림', {isReload: true}); | |
| } else { | |
| dialog_alert('메시지 인증번호 전송에 실패하였습니다. 다시 시도해 주세요.', '알림', {isReload: true}); | |
| } | |
| } else if(data.error == 2) { | |
| // 이메일 발송실패 | |
| $.post('../base/screen_security_ps.php', params, function (data) { | |
| if (data.error == 1) { | |
| if (data.message == 'SMS Point Fail') { | |
| dialog_alert('메시지 포인트가 소진되어 인증수단이 이메일로 자동 전환됩니다.', '알림', {isReload: true}); | |
| } else { | |
| dialog_alert('메시지 인증번호 전송에 실패하였습니다. 다시 시도해 주세요.', '알림', {isReload: true}); | |
| } | |
| } else if(data.error == 2) { | |
| // 이메일 발송실패 | |
변경 전board_register_function_setting.php
| <?= gd_select_box('bdCategoryTemplateSno[]', 'bdCategoryTemplateSno[]', $templateList, null, $bdCategoryTemplateSno[$i], null, null, 'ncua-select__tag'); ?> | |
| </span> | |
| </span> | |
| </div> | |
| <?php } ?> | |
| <button type="button" class="ncua-btn ncua-btn--xs ncua-btn--secondary-gray add-category-button" onclick="add_category();"><div class="ncua-plus-icon"></div>추가</button> | |
변경 후board_register_function_setting.php
| <?= gd_select_box('bdCategoryTemplateSno[]', 'bdCategoryTemplateSno[]', $templateList, null, $bdCategoryTemplateSno[$i], null, null, 'ncua-select__tag'); ?> | |
| </span> | |
| </span> | |
| <?php if ($i > 0) { ?> | |
| <div onclick="remove_category(this);" class="ncua-remove-icon-button"></div> | |
| <?php } ?> | |
| </div> | |
| <?php } ?> | |
| <button type="button" class="ncua-btn ncua-btn--xs ncua-btn--secondary-gray add-category-button" onclick="add_category();"><div class="ncua-plus-icon"></div>추가</button> | |
변경 전plus_review_milage.php
| SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : | |
| <span class="text-darkred bold"><?= number_format(gd_get_sms_point(), 1); ?></span>) | |
| </span> | |
| <button type="button" class="ncua-btn ncua-btn--xxs ncua-btn--secondary js-link-sms-charge">SMS포인트 충전하기</button> | |
| </div> | |
| </div> | |
| var $js_link_sms_charge = $('.js-link-sms-charge'); | |
| if ($js_link_sms_charge.length > 0) { | |
| $js_link_sms_charge.click(function (e) { | |
| window.open('<?php echo URI_ADMIN; ?>crm/sms_charge.php?popupMode=yes', 'sms_charge', 'width=1400, height=700, scrollbars=no'); | |
| }); | |
| } | |
| if ($(this).attr('href')) { | |
| hash = $(this).attr('href'); | |
| } | |
| window.open('<?php echo URI_ADMIN; ?>crm/sms_auto.php?popupMode=yes' + hash, 'sms_auto', 'width=1400, height=700, scrollbars=no'); | |
| }); | |
| } | |
변경 후plus_review_milage.php
| SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : | |
| <span class="text-darkred bold"><?= number_format(gd_get_sms_point(), 1); ?></span>) | |
| </span> | |
| <button type="button" class="ncua-btn ncua-btn--xxs ncua-btn--secondary js-link-sms-charge">메시지 포인트 충전하기</button> | |
| </div> | |
| </div> | |
| var $js_link_sms_charge = $('.js-link-sms-charge'); | |
| if ($js_link_sms_charge.length > 0) { | |
| $js_link_sms_charge.click(function (e) { | |
| window.open('<?php echo URI_ADMIN; ?>crm/popup_charge_message_points.php', 'sms_charge', 'width=1400, height=700, scrollbars=no'); | |
| }); | |
| } | |
| if ($(this).attr('href')) { | |
| hash = $(this).attr('href'); | |
| } | |
| window.open('<?php echo URI_ADMIN; ?>crm/auto_send.php?popupMode=yes' + hash, 'sms_auto', 'width=1400, height=700, scrollbars=no'); | |
| }); | |
| } | |
변경 전message_config.php
| <div id="layerSmsVerification"></div> | |
| </td> | |
| </tr> | |
| <!-- TODO 2차스펙 활성화 예정 --> | |
| <tr class="insuffic-message-point-alert-setting-row" hidden> | |
| <th><div data-tooltip-seq="003">메시지 포인트 부족 알림</div></th> | |
| <td> | |
| <div class="ncua-flex ncua-gap-10 ncua-align-items-center"> | |
| <div class="ncua-switch ncua-switch--xs"> | |
| <label class="ncua-switch__option ncua-switch__option--left ncua-switch__option--active"> | |
| <input class="ncua-switch__radio ncua-switch__radio--left" type="radio" value="y" name="insufficMessagePointAlertConfig[useFlag]" <?= $insufficMessagePointAlertConfig->getUseFlag() == 'y' ? 'checked' : '' ?>/> | |
| <span class="ncua-switch__label">사용함</span> | |
| </label> | |
| <label class="ncua-switch__option ncua-switch__option--right ncua-switch__option--inactive"> | |
| <input class="ncua-switch__radio ncua-switch__radio--right" type="radio" value="n" name="insufficMessagePointAlertConfig[useFlag]" <?= $insufficMessagePointAlertConfig->getUseFlag() == 'n' ? 'checked' : '' ?>/> | |
| <span class="ncua-switch__label">사용안함</span> | |
| </label> | |
| </div> | |
| <div class="ncua-border-content-layout message-config-insuffic-message-point-alert-setting <?= $insufficMessagePointAlertConfig->getUseFlag() != 'y' ? 'display-none' : '' ?>"> | |
| <div class="ncua-border-content-title">포인트 부족 알림 기준 설정</div> | |
| <div class="ncua-border-content"> | |
| <div class="ncua-border-content-form"> | |
| <label class="ncua-checkbox-field ncua-checkbox-field--xs has-text ncua-align-items-center point-reach-alarm-setting"> | |
| <div> | |
| <span class="ncua-checkbox-input ncua-checkbox-input--xs ncua-checkbox-field__input"> | |
| <input type="checkbox" name="insufficMessagePointAlertConfig[alertTypes][]" id="insufficAlertThreshold" value="THRESHOLD" <?= !empty($insufficMessagePointAlertConfig->getAlertTypes()) && in_array('THRESHOLD', array_map(fn($enum) => $enum->name, $insufficMessagePointAlertConfig->getAlertTypes()), true) !== false ? 'checked' : '' ?>/> | |
| </span> | |
| </div> | |
| <span class="ncua-checkbox-field__text ncua-align-items-center ncua-flex ncua-gap-8"> | |
| <span class="ncua-input ncua-input--xs" data-show-hint-text="true"> | |
| <div class="ncua-input__content-wrap message-point-input"> | |
| <div class="ncua-input__field ncua-input__field--xs"> | |
| <input class="point-reach-alarm-input" type="text" name="insufficMessagePointAlertConfig[thresholdPoint]" id="thresholdPoint" data-maxlength="6" maxlength="6" value="<?= $insufficMessagePointAlertConfig->getThresholdPoint() ?>" oninput="this.value = this.value.replace(/[^0-9]/g, '')"/> | |
| </div> | |
| <span class="point-reach-alarm-text">포인트 도달 시</span> | |
| </div> | |
| <div class="ncua-border-content-form"> | |
| <label class="ncua-checkbox-field ncua-checkbox-field--xs has-text ncua-align-items-center flex-start"> | |
| <span class="ncua-checkbox-input ncua-checkbox-input--xs ncua-checkbox-field__input"> | |
| <input type="checkbox" name="insufficMessagePointAlertConfig[alertTypes][]" id="insufficAlertSendFailed" value="SEND_FAILED" <?= in_array('SEND_FAILED', array_map(fn($enum) => $enum->name, $insufficMessagePointAlertConfig->getAlertTypes()), true) !== false ? 'checked' : '' ?>/> | |
| </span> | |
| <span> | |
| <span class="ncua-checkbox-field__text ncua-align-items-center ncua-flex ncua-gap-8"> | |
| const settingSection = document.querySelector('.default-setting'); | |
| // 포인트 부족 알림 설정 사용함/사용안함에 따른 설정 영역 노출 처리 | |
| settingSection.querySelectorAll('input[name="insufficMessagePointAlertConfig[useFlag]"]')?.forEach?.((input) => { | |
| input.addEventListener('change', function (e) { | |
| e.preventDefault(); | |
| settingSection.querySelector('.message-config-insuffic-message-point-alert-setting').classList.toggle('display-none', input.value !== 'y'); | |
| // 커스텀 validation 메서드 등록 | |
| $.validator.addMethod('checkInsufficAlert', function (_, element) { | |
| // 알림 기준 선택 체크 (사용함일 때만) | |
| const alertFlag = $('input[name="insufficMessagePointAlertConfig[useFlag]"]:checked').val(); | |
| if (alertFlag !== 'y') { | |
| return true; // 사용안함이면 검증 불필요 | |
| } | |
| const insufficAlertThreshold = $('#insufficAlertThreshold').is(':checked'); | |
| const insufficAlertSendFailed = $('#insufficAlertSendFailed').is(':checked'); | |
| $('.insuffic-message-point-alert-support-text.no-padding').addClass('display-none'); | |
| const checkboxInputs = $('#insufficAlertThreshold, #insufficAlertSendFailed').closest('.ncua-checkbox-input'); | |
| checkboxInputs.removeClass('destructive'); | |
| if (insufficAlertThreshold || insufficAlertSendFailed) { | |
| return true; | |
| } | |
| // 기본 설정 > 메시지 포인트 부족 알림 > 포인트 입력 필드 검증 | |
| $.validator.addMethod('checkPointInput', function (value, element) { | |
| // 메시지 포인트 부족 알림이 "사용함"이고 "포인트 도달 시" 체크박스가 선택된 경우만 검증 | |
| const alertFlag = $('input[name="insufficMessagePointAlertConfig[useFlag]"]:checked').val(); | |
| if (alertFlag !== 'y') { | |
| return true; // 사용안함이면 검증 불필요 | |
| } | |
| const insufficAlertThreshold = $('#insufficAlertThreshold').is(':checked'); | |
| if (!insufficAlertThreshold) { | |
| return true; // "포인트 도달 시" 체크박스가 선택되지 않았으면 검증 불필요 | |
| } | |
| // Validator 설정 객체 | |
| const validatorConfig = { | |
| rules: { | |
| 'insufficMessagePointAlertConfig[thresholdPoint]': { | |
| checkPointInput: true | |
| }, | |
| 'insufficMessagePointAlertConfig[alertTypes][]': { | |
| checkInsufficAlert: true, | |
| } | |
| }, | |
| messages: { | |
| 'insufficMessagePointAlertConfig[thresholdPoint]': { | |
| checkPointInput: '알림을 받을 포인트를 입력해 주세요.' | |
| } | |
| }, | |
| form.target = 'ifrmProcess'; | |
| const formData = new FormData(form); | |
| // 친구톡 | |
| const kakaoFriendTalkUseFlag = formData.get('kakaoFriendTalkConfig[useFlag]'); | |
| const smsAlternativeSendFlag = formData.get('kakaoFriendTalkConfig[smsAlternativeSendFlag]'); | |
| const validatorInstance = $('#frmMessageConfig').validate(validatorConfig); | |
| // 포인트 입력 필드 변경 시 재검증 | |
| $('#thresholdPoint').on('blur', function() { | |
| validatorInstance.element(this); | |
| }); | |
| // 메시지 포인트 부족 알림 스위치 변경 시 재검증 | |
| $('input[name="insufficMessagePointAlertConfig[useFlag]"]').on('change', function() { | |
| if ($(this).val() === 'y') { | |
| // 사용함으로 변경 시 검증 | |
| validatorInstance.element('#thresholdPoint'); | |
| } else { | |
| // 사용안함으로 변경 시 에러 제거 | |
| validatorInstance.resetForm(); | |
변경 후message_config.php
| <div id="layerSmsVerification"></div> | |
| </td> | |
| </tr> | |
| <tr class="insuffic-message-point-alert-setting-row"> | |
| <th><div data-tooltip-seq="003">메시지 포인트 부족 알림</div></th> | |
| <td> | |
| <div class="ncua-flex ncua-gap-10 ncua-align-items-center"> | |
| <div class="ncua-switch ncua-switch--xs"> | |
| <label class="ncua-switch__option ncua-switch__option--left ncua-switch__option--active"> | |
| <input class="ncua-switch__radio ncua-switch__radio--left" type="radio" value="y" name="messagePointConfig[UsePointLackNotify]" <?= $messagePointConfig->getUsePointLackNotify() ? 'checked' : '' ?>/> | |
| <span class="ncua-switch__label">사용함</span> | |
| </label> | |
| <label class="ncua-switch__option ncua-switch__option--right ncua-switch__option--inactive"> | |
| <input class="ncua-switch__radio ncua-switch__radio--right" type="radio" value="n" name="messagePointConfig[UsePointLackNotify]" <?= !$messagePointConfig->getUsePointLackNotify() ? 'checked' : '' ?>/> | |
| <span class="ncua-switch__label">사용안함</span> | |
| </label> | |
| </div> | |
| <div class="ncua-border-content-layout message-config-insuffic-message-point-alert-setting <?= !$messagePointConfig->getUsePointLackNotify() ? 'display-none' : '' ?>"> | |
| <div class="ncua-border-content-title">포인트 부족 알림 기준 설정</div> | |
| <div class="ncua-border-content"> | |
| <div class="ncua-border-content-form"> | |
| <label class="ncua-checkbox-field ncua-checkbox-field--xs has-text ncua-align-items-center point-reach-alarm-setting"> | |
| <div> | |
| <span class="ncua-checkbox-input ncua-checkbox-input--xs ncua-checkbox-field__input"> | |
| <input type="checkbox" name="messagePointConfig[notifyOnThreshold]" id="notifyOnThreshold" value="true" <?= $messagePointConfig->getNotifyOnThreshold() ? 'checked' : '' ?>/> | |
| </span> | |
| </div> | |
| <span class="ncua-checkbox-field__text ncua-align-items-center ncua-flex ncua-gap-8"> | |
| <span class="ncua-input ncua-input--xs" data-show-hint-text="true"> | |
| <div class="ncua-input__content-wrap message-point-input"> | |
| <div class="ncua-input__field ncua-input__field--xs"> | |
| <input class="point-reach-alarm-input" type="text" name="messagePointConfig[pointLackNotifyThreshold]" id="pointLackNotifyThreshold" data-maxlength="6" maxlength="6" value="<?= $messagePointConfig->getPointLackNotifyThreshold() ?>" oninput="this.value = this.value.replace(/[^0-9]/g, '')"/> | |
| </div> | |
| <span class="point-reach-alarm-text">포인트 도달 시</span> | |
| </div> | |
| <div class="ncua-border-content-form"> | |
| <label class="ncua-checkbox-field ncua-checkbox-field--xs has-text ncua-align-items-center flex-start"> | |
| <span class="ncua-checkbox-input ncua-checkbox-input--xs ncua-checkbox-field__input"> | |
| <input type="checkbox" name="messagePointConfig[notifyOnSendFail]" id="notifyOnSendFail" value="true" <?= $messagePointConfig->getNotifyOnSendFail() ? 'checked' : '' ?>/> | |
| </span> | |
| <span> | |
| <span class="ncua-checkbox-field__text ncua-align-items-center ncua-flex ncua-gap-8"> | |
| const settingSection = document.querySelector('.default-setting'); | |
| // 포인트 부족 알림 설정 사용함/사용안함에 따른 설정 영역 노출 처리 | |
| settingSection.querySelectorAll('input[name="messagePointConfig[UsePointLackNotify]"]')?.forEach?.((input) => { | |
| input.addEventListener('change', function (e) { | |
| e.preventDefault(); | |
| settingSection.querySelector('.message-config-insuffic-message-point-alert-setting').classList.toggle('display-none', input.value !== 'y'); | |
| // 커스텀 validation 메서드 등록 | |
| $.validator.addMethod('checkInsufficAlert', function (_, element) { | |
| // 알림 기준 선택 체크 (사용함일 때만) | |
| const alertFlag = $('input[name="messagePointConfig[UsePointLackNotify]"]:checked').val(); | |
| if (alertFlag !== 'y') { | |
| return true; // 사용안함이면 검증 불필요 | |
| } | |
| const notifyOnThreshold = $('input[name="messagePointConfig[notifyOnThreshold]"]').is(':checked'); | |
| const notifyOnSendFail = $('input[name="messagePointConfig[notifyOnSendFail]"]').is(':checked'); | |
| $('.insuffic-message-point-alert-support-text.no-padding').addClass('display-none'); | |
| const checkboxInputs = $('input[name="messagePointConfig[notifyOnThreshold]"], input[name="messagePointConfig[notifyOnSendFail]').closest('.ncua-checkbox-input'); | |
| checkboxInputs.removeClass('destructive'); | |
| if (notifyOnThreshold || notifyOnSendFail) { | |
| return true; | |
| } | |
| // 기본 설정 > 메시지 포인트 부족 알림 > 포인트 입력 필드 검증 | |
| $.validator.addMethod('checkPointInput', function (value, element) { | |
| // 메시지 포인트 부족 알림이 "사용함"이고 "포인트 도달 시" 체크박스가 선택된 경우만 검증 | |
| const alertFlag = $('input[name="messagePointConfig[UsePointLackNotify]"]:checked').val(); | |
| if (alertFlag !== 'y') { | |
| return true; // 사용안함이면 검증 불필요 | |
| } | |
| const notifyOnThreshold = $('#notifyOnThreshold').is(':checked'); | |
| if (!notifyOnThreshold) { | |
| return true; // "포인트 도달 시" 체크박스가 선택되지 않았으면 검증 불필요 | |
| } | |
| // Validator 설정 객체 | |
| const validatorConfig = { | |
| rules: { | |
| 'messagePointConfig[pointLackNotifyThreshold]': { | |
| checkPointInput: true | |
| }, | |
| 'messagePointConfig[notifyOnThreshold]': { | |
| checkInsufficAlert: true, | |
| } | |
| }, | |
| messages: { | |
| 'messagePointConfig[pointLackNotifyThreshold]': { | |
| checkPointInput: '알림을 받을 포인트를 입력해 주세요.' | |
| } | |
| }, | |
| form.target = 'ifrmProcess'; | |
| const formData = new FormData(form); | |
| // 메시지 포인트 부족 알림 체크박스 값 설정 | |
| formData.set('messagePointConfig[notifyOnSendFail]', $('#notifyOnSendFail').is(':checked') ? 'true' : 'false'); | |
| formData.set('messagePointConfig[notifyOnThreshold]', $('#notifyOnThreshold').is(':checked') ? 'true' : 'false'); | |
| // 친구톡 | |
| const kakaoFriendTalkUseFlag = formData.get('kakaoFriendTalkConfig[useFlag]'); | |
| const smsAlternativeSendFlag = formData.get('kakaoFriendTalkConfig[smsAlternativeSendFlag]'); | |
| const validatorInstance = $('#frmMessageConfig').validate(validatorConfig); | |
| // 포인트 입력 필드 변경 시 재검증 | |
| $('#pointLackNotifyThreshold').on('blur', function() { | |
| validatorInstance.element(this); | |
| }); | |
| // 메시지 포인트 부족 알림 스위치 변경 시 재검증 | |
| $('input[name="messagePointConfig[UsePointLackNotify]"]').on('change', function() { | |
| if ($(this).val() === 'y') { | |
| // 사용함으로 변경 시 검증 | |
| validatorInstance.element('#pointLackNotifyThreshold'); | |
| } else { | |
| // 사용안함으로 변경 시 에러 제거 | |
| validatorInstance.resetForm(); | |
변경 전layer_member_sms_history_result.php
| </td> | |
| <td> | |
| <div class="ncua-flex-column"> | |
| <?= $smsHistory->getTriggerType()->value ?> | |
| <?php if ($smsHistory->isRepeated()): ?> | |
| <span class="ncua-count"><?= $smsHistory->getRepeatRound() ?: 1 ?>회차</span> | |
| <?php endif; ?> | |
변경 후layer_member_sms_history_result.php
| </td> | |
| <td> | |
| <div class="ncua-flex-column"> | |
| <?= $smsHistory->getTriggerType()->value ?? '-' ?> | |
| <?php if ($smsHistory->isRepeated()): ?> | |
| <span class="ncua-count"><?= $smsHistory->getRepeatRound() ?: 1 ?>회차</span> | |
| <?php endif; ?> | |
변경 전layer_sms_history_result.php
| </td> | |
| <td> | |
| <div class="ncua-flex-column"> | |
| <?= $smsHistory->getTriggerType()->value ?> | |
| <?php if ($smsHistory->getTriggerType()->name == 'REPEATED'): ?> | |
| <span class="ncua-count"><?= $smsHistory->getRepeatRound() ?: 1 ?>회차</span> | |
| <?php endif; ?> | |
| <td> | |
| <div class="ncua-flex-column"> | |
| <span><?= $smsHistory->getSendStatus()->value ?></span> | |
| <button type="button" class="ncua-btn ncua-btn--xxs ncua-btn--secondary-gray js-show-history-detail" data-send-key="<?= $smsHistory->getSendKey() ?>">상세</button> | |
| </div> | |
| </td> | |
| </tr> | |
| if (detailBtn) { | |
| showHistoryDetail(detailBtn.dataset.sendKey); | |
| } | |
| }); | |
| new CheckboxGroup('.js-result-table'); | |
| NCDSAlert({ message: '발송 내역을 불러오는 중 오류가 발생했습니다.', iconType: 'error' }); | |
| }); | |
| } | |
| </script> | |
변경 후layer_sms_history_result.php
| </td> | |
| <td> | |
| <div class="ncua-flex-column"> | |
| <?= $smsHistory->getTriggerType()->value ?? '-' ?> | |
| <?php if ($smsHistory->getTriggerType()->name == 'REPEATED'): ?> | |
| <span class="ncua-count"><?= $smsHistory->getRepeatRound() ?: 1 ?>회차</span> | |
| <?php endif; ?> | |
| <td> | |
| <div class="ncua-flex-column"> | |
| <span><?= $smsHistory->getSendStatus()->value ?></span> | |
| <div class="ncua-flex-gap"> | |
| <button type="button" class="ncua-btn ncua-btn--xxs ncua-btn--secondary-gray js-show-history-detail" data-send-key="<?= $smsHistory->getSendKey() ?>">상세</button> | |
| <?php if ($smsHistory->getSendStatus()->name == 'RESERVED'): ?> | |
| <button type="button" class="ncua-btn ncua-btn--xxs ncua-btn--secondary" data-click-target="cancelReservedSend" data-send-key="<?= $smsHistory->getSendKey() ?>" data-reserved-at="<?= $smsHistory->getReservedAt() ?>" data-sms-type="<?= $smsHistory->getType()->name ?>">예약 취소</button> | |
| <?php endif; ?> | |
| </div> | |
| </div> | |
| </td> | |
| </tr> | |
| if (detailBtn) { | |
| showHistoryDetail(detailBtn.dataset.sendKey); | |
| } | |
| const cancelBtn = e.target.closest('[data-click-target="cancelReservedSend"]'); | |
| if (cancelBtn) { | |
| const reservedAt = new Date(cancelBtn.dataset.reservedAt); | |
| const now = new Date(); | |
| const diffMinutes = (reservedAt - now) / (1000 * 60); | |
| if (diffMinutes > 0 && diffMinutes <= 5) { | |
| NCDSAlert({ message: '발송시각이 임박하여 예약 취소를 할 수 없습니다.<br>발송 시각 5분 전까지 취소 가능합니다.', iconType: 'error' }); | |
| return; | |
| } | |
| NCDSConfirm({ | |
| message: '예약 발송을 취소하시겠습니까?<br>취소된 메시지는 리스트에서 삭제되어 확인이 불가합니다.' | |
| }).then(function (result) { | |
| if (result) { | |
| cancelReservedSend(cancelBtn.dataset.sendKey, cancelBtn.dataset.smsType); | |
| } | |
| }); | |
| } | |
| }); | |
| new CheckboxGroup('.js-result-table'); | |
| NCDSAlert({ message: '발송 내역을 불러오는 중 오류가 발생했습니다.', iconType: 'error' }); | |
| }); | |
| } | |
| function cancelReservedSend(sendKey, smsType) { | |
| $.ajax({ | |
| url: './mobile_message_history/layer_sms_history_result_ps.php', | |
| type: 'POST', | |
| data: { mode: 'cancel', sendGroupKey: sendKey, type: smsType, cancelMode: 'ALL' }, | |
| dataType: 'json', | |
| success: () => { | |
| NCDSToast({ | |
| message: '예약 발송이 취소되었습니다.', | |
| color: 'success', | |
| }); | |
| loadContentsByPage(`page=${searchFormData.page ?? 1}`); | |
| }, | |
| error: (xhr) => { | |
| if (xhr.status === 400) { | |
| const data = xhr.responseJSON; | |
| NCDSAlert({ message: data?.message || '일시적인 오류가 발생하였습니다.<br>다시 시도해 주세요.', iconType: 'error' }); | |
| } else { | |
| NCDSToast({ | |
| message: '일시적인 오류가 발생했습니다.', | |
| color: 'error', | |
| autoClose: 5000 | |
| }); | |
| } | |
| } | |
| }); | |
| } | |
| </script> | |
변경 전layer_sms_history_search.php
| </div> | |
| <div class="ncua-btn-group"> | |
| <ul class="mobile-history-list-info"> | |
| <li>발송 대기 중인 예약발송건은 <a class="ncua-link" href="./scheduled_send.php">예약 발송 관리</a>에서 확인할 수 있습니다.</li> | |
| </ul> | |
| <span class="mobile-history-list-search-btns"> | |
| <button type="reset" name="reset" class="ncua-btn ncua-btn--xs has-underline ncua-btn--text">초기화</button> | |
변경 후layer_sms_history_search.php
| </div> | |
| <div class="ncua-btn-group"> | |
| <ul class="mobile-history-list-info"> | |
| <li>'CRM > 메시지 발송'에서 등록한 예약발송 대기건은 <a class="ncua-link" href="./scheduled_send.php">예약 발송 관리</a>에서 확인해 주세요.</li> | |
| <li>'SMS 개별/전체 발송'에서 등록한 예약발송 대기건은 아래 리스트에서 확인할 수 있습니다.</li> | |
| </ul> | |
| <span class="mobile-history-list-search-btns"> | |
| <button type="reset" name="reset" class="ncua-btn ncua-btn--xs has-underline ncua-btn--text">초기화</button> | |
변경 전design_skin_list.php
| <button type="button" class="ncua-btn ncua-btn--md ncua-btn--primary js-register">저장</button> | |
| </span> | |
| </header> | |
| <?php if ($mallCnt > 1) { ?> | |
| <div class="ncua-horizontal-tab ncua-horizontal-tab--md ncua-horizontal-tab--underline-fill design-skin-list--common-tab max-width-center"> | |
| <div class="swiper swiper-initialized swiper-horizontal"> | |
| <div class="swiper-wrapper ncua-gap-8" style="transition-duration: 0ms; transition-delay: 0ms;"> | |
| <?php foreach ($mallList as $key => $val) { ?> | |
| <div role="presentation" class="swiper-slide ncua-horizontal-tab__item <?= $val['sno'] == $mallSno ? 'active' : 'passive'; ?>" data-html="true" data-content="<?= $val['mallName']; ?>" data-placement="top"> | |
| <a href="design_skin_list.php?mallSno=<?= $val['sno']; ?>" data-sno="<?= $val['sno'] ?>" class="ncua-tab-button ncua-tab-button--sm ncua-tab-button--button-primary js-tab-button <?= $val['sno'] == $mallSno ? 'is-active' : '' ?>"> | |
| <?= $val['mallName']; ?> | |
| </a> | |
| </div> | |
| <?php } ?> | |
| </div> | |
| </div> | |
| </div> | |
| <?php } ?> | |
| <!-- 현재 설정된 디자인 스킨 --> | |
| <?php if ($skinConf['skin_type'] === 'responsive') { ?> | |
| initTutorialHandler(); | |
| } | |
| }, 5000); | |
| </script> | |
변경 후design_skin_list.php
| <button type="button" class="ncua-btn ncua-btn--md ncua-btn--primary js-register">저장</button> | |
| </span> | |
| </header> | |
| <?php if (!$hasResponsiveSkin || $skinConf['skin_type'] !== 'responsive'): ?> | |
| <!-- 온보딩 --> | |
| <section class="ncua-card max-width-center onboarding"> | |
| <header class="ncua-card__header"> | |
| <h4 class="ncua-card__title">디자인 에디터 시작하기</h4> | |
| <div class="onboarding__progress"> | |
| <span class="onboarding__progress-count"><b>0</b>/<span class="onboarding__progress-count-total"></span></span> | |
| </div> | |
| </header> | |
| <div class="ncua-card__body"> | |
| <ol class="onboarding__list"> | |
| <li class="onboarding__item <?= $hasResponsiveSkin ? 'is-completed' : '' ?>"> | |
| <span class="onboarding__item-count"></span> | |
| <details class="onboarding__item-content" <?= !$hasResponsiveSkin ? 'open' : '' ?>> | |
| <summary class="onboarding__item-title">반응형 스킨 다운로드하기 <span class="icon-new"></span></summary> | |
| <p>디자인 에디터 전용 반응형 스킨이 필요합니다.</p> | |
| <p>아래 버튼을 클릭하여 반응형 스킨을 먼저 다운로드하세요.</p> | |
| <button class="ncua-btn ncua-btn--xs ncua-btn--secondary js-download-responsive-skin" type="button">반응형 스킨 다운로드</button> | |
| </details> | |
| </li> | |
| <li class="onboarding__item"> | |
| <span class="onboarding__item-count"></span> | |
| <details class="onboarding__item-content" <?= $hasResponsiveSkin && $skinConf['skin_type'] !== 'responsive' ? 'open' : '' ?>> | |
| <summary class="onboarding__item-title">반응형 스킨을 사용 스킨으로 게시하기</summary> | |
| <p>다운로드한 반응형 스킨을 게시하면 디자인 에디터로 쇼핑몰 디자인을 편집할 수 있습니다.</p> | |
| <ul> | |
| <li class="ncua-notice-info">[반응형] 탭 선택 후 → 원하는 반응형 스킨의 [게시하기] 클릭</li> | |
| </ul> | |
| </details> | |
| </li> | |
| </ol> | |
| <?php if ($hasResponsiveSkin): ?> | |
| <p class="onboarding__do-not-show-again"> | |
| <label class="ncua-checkbox-field ncua-checkbox-field--xs has-text"> | |
| <span class="ncua-checkbox-input ncua-checkbox-input--xs ncua-checkbox-field__input"> | |
| <input type="checkbox" name="" value="" class="js-onboarding-do-not-show-again" /> | |
| </span> | |
| <span><span class="ncua-checkbox-field__text">다시 보지 않기</span></span> | |
| </label> | |
| <button type="button" class="ncua-btn ncua-btn--xs ncua-btn--secondary-gray js-close-onboarding">닫기</button> | |
| </p> | |
| <?php endif; ?> | |
| </div> | |
| </section> | |
| <!-- // 온보딩 --> | |
| <?php endif; ?> | |
| <?php if ($mallCnt > 1): ?> | |
| <div class="ncua-horizontal-tab ncua-horizontal-tab--md ncua-horizontal-tab--underline-fill design-skin-list--common-tab max-width-center"> | |
| <div class="swiper swiper-initialized swiper-horizontal"> | |
| <div class="swiper-wrapper ncua-gap-8" style="transition-duration: 0ms; transition-delay: 0ms;"> | |
| <?php foreach ($mallList as $key => $val): ?> | |
| <div role="presentation" class="swiper-slide ncua-horizontal-tab__item <?= $val['sno'] == $mallSno ? 'active' : 'passive'; ?>" data-html="true" data-content="<?= $val['mallName']; ?>" data-placement="top"> | |
| <a href="design_skin_list.php?mallSno=<?= $val['sno']; ?>" data-sno="<?= $val['sno'] ?>" class="ncua-tab-button ncua-tab-button--sm ncua-tab-button--button-primary js-tab-button <?= $val['sno'] == $mallSno ? 'is-active' : '' ?>"> | |
| <?= $val['mallName']; ?> | |
| </a> | |
| </div> | |
| <?php endforeach; ?> | |
| </div> | |
| </div> | |
| </div> | |
| <?php endif; ?> | |
| <!-- 현재 설정된 디자인 스킨 --> | |
| <?php if ($skinConf['skin_type'] === 'responsive') { ?> | |
| initTutorialHandler(); | |
| } | |
| }, 5000); | |
| </script> | |
| <script> | |
| <?php | |
| $isUsingResponsiveSkin = ($skinConf['skin_type'] ?? '') === 'responsive'; | |
| $completedStepCount = ($hasResponsiveSkin ? 1 : 0) + ($isUsingResponsiveSkin ? 1 : 0); | |
| ?> | |
| const HIDE_ONBOARDING_COOKIE = 'hideDesignSkinOnboarding'; | |
| const isOnboardingHiddenByCookie = () => { | |
| return document.cookie | |
| .split(';') | |
| .some(c => c.trim().startsWith(HIDE_ONBOARDING_COOKIE + '=')); | |
| }; | |
| const startSkinOnboarding = () => { | |
| const onboarding = document.querySelector('.onboarding'); | |
| const progressElem = document.querySelector('.onboarding__progress'); | |
| const onboardingItems = document.querySelectorAll('.onboarding__item-content'); | |
| if (!onboarding || !progressElem || !onboardingItems.length) return; | |
| // '다시 보지 않기' 쿠키가 있으면 온보딩 숨기고 종료 | |
| if (isOnboardingHiddenByCookie()) { | |
| onboarding.setAttribute('hidden', true); | |
| return; | |
| } | |
| const downloadSkinBtn = document.querySelector('.js-download-responsive-skin'); | |
| const closeBtn = onboarding.querySelector('.js-close-onboarding'); | |
| const onboardingDoNotShowAgainCheckbox = onboarding.querySelector('.js-onboarding-do-not-show-again'); | |
| downloadSkinBtn?.addEventListener('click', () => { | |
| let popup = window.open('<?= $freeSkinUrl ?>', 'popup', 'width=' + screen.width + ',height=' + screen.height + ',scrollbars=yes'); | |
| window.addEventListener('focus', function() { | |
| if (popup && popup.closed) { | |
| location.reload(); | |
| popup = null; | |
| } | |
| }); | |
| }); | |
| closeBtn?.addEventListener('click', () => { | |
| // '다시 보지 않기' 체크 시 만료시간 없는(세션) 쿠키 저장 | |
| if (onboardingDoNotShowAgainCheckbox?.checked) { | |
| document.cookie = HIDE_ONBOARDING_COOKIE + '=1; path=/'; | |
| } | |
| onboarding.setAttribute('hidden', true); | |
| }); | |
| const totalSteps = onboardingItems.length; | |
| const completedSteps = <?= $completedStepCount ?>; | |
| const progressValue = totalSteps > 0 ? (completedSteps / totalSteps) * 100 : 0; | |
| // 진행률 수치 및 ProgressBar 렌더 | |
| const countElem = progressElem.querySelector('.onboarding__progress-count'); | |
| countElem.querySelector('b').innerText = completedSteps; | |
| progressElem.querySelector('.onboarding__progress-count-total').innerText = totalSteps; | |
| countElem.insertAdjacentElement('beforebegin', ncua.ProgressBar.create({ value: progressValue }).getElement()); | |
| // summary 기본 토글 동작 차단 (details 수동 제어) | |
| onboardingItems.forEach(item => { | |
| item.querySelector('.onboarding__item-title').addEventListener('click', e => e.preventDefault()); | |
| }); | |
| }; | |
| document.addEventListener('DOMContentLoaded', startSkinOnboarding); | |
| </script> | |
변경 전goods_register_option_stock.php
| <th>단위 가격 설정</th> | |
| <td> | |
| <div class="form-inline"> | |
| <input type="text" name="unitBaseQuantity" value="<?=(gd_isset($data['unitBaseQuantity']) ? (float)$data['unitBaseQuantity'] : 0); ?>" class="form-control width-xs js-unit-base-quantity" /> | |
| <span class="js-unit-type-text"><?php | |
| echo isset($unitPriceTypes[gd_isset($data['unitType'])]) ? $unitPriceTypes[gd_isset($data['unitType'])] : 'g'; | |
| ?></span> | |
변경 후goods_register_option_stock.php
| <th>단위 가격 설정</th> | |
| <td> | |
| <div class="form-inline"> | |
| <input type="text" name="unitBaseQuantity" value="<?=(gd_isset($data['unitBaseQuantity']) ? (int)$data['unitBaseQuantity'] : 0); ?>" class="form-control width-xs js-unit-base-quantity" /> | |
| <span class="js-unit-type-text"><?php | |
| echo isset($unitPriceTypes[gd_isset($data['unitType'])]) ? $unitPriceTypes[gd_isset($data['unitType'])] : 'g'; | |
| ?></span> | |
변경 전goods_restock_view.php
| <p class="notice-info"> | |
| SMS 잔여 포인트가 부족한 경우 부족한 포인트만큼 문자발송이 되지 않습니다.<br /> | |
| <a href="/crm/mobile_history_list.php" target="_blank" class="btn-link">[CRM > 메시지 발송 내역 > 모바일 메시지 내역]</a>에서 발송결과를 꼭 확인하시기 바랍니다. | |
| </p> | |
변경 후goods_restock_view.php
| <p class="notice-info"> | |
| 메시지 잔여 포인트가 부족한 경우 부족한 포인트만큼 문자발송이 되지 않습니다.<br /> | |
| <a href="/crm/mobile_history_list.php" target="_blank" class="btn-link">[CRM > 메시지 발송 내역 > 모바일 메시지 내역]</a>에서 발송결과를 꼭 확인하시기 바랍니다. | |
| </p> | |
변경 전head.php
| element.appendChild(button); | |
| }); | |
| <?php }?> | |
| <?php if (empty($tooltipData) === false) {?> | |
변경 후head.php
| element.appendChild(button); | |
| }); | |
| <?php }?> | |
| <?php if (empty($tooltipData) === false) {?> | |
변경 전header.php
| <?php | |
| /** | |
| * 관리자 상단 | |
| * | |
| * @author Shin Donggyu <artherot@godo.co.kr> | |
| */ | |
| ?> | |
| <nav class="navbar"> | |
| <div class="container"> | |
| <div class="navbar-inner"> | |
| <span><?php echo Session::get('manager.managerNm'); ?></span> | |
| <span>님 (</span> | |
| <span class="manager-id"><?php echo $managerId; ?></span> | |
| <?php if (!empty($commerceId)):?> | |
| <span>/ NHN커머스 통합계정:</span> | |
| <span class="manager-id"><?php echo $commerceId; ?></span> | |
| <?php endif; ?> | |
| <?php if (gd_count($gGlobal['useMallList']) > 1) { ?> | |
| <a href="#" class="dropdown-toggle gnb-myshop" id="headerMyShop" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">내쇼핑몰</a> | |
| <ul class="dropdown-menu gnb-dropdown-menu" aria-labelledby="headerMyShop"> | |
| <?php foreach ($shopMallList as $val) { ?> | |
| <li class="dropdown-item"><a href="<?=$val['domain']; ?>" target="_blank"><span class="flag flag-16 flag-<?=$val['domainFl']?>"></span> <?=$val['mallName']?></a></li> | |
| <?php } ;?> | |
| </ul> | |
| <?php } else { ?> | |
| <a href="<?php echo URI_HOME; ?>" class="gnb-myshop" id="headerMyShop" target="_blank">내쇼핑몰</a> | |
| <?php } ?> | |
| <?php | |
| if (gd_is_provider() === false) { | |
| ?> | |
| <span style="margin: 0; padding: 0;"> | |
| <a href="<?= $commerceAppStoreUrl ?>" target="_blank" class="gnb-myshop text-red">스토어</a> | |
| </span> | |
| <span style="margin: 0; padding: 0; display: none;"> | |
| <a href="<?php echo $_managerUri_ ?>share/shoplinker.php" class="gnb-myshop pdr0">마켓연동</a> | |
| </span> | |
| <?php | |
| } | |
| ?> | |
| </li> | |
| <?php if ($showHeaderOrderPresentation) { ?> | |
| <li class="no-bar new"> | |
| <div class="dropdown gnb-orderinfo" id="dropDownOrderPresentation"> | |
| <a href="#" class="dropdown-toggle dropdown-toggle-arr" id="headerSubMenuOrderPresentation" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false"> | |
| <span class="js-oder-count-new display-none"> | |
| <img src="<?= PATH_ADMIN_GD_SHARE ?>img/icon_new.png" width="14"> | |
| </span> | |
| 주문현황 | |
| </a> | |
| <ul class="dropdown-menu gnb-dropdown-menu" aria-labelledby="headerSubMenuOrderPresentation"> | |
| <li class="dropdown-head">주문상태설정 | |
| <div class="pull-right"> | |
| <a href="#" class="js-setting-order" data-role="orderPresentation"> <img src="<?= PATH_ADMIN_GD_SHARE ?>img/icon_gear.png" alt=""> </a> | |
| </div> | |
| </li> | |
| <li class="dropdown-noitem">조회할 주문상태를<br>선택해주세요.</li> | |
| </ul> | |
| </div> | |
| </li> | |
| <li class="devide"></li> | |
| <?php } ?> | |
| <li class="no-bar"> | |
| <div class="dropdown gnb-favorite" id="dropDownFavoriteMenu"> | |
| if (gd_is_provider() === false) { | |
| if (Session::get('manager.workPermissionFl') == 'y') { | |
| ?> | |
| <li class="devide"></li> | |
| <li class="admin"><a href="javascript:development_manager('<?= Globals::get('gLicense.isDevShop') ? 'dev_shop_guide.php' : '' ?>');" class="font">개발소스관리</a> | |
| <?php if (!empty($inspectFileCount)): ?> | |
| <span style="display: inline-block; background-color: #dc3545; color: white; border-radius: 50%; min-width: 18px; height: 18px; text-align: center; line-height: 18px; font-size: 11px; font-weight: bold; margin-left: 4px; padding: 0 4px; box-sizing: border-box;"> | |
| <?= $inspectFileCount ?> | |
| </span> | |
| <?php endif; ?></li> | |
| <li class="devide"></li><li class="admin"><a href="javascript:cache_manager();" class="font">속도개선관리</a></li> | |
| <?php | |
| } else if (Globals::get('gLicense.shopWorkLimited') === true) { | |
| ?> | |
| <li class="devide"></li> | |
| <li class="admin"><a href="javascript:upgrade_plan_godomall_basic('<?php echo $commercePlanUpgradeUrl . Globals::get('gLicense.godosno'); ?>', '<?php echo Session::get('manager.isSuper'); ?>');" class="font">개발소스관리</a></li> | |
| <li class="devide"></li><li class="admin"><a href="javascript:cache_manager();" class="font">속도개선관리</a></li> | |
| <?php | |
| } | |
| } | |
| </div> | |
| <div class="gnb-search-body"> | |
| <span class="icon-magni"><img src="/admin/gd_share/img/ico_search_btn.png" alt=""></span> | |
| <input type="text" id="headerSearchKeyword" class="form-control" name="headerSearchKeyword" placeholder="메뉴검색"/> | |
| <div class="gnb-search-hint form-inline display-none"> | |
| <select class="form-control multiple-select" size="5" id="headerSearchMenuList" style="height:100px;"></select> | |
| </div> | |
| <div class="collapse navbar-collapse"> | |
| <ul class="nav navbar-nav reform"> | |
| <?php | |
| // 공급사 관리자 여부에 따른 상단메뉴 링크 변경 처리 | |
| if (isset($naviMenu)) { | |
| $menuWidth = gd_division_except_zero(1165, $naviMenu->menuCnt); | |
| $tempTopLink = explode('/', $getTopMenuArr['link']); | |
| foreach ($getTopMenuArr['data'] as $key => $val) { | |
| $sLink = '/' . $val['adminMenuCode'] . '/index.php'; | |
| } | |
| } | |
| ?> | |
| <li class="<?php echo gd_isset($naviMenu->menuSelected['top'][$val['adminMenuNo']]); ?>"> | |
| <a href="<?php echo $sLink; ?>" id="menu_<?php echo $val['adminMenuCode'] ?>" style="width:<?php echo $menuWidth; ?>px;"><?php echo $val['adminMenuName'] ?> | |
| <?php if (in_array($val['adminMenuNo'], $adminMenuFlagService->getAdminMenuFlagsFromSession())): ?> | |
| <div class="new-menu">New</div> | |
| <?php endif; ?> | |
| </a> | |
| </li> | |
| <?php | |
| } | |
| } | |
| } ?> | |
| <?php | |
| if (gd_isset($naviMenu->location)) { | |
| foreach ($naviMenu->location as $v) { | |
| ?> | |
| <li><?php echo $v; ?></li> | |
| <?php | |
| } | |
| } | |
| ?> | |
| <!-- 고도 사이트로 이동 끝 --> | |
| <script type="text/javascript"> | |
| $(document).ready(function () { | |
| var gd_main_layer = { | |
| presentation: {id: "presentation", selector: "#layerPresentation", title: "주요현황 조회설정"}, | |
| order_presentation: {id: "orderPresentation", get_id: "getOrderPresentation", title: "주문현황 조회설정"}, | |
| order_setting: {id: "orderSetting", title: "주문관리 조회설정"}, | |
| favorite_menu: {id: "favoriteMenu", get_id: "getFavoriteMenu", selector: "#layerFavorite", title: "자주쓰는 메뉴 설정"} | |
| }; | |
| var _bootstrap_dialog = BootstrapDialog; | |
| $('#dropDownFavoriteMenu').on('show.bs.dropdown', function () { | |
| var dropdown_container = $(this); | |
| var dropdown_menu = dropdown_container.find('.dropdown-menu'); | |
| $.ajax('../base/main_setting_ps.php', { | |
| method: "post", | |
| data: {mode: gd_main_layer.favorite_menu.get_id}, | |
| global_complete: false, | |
| success: function () { | |
| if (arguments[0].success === 'OK') { | |
| var result = arguments[0].result; | |
| if (result.length > 0) { | |
| var html = []; | |
| $.each(result, function (idx, item) { | |
| var menuName = 'none'; | |
| var menuLink = ''; | |
| if (typeof item.tName === 'string') { | |
| }); | |
| }); | |
| $('#dropDownOrderPresentation').on('show.bs.dropdown', function () { | |
| var dropdown_container = $(this); | |
| $.ajax('../base/main_setting_ps.php', { | |
| method: "post", | |
| data: {mode: gd_main_layer.order_presentation.get_id}, | |
| global_complete: false, | |
| success: function () { | |
| if (arguments[0].success === 'OK') { | |
| var result = arguments[0].result; | |
| if (result.length > 0) { | |
| var html = []; | |
| $.each(result, function (idx, item) { | |
| // html.push('<li role="separator" class="divider"></li>'); | |
| html.push('<li class="dropdown-item"><a href="' + item.link + '">' + item.name + '<span class="dropdown-item-val"><span class="text-red">' + item.count + '</span>건</span></a></li>'); | |
| }); | |
| }); | |
| }); | |
| $('.js-setting-presentation').click(function () { | |
| $.post('/share/layer_presentation_setting.php', {mode: gd_main_layer.presentation.id}, function (data) { | |
| var options = {title: gd_main_layer.presentation.title, message: $(data), size: _bootstrap_dialog.SIZE_WIDE}; | |
| _bootstrap_dialog.show(options); | |
| }); | |
| }); | |
| $('.js-setting-cs').bind('click', function () { | |
| $.post('/share/layer_cs_setting.php', null, function (data) { | |
| _bootstrap_dialog.show({ | |
| title: '문의/답변관리 조회설정 ', | |
| message: $(data) | |
| }); | |
| }); | |
| $('.js-setting-order').bind('click', function () { | |
| var layer_id = this.dataset.role; | |
| var title = (layer_id === gd_main_layer.order_presentation.id) ? gd_main_layer.order_presentation.title : gd_main_layer.order_setting.title; | |
| $.post('../base/layer_order_setting.php', {mode: layer_id}, function (data) { | |
| var options = {title: title, message: $(data)}; | |
| _bootstrap_dialog.show(options); | |
| }); | |
| }); | |
| $('.js-setting-favorite-menu').bind('click', function () { | |
| $.post('/share/layer_favorite_menu.php', {mode: gd_main_layer.favorite_menu.id}, function (data) { | |
| var options = {title: gd_main_layer.favorite_menu.title, message: $(data), size: _bootstrap_dialog.SIZE_WIDE}; | |
| _bootstrap_dialog.show(options); | |
| }); | |
| }); | |
| $('#headerSearchType').change(function () { | |
| if (this.value === 'member') { | |
| layer_member_search(); | |
| document.getElementById('headerSearchType').options[0].selected = true; | |
| } | |
| }); | |
| $('#headerSearchKeyword').keyup(function (e) { | |
| if (e.keyCode === 13 && this.value.length > 1) { | |
| $.ajax('../base/main_setting_ps.php', { | |
| method: "post", | |
| global_complete: false, | |
| data: {mode: "searchMenu", keyword: this.value}, | |
| success: function () { | |
| var result = arguments[0].result; | |
| var optionHtml = []; | |
| $.each(result, function (idx, item) { | |
| if (item.tName === 'Web FTP') { | |
| var link = item.tUrl; | |
| } else { | |
| } | |
| }); | |
| $('#headerSearchMenuList').on('click', function () { | |
| location.href = this.value; | |
| }); | |
| $(window).click(function () { | |
| var $headerSearchMenuList = $('#headerSearchMenuList').closest('div'); | |
| if ($headerSearchMenuList.hasClass('display-none') === false) { | |
| $headerSearchMenuList.addClass('display-none'); | |
| } | |
| }); | |
| $('.startDatetime').datetimepicker().on('dp.show', function (e) { | |
| var dateNow = new Date(); | |
| $(this).children().val(moment(dateNow).hours(0).minutes(0).format("YYYY-MM-DD HH:mm")); | |
| }); | |
| $('.endDatetime').datetimepicker().on('dp.show', function (e) { | |
| var dateNow = new Date(); | |
| $(this).children().val(moment(dateNow).hours(23).minutes(59).format("YYYY-MM-DD HH:mm")); | |
| }); | |
| }); | |
| </script> | |
변경 후header.php
| <?php | |
| /** | |
| * 관리자 상단 | |
| * | |
| * @author Shin Donggyu <artherot@godo.co.kr> | |
| */ | |
| ?> | |
| <link rel="stylesheet" href="<?= PATH_ADMIN_GD_SHARE ?>css/dev_source.css"> | |
| <nav class="navbar"> | |
| <div class="container"> | |
| <div class="navbar-inner"> | |
| <span><?php echo Session::get('manager.managerNm'); ?></span> | |
| <span>님 (</span> | |
| <span class="manager-id"><?php echo $managerId; ?></span> | |
| <?php if (!empty($commerceId)): ?> | |
| <span>/ NHN커머스 통합계정:</span> | |
| <span class="manager-id"><?php echo $commerceId; ?></span> | |
| <?php endif; ?> | |
| <?php if (gd_count($gGlobal['useMallList']) > 1) { ?> | |
| <a href="#" class="dropdown-toggle gnb-myshop" id="headerMyShop" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false">내쇼핑몰</a> | |
| <ul class="dropdown-menu gnb-dropdown-menu" aria-labelledby="headerMyShop"> | |
| <?php foreach ($shopMallList as $val) { ?> | |
| <li class="dropdown-item"><a href="<?= $val['domain']; ?>" target="_blank"><span class="flag flag-16 flag-<?= $val['domainFl'] ?>"></span> <?= $val['mallName'] ?></a></li> | |
| <?php }; ?> | |
| </ul> | |
| <?php } else { ?> | |
| <a href="<?php echo URI_HOME; ?>" class="gnb-myshop" id="headerMyShop" target="_blank">내쇼핑몰</a> | |
| <?php } ?> | |
| <?php | |
| if (gd_is_provider() === false) { | |
| ?> | |
| <span style="margin: 0; padding: 0;"> | |
| <a href="#" id="headerDesignEditor" class="gnb-myshop js-gnb-design-editor text-red" | |
| data-has-permission="<?= $designEditorGnb['hasPermission'] ? 'true' : 'false' ?>" | |
| data-is-responsive="<?= $designEditorGnb['isResponsive'] ? 'true' : 'false' ?>" | |
| data-skin-code="<?= htmlspecialchars($designEditorGnb['skinCode']) ?>">디자인 에디터</a> | |
| </span> | |
| <span style="margin: 0; padding: 0;"> | |
| <a href="<?= $commerceAppStoreUrl ?>" target="_blank" class="gnb-myshop">스토어</a> | |
| </span> | |
| <span style="margin: 0; padding: 0; display: none;"> | |
| <a href="<?php echo $_managerUri_ ?>share/shoplinker.php" class="gnb-myshop pdr0">마켓연동</a> | |
| </span> | |
| <?php | |
| } | |
| ?> | |
| </li> | |
| <?php if ($showHeaderOrderPresentation) { ?> | |
| <li class="no-bar new"> | |
| <div class="dropdown gnb-orderinfo" id="dropDownOrderPresentation"> | |
| <a href="#" class="dropdown-toggle dropdown-toggle-arr" id="headerSubMenuOrderPresentation" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false"> | |
| <span class="js-oder-count-new display-none"> | |
| <img src="<?= PATH_ADMIN_GD_SHARE ?>img/icon_new.png" width="14"> | |
| </span> | |
| 주문현황 | |
| </a> | |
| <ul class="dropdown-menu gnb-dropdown-menu" aria-labelledby="headerSubMenuOrderPresentation"> | |
| <li class="dropdown-head">주문상태설정 | |
| <div class="pull-right"> | |
| <a href="#" class="js-setting-order" data-role="orderPresentation"> <img src="<?= PATH_ADMIN_GD_SHARE ?>img/icon_gear.png" alt=""> </a> | |
| </div> | |
| </li> | |
| <li class="dropdown-noitem">조회할 주문상태를<br>선택해주세요.</li> | |
| </ul> | |
| </div> | |
| </li> | |
| <li class="devide"></li> | |
| <?php } ?> | |
| <li class="no-bar"> | |
| <div class="dropdown gnb-favorite" id="dropDownFavoriteMenu"> | |
| if (gd_is_provider() === false) { | |
| if (Session::get('manager.workPermissionFl') == 'y') { | |
| ?> | |
| <li class="devide"></li> | |
| <li class="admin"><a href="javascript:dev_source_manager('customizingInfo.php');" class="font dev-source-gnb-highlight"><img src="<?= PATH_ADMIN_GD_SHARE ?>img/icon_new.png" width="14" style="margin-right:3px;">개발소스관리</a></li> | |
| <li class="devide"></li> | |
| <li class="admin"><a href="javascript:cache_manager();" class="font">속도개선관리</a></li> | |
| <?php | |
| } else if (Globals::get('gLicense.shopWorkLimited') === true) { | |
| ?> | |
| <li class="devide"></li> | |
| <li class="admin"><a href="javascript:upgrade_plan_godomall_basic('<?php echo $commercePlanUpgradeUrl . Globals::get('gLicense.godosno'); ?>', '<?php echo Session::get('manager.isSuper'); ?>');" class="font">개발소스관리</a></li> | |
| <li class="devide"></li> | |
| <li class="admin"><a href="javascript:cache_manager();" class="font">속도개선관리</a></li> | |
| <?php | |
| } | |
| } | |
| </div> | |
| <div class="gnb-search-body"> | |
| <span class="icon-magni"><img src="/admin/gd_share/img/ico_search_btn.png" alt=""></span> | |
| <input type="text" id="headerSearchKeyword" class="form-control" name="headerSearchKeyword" placeholder="메뉴검색" /> | |
| <div class="gnb-search-hint form-inline display-none"> | |
| <select class="form-control multiple-select" size="5" id="headerSearchMenuList" style="height:100px;"></select> | |
| </div> | |
| <div class="collapse navbar-collapse"> | |
| <ul class="nav navbar-nav reform"> | |
| <?php | |
| // 개발소스관리 페이지에서는 GNB 1depth에 '개발소스관리'만 표시 | |
| if (isset($naviMenu) && isset($naviMenu->cd[0]) && $naviMenu->cd[0] === 'development') { ?> | |
| <li class="active"><a href="javascript:dev_source_manager('customizingInfo.php');">개발소스관리</a></li> | |
| <?php } elseif (isset($naviMenu)) { | |
| $menuWidth = gd_division_except_zero(1165, $naviMenu->menuCnt); | |
| $tempTopLink = explode('/', $getTopMenuArr['link']); | |
| foreach ($getTopMenuArr['data'] as $key => $val) { | |
| $sLink = '/' . $val['adminMenuCode'] . '/index.php'; | |
| } | |
| } | |
| ?> | |
| <li class="<?php echo gd_isset($naviMenu->menuSelected['top'][$val['adminMenuNo']]); ?>"> | |
| <a href="<?php echo $sLink; ?>" id="menu_<?php echo $val['adminMenuCode'] ?>" style="width:<?php echo $menuWidth; ?>px;"><?php echo $val['adminMenuName'] ?> | |
| <?php if (in_array($val['adminMenuNo'], $adminMenuFlagService->getAdminMenuFlagsFromSession())): ?> | |
| <div class="new-menu">New</div> | |
| <?php endif; ?> | |
| </a> | |
| </li> | |
| <?php | |
| } | |
| } | |
| } ?> | |
| <?php | |
| if (gd_isset($naviMenu->location)) { | |
| foreach ($naviMenu->location as $v) { | |
| ?> | |
| <li><?php echo $v; ?></li> | |
| <?php | |
| } | |
| } | |
| ?> | |
| <!-- 고도 사이트로 이동 끝 --> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| var gd_main_layer = { | |
| presentation: { | |
| id: "presentation", | |
| selector: "#layerPresentation", | |
| title: "주요현황 조회설정" | |
| }, | |
| order_presentation: { | |
| id: "orderPresentation", | |
| get_id: "getOrderPresentation", | |
| title: "주문현황 조회설정" | |
| }, | |
| order_setting: { | |
| id: "orderSetting", | |
| title: "주문관리 조회설정" | |
| }, | |
| favorite_menu: { | |
| id: "favoriteMenu", | |
| get_id: "getFavoriteMenu", | |
| selector: "#layerFavorite", | |
| title: "자주쓰는 메뉴 설정" | |
| } | |
| }; | |
| var _bootstrap_dialog = BootstrapDialog; | |
| $('#dropDownFavoriteMenu').on('show.bs.dropdown', function() { | |
| var dropdown_container = $(this); | |
| var dropdown_menu = dropdown_container.find('.dropdown-menu'); | |
| $.ajax('../base/main_setting_ps.php', { | |
| method: "post", | |
| data: { | |
| mode: gd_main_layer.favorite_menu.get_id | |
| }, | |
| global_complete: false, | |
| success: function() { | |
| if (arguments[0].success === 'OK') { | |
| var result = arguments[0].result; | |
| if (result.length > 0) { | |
| var html = []; | |
| $.each(result, function(idx, item) { | |
| var menuName = 'none'; | |
| var menuLink = ''; | |
| if (typeof item.tName === 'string') { | |
| }); | |
| }); | |
| $('#dropDownOrderPresentation').on('show.bs.dropdown', function() { | |
| var dropdown_container = $(this); | |
| $.ajax('../base/main_setting_ps.php', { | |
| method: "post", | |
| data: { | |
| mode: gd_main_layer.order_presentation.get_id | |
| }, | |
| global_complete: false, | |
| success: function() { | |
| if (arguments[0].success === 'OK') { | |
| var result = arguments[0].result; | |
| if (result.length > 0) { | |
| var html = []; | |
| $.each(result, function(idx, item) { | |
| // html.push('<li role="separator" class="divider"></li>'); | |
| html.push('<li class="dropdown-item"><a href="' + item.link + '">' + item.name + '<span class="dropdown-item-val"><span class="text-red">' + item.count + '</span>건</span></a></li>'); | |
| }); | |
| }); | |
| }); | |
| $('.js-setting-presentation').click(function() { | |
| $.post('/share/layer_presentation_setting.php', { | |
| mode: gd_main_layer.presentation.id | |
| }, function(data) { | |
| var options = { | |
| title: gd_main_layer.presentation.title, | |
| message: $(data), | |
| size: _bootstrap_dialog.SIZE_WIDE | |
| }; | |
| _bootstrap_dialog.show(options); | |
| }); | |
| }); | |
| $('.js-setting-cs').bind('click', function() { | |
| $.post('/share/layer_cs_setting.php', null, function(data) { | |
| _bootstrap_dialog.show({ | |
| title: '문의/답변관리 조회설정 ', | |
| message: $(data) | |
| }); | |
| }); | |
| $('.js-setting-order').bind('click', function() { | |
| var layer_id = this.dataset.role; | |
| var title = (layer_id === gd_main_layer.order_presentation.id) ? gd_main_layer.order_presentation.title : gd_main_layer.order_setting.title; | |
| $.post('../base/layer_order_setting.php', { | |
| mode: layer_id | |
| }, function(data) { | |
| var options = { | |
| title: title, | |
| message: $(data) | |
| }; | |
| _bootstrap_dialog.show(options); | |
| }); | |
| }); | |
| $('.js-setting-favorite-menu').bind('click', function() { | |
| $.post('/share/layer_favorite_menu.php', { | |
| mode: gd_main_layer.favorite_menu.id | |
| }, function(data) { | |
| var options = { | |
| title: gd_main_layer.favorite_menu.title, | |
| message: $(data), | |
| size: _bootstrap_dialog.SIZE_WIDE | |
| }; | |
| _bootstrap_dialog.show(options); | |
| }); | |
| }); | |
| $('#headerSearchType').change(function() { | |
| if (this.value === 'member') { | |
| layer_member_search(); | |
| document.getElementById('headerSearchType').options[0].selected = true; | |
| } | |
| }); | |
| $('#headerSearchKeyword').keyup(function(e) { | |
| if (e.keyCode === 13 && this.value.length > 1) { | |
| $.ajax('../base/main_setting_ps.php', { | |
| method: "post", | |
| global_complete: false, | |
| data: { | |
| mode: "searchMenu", | |
| keyword: this.value | |
| }, | |
| success: function() { | |
| var result = arguments[0].result; | |
| var optionHtml = []; | |
| $.each(result, function(idx, item) { | |
| if (item.tName === 'Web FTP') { | |
| var link = item.tUrl; | |
| } else { | |
| } | |
| }); | |
| $('#headerSearchMenuList').on('click', function() { | |
| location.href = this.value; | |
| }); | |
| $(window).click(function() { | |
| var $headerSearchMenuList = $('#headerSearchMenuList').closest('div'); | |
| if ($headerSearchMenuList.hasClass('display-none') === false) { | |
| $headerSearchMenuList.addClass('display-none'); | |
| } | |
| }); | |
| $('.startDatetime').datetimepicker().on('dp.show', function(e) { | |
| var dateNow = new Date(); | |
| $(this).children().val(moment(dateNow).hours(0).minutes(0).format("YYYY-MM-DD HH:mm")); | |
| }); | |
| $('.endDatetime').datetimepicker().on('dp.show', function(e) { | |
| var dateNow = new Date(); | |
| $(this).children().val(moment(dateNow).hours(23).minutes(59).format("YYYY-MM-DD HH:mm")); | |
| }); | |
| $('#headerDesignEditor').on('click', function (e) { | |
| e.preventDefault(); | |
| var $btn = $(this); | |
| var hasPermission = $btn.data('has-permission'); | |
| var isResponsive = $btn.data('is-responsive'); | |
| var skinCode = $btn.data('skin-code'); | |
| var designSkinListUrl = '/design/design_skin_list.php'; | |
| // 권한 없음 | |
| if (!hasPermission) { | |
| location.href = designSkinListUrl; | |
| return; | |
| } | |
| // 반응형 스킨 미설정 or 사용 스킨 없음 | |
| if (!isResponsive || !skinCode) { | |
| dialog_confirm( | |
| '디자인 에디터를 사용하려면 반응형 스킨을 사용 스킨으로 설정해야 합니다. [확인] 클릭 시, 디자인 스킨 리스트 페이지로 이동합니다.', | |
| function (result) { | |
| if (result) { | |
| location.href = designSkinListUrl; | |
| } | |
| } | |
| ); | |
| return; | |
| } | |
| // 반응형 스킨 사용 중 (isResponsive) | |
| window.open('/design/design_editor.php?skinCode=' + encodeURIComponent(skinCode), '_blank'); | |
| }); | |
| }); | |
| </script> | |
변경 전header_myapp.php
| if (Session::get('manager.workPermissionFl') == 'y') { | |
| ?> | |
| <li class="devide"></li> | |
| <li class="admin"><a href="javascript:development_manager();" class="font">개발소스관리</a></li> | |
| <?php | |
| } else if (Globals::get('gLicense.shopWorkLimited') === true) { | |
| ?> | |
변경 후header_myapp.php
| if (Session::get('manager.workPermissionFl') == 'y') { | |
| ?> | |
| <li class="devide"></li> | |
| <li class="admin"><a href="javascript:dev_source_manager();" class="font dev-source-gnb-highlight">개발소스관리</a></li> | |
| <?php | |
| } else if (Globals::get('gLicense.shopWorkLimited') === true) { | |
| ?> | |
변경 전header_no_breadcrumb.php
| if (gd_is_provider() === false) { | |
| ?> | |
| <span style="margin: 0; padding: 0;"> | |
| <a href="<?= $commerceAppStoreUrl ?>" target="_blank" class="gnb-myshop text-red">스토어</a> | |
| </span> | |
| <span style="margin: 0; padding: 0; display: none;"> | |
| <a href="<?php echo $_managerUri_ ?>share/shoplinker.php" class="gnb-myshop pdr0">마켓연동</a> | |
| if (Session::get('manager.workPermissionFl') == 'y') { | |
| ?> | |
| <li class="devide"></li> | |
| <li class="admin"><a href="javascript:development_manager('<?= Globals::get('gLicense.isDevShop') ? 'dev_shop_guide.php' : '' ?>');" class="font">개발소스관리</a> | |
| <?php if (!empty($inspectFileCount)): ?> | |
| <span style="display: inline-block; background-color: #dc3545; color: white; border-radius: 50%; min-width: 18px; height: 18px; text-align: center; line-height: 18px; font-size: 11px; font-weight: bold; margin-left: 4px; padding: 0 4px; box-sizing: border-box;"> | |
| <?= $inspectFileCount ?> | |
| </span> | |
| <?php endif; ?></li> | |
| <li class="devide"></li><li class="admin"><a href="javascript:cache_manager();" class="font">속도개선관리</a></li> | |
| <?php | |
| } else if (Globals::get('gLicense.shopWorkLimited') === true) { | |
| var dateNow = new Date(); | |
| $(this).children().val(moment(dateNow).hours(23).minutes(59).format("YYYY-MM-DD HH:mm")); | |
| }); | |
| }); | |
| </script> | |
변경 후header_no_breadcrumb.php
| if (gd_is_provider() === false) { | |
| ?> | |
| <span style="margin: 0; padding: 0;"> | |
| <a href="#" id="headerDesignEditor" class="gnb-myshop js-gnb-design-editor text-red" | |
| data-has-permission="<?= $designEditorGnb['hasPermission'] ? 'true' : 'false' ?>" | |
| data-is-responsive="<?= $designEditorGnb['isResponsive'] ? 'true' : 'false' ?>" | |
| data-skin-code="<?= htmlspecialchars($designEditorGnb['skinCode']) ?>">디자인 에디터</a> | |
| </span> | |
| <span style="margin: 0; padding: 0;"> | |
| <a href="<?= $commerceAppStoreUrl ?>" target="_blank" class="gnb-myshop">스토어</a> | |
| </span> | |
| <span style="margin: 0; padding: 0; display: none;"> | |
| <a href="<?php echo $_managerUri_ ?>share/shoplinker.php" class="gnb-myshop pdr0">마켓연동</a> | |
| if (Session::get('manager.workPermissionFl') == 'y') { | |
| ?> | |
| <li class="devide"></li> | |
| <li class="admin"><a href="javascript:dev_source_manager('customizingInfo.php');" class="font">개발소스관리</a></li> | |
| <li class="devide"></li><li class="admin"><a href="javascript:cache_manager();" class="font">속도개선관리</a></li> | |
| <?php | |
| } else if (Globals::get('gLicense.shopWorkLimited') === true) { | |
| var dateNow = new Date(); | |
| $(this).children().val(moment(dateNow).hours(23).minutes(59).format("YYYY-MM-DD HH:mm")); | |
| }); | |
| $('#headerDesignEditor').on('click', function (e) { | |
| e.preventDefault(); | |
| var $btn = $(this); | |
| var hasPermission = $btn.data('has-permission'); | |
| var isResponsive = $btn.data('is-responsive'); | |
| var skinCode = $btn.data('skin-code'); | |
| var designSkinListUrl = '/design/design_skin_list.php'; | |
| // 권한 없음 | |
| if (!hasPermission) { | |
| location.href = designSkinListUrl; | |
| return; | |
| } | |
| // 반응형 스킨 미설정 or 사용 스킨 없음 | |
| if (!isResponsive || !skinCode) { | |
| dialog_confirm( | |
| '디자인 에디터를 사용하려면 반응형 스킨을 사용 스킨으로 설정해야 합니다. [확인] 클릭 시, 디자인 스킨 리스트 페이지로 이동합니다.', | |
| function (result) { | |
| if (result) { | |
| location.href = designSkinListUrl; | |
| } | |
| } | |
| ); | |
| return; | |
| } | |
| // 반응형 스킨 사용 중 (isResponsive) | |
| window.open('/design/design_editor.php?skinCode=' + encodeURIComponent(skinCode), '_blank'); | |
| }); | |
| }); | |
| </script> | |
변경 전layout_design_editor.php
| skinVersion: '<?=$skinVersion?>', | |
| skinCountry: '<?=$skinCountry?>', | |
| skinLiveFl: <?=$skinLiveFl ? 'true' : 'false'?>, | |
| requestUrl: baseDir + '/design_editor_ps.php' | |
| }); | |
| }); | |
변경 후layout_design_editor.php
| skinVersion: '<?=$skinVersion?>', | |
| skinCountry: '<?=$skinCountry?>', | |
| skinLiveFl: <?=$skinLiveFl ? 'true' : 'false'?>, | |
| rootSkinCode: '<?=$rootSkinCode?>', | |
| requestUrl: baseDir + '/design_editor_ps.php' | |
| }); | |
| }); | |
변경 전layout_dev_source.php
변경 후layout_dev_source.php
| <?php | |
| /** | |
| * 개발소스관리 NCDS 레이아웃 | |
| * | |
| * layout_development_popup.php의 NCDS 전환 버전. | |
| * NCDS CDN CSS/JS를 로드하고, LNB는 development/_lnb.php를 사용한다. | |
| * | |
| * @copyright (C) 2026 NHN COMMERCE. - All Rights Reserved | |
| */ | |
| include UserFilePath::adminSkin('head.php'); | |
| ?> | |
| <style type="text/css"> | |
| .staging-top-banner { | |
| background: var(--orange-50, #fefaf5); | |
| color: var(--orange-600, #b93815); | |
| padding: 8px 16px; | |
| text-align: center; | |
| font-family: var(--font-family-ncua-commerce-sans); | |
| font-size: 14px; | |
| font-weight: 700; | |
| line-height: 22px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 6px; | |
| border-bottom: 1px solid var(--orange-300, #f7b27a); | |
| } | |
| .staging-top-banner svg { | |
| flex-shrink: 0; | |
| } | |
| body.has-staging-banner { | |
| --staging-banner-height: 30px; | |
| } | |
| </style> | |
| <body class="<?php echo $adminBodyClass; ?> layout-basic ncds<?= Globals::get('gLicense.isDevShop') ? ' has-staging-banner' : '' ?>"> | |
| <div id="container-wrap" class="container-fluid"> | |
| <div id="container" class="row"> | |
| <?php if (Globals::get('gLicense.isDevShop')): ?> | |
| <div class="staging-top-banner"> | |
| <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2L1 21h22L12 2zm0 3.99L19.53 19H4.47L12 5.99zM11 16h2v2h-2v-2zm0-6h2v4h-2v-4z"/></svg> | |
| <?= __('현재 스테이징 서버 접속 중입니다.') ?> | |
| </div> | |
| <?php endif; ?> | |
| <div id="header" class="col-xs-12"> | |
| <?php if (isset($layoutHeader)) { include($layoutHeader); } ?> | |
| <div id="panel_popupPanel"></div> | |
| <div id="panel_popupCos_modal"></div> | |
| <div id="panel_popupCos_layer"></div> | |
| </div> | |
| <div id="content-wrap"> | |
| <div id="menu"> | |
| <?php include($layoutMenu); ?> | |
| </div> | |
| <div id="content" class="row"> | |
| <div class="col-xs-12 ncua-content-wrap js-ncds-content-wrap"> | |
| <?php include($layoutContent); ?> | |
| <?php include($layoutHelp); ?> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div id="gnbTopAnchor"> | |
| <a href="#top"><img src="<?=PATH_ADMIN_GD_SHARE?>img/btn_gnb_top.png"></a> | |
| </div> | |
| <iframe name="ifrmProcess" src="/blank.php" width="100%" height="200" class="<?=App::isDevelopment() === true ? 'display-block' : 'display-none'?>"></iframe> | |
| <script type="text/javascript"> | |
| $(function () { | |
| adminPanelApiAjax('<?php echo $manualData['menuCode'];?>', '<?php echo $manualData['menuKey'];?>', '<?php echo $manualData['menuFile'];?>'); | |
| <?= gd_isset($menuAccessAuth); ?> | |
| $(document).on("click", "a[href=#top]", function (e) { | |
| $('html body').animate({scrollTop: 0}, 'fast'); | |
| }); | |
| $(window).scroll(function () { | |
| if ($(window).height() < $(document).height()) { | |
| if ($(window).scrollTop() >= 1) { | |
| $("#gnbTopAnchor").slideDown(150); | |
| } else { | |
| $("#gnbTopAnchor").slideUp(100); | |
| } | |
| } | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |
변경 전layout_popup_design.php
| <?php include UserFilePath::adminSkin('head.php'); ?> | |
| <style> | |
| body.layout-design:not(.sitemap):not(.cache) #container-wrap #content.row { margin-top: 0; } | |
| </style> | |
| <body class="<?= $adminBodyClass ?> layout-design"> | |
변경 후layout_popup_design.php
| <?php include UserFilePath::adminSkin('head.php'); ?> | |
| <style> | |
| body.layout-design:not(.sitemap):not(.cache) #container-wrap #content.row { margin-top: 0; } | |
| body.layout-design .ncua-content-wrap .page-header { height: 64px; } | |
| </style> | |
| <body class="<?= $adminBodyClass ?> layout-design"> | |
변경 전excel_member_up.php
| 엑셀업로드를 통해 신규 회원 등록 시 자동발송 설정에 따라 회원에게 SMS/메일로 안내메시지가 발송되므로 주의하시기 바랍니다. | |
| </div> | |
| <div class="notice-info"> | |
| 엑셀업로드 전 회원가입 시 발송 가능한 항목(회원가입, 마일리지 지급, 회원가입 축하 쿠폰)의 발송설정을 확인해주시기 바랍니다. <a href="/member/sms_auto.php" target="_blank" class="btn-link">SMS설정></a> <a href="/crm/mail_config_auto.php" target="_blank" class="btn-link">자동 메일 설정></a> | |
| </div> | |
| </td> | |
| </tr> | |
| if(data === true) { | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: 'SMS 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 후excel_member_up.php
| 엑셀업로드를 통해 신규 회원 등록 시 자동발송 설정에 따라 회원에게 SMS/메일로 안내메시지가 발송되므로 주의하시기 바랍니다. | |
| </div> | |
| <div class="notice-info"> | |
| 엑셀업로드 전 회원가입 시 발송 가능한 항목(회원가입, 마일리지 지급, 회원가입 축하 쿠폰)의 발송설정을 확인해주시기 바랍니다. <a href="/crm/auto_send.php" target="_blank" class="btn-link">SMS설정></a> <a href="/crm/mail_config_auto.php" target="_blank" class="btn-link">자동 메일 설정></a> | |
| </div> | |
| </td> | |
| </tr> | |
| if(data === true) { | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: '메시지 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 전member_batch_approval_with_group.php
| if(ret === true) { | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: 'SMS 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 후member_batch_approval_with_group.php
| if(ret === true) { | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: '메시지 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 전member_batch_deposit.php
| <td> | |
| <label> | |
| <input type="checkbox" name="guideSend[]" value="sms" <?= gd_isset($checked['guideSend']['sms']); ?> /> | |
| SMS발송 <a href="../member/sms_auto.php" target="_blank" class="btn-link">상세설정 ></a> | |
| </label> | |
| <label> | |
| <input type="checkbox" name="guideSend[]" value="email" <?= gd_isset($checked['guideSend']['email']); ?> /> | |
| <div> | |
| <span class="notice-info">* SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : | |
| <span class="text-darkred bold"><?= number_format(gd_get_sms_point(), 1); ?></span> | |
| ) <a href="#" class="btn btn-xs btn-gray mgl10 js-link-sms-charge">SMS포인트 충전하기</a> | |
| </span> | |
| </div> | |
| </td> | |
변경 후member_batch_deposit.php
| <td> | |
| <label> | |
| <input type="checkbox" name="guideSend[]" value="sms" <?= gd_isset($checked['guideSend']['sms']); ?> /> | |
| SMS발송 <a href="../crm/auto_send.php" target="_blank" class="btn-link">상세설정 ></a> | |
| </label> | |
| <label> | |
| <input type="checkbox" name="guideSend[]" value="email" <?= gd_isset($checked['guideSend']['email']); ?> /> | |
| <div> | |
| <span class="notice-info">* SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : | |
| <span class="text-darkred bold"><?= number_format(gd_get_sms_point(), 1); ?></span> | |
| ) <a href="#" class="btn btn-xs btn-gray mgl10 js-link-sms-charge">메시지 포인트 충전하기</a> | |
| </span> | |
| </div> | |
| </td> | |
변경 전member_batch_mileage.php
| value="sms" <?= gd_isset($checked['guideSend']['sms']); ?> | |
| />SMS발송 | |
| </label> | |
| <a href="#member" class="btn-link js-link-sms-auto">상세설정 ></a> | |
| <label class="checkbox-inline"> | |
| <input type="checkbox" name="guideSend[]" | |
| value="email" <?= gd_isset($checked['guideSend']['email']); ?> | |
| <div> | |
| <span class="notice-info">* SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : | |
| <span class="text-darkred bold"><?= number_format(gd_get_sms_point(), 1); ?></span> | |
| ) <a href="#" class="btn btn-xs btn-gray mgl10 js-link-sms-charge">SMS포인트 충전하기</a> | |
| </span> | |
| </div> | |
| </td> | |
변경 후member_batch_mileage.php
| value="sms" <?= gd_isset($checked['guideSend']['sms']); ?> | |
| />SMS발송 | |
| </label> | |
| <a href="#member" class="btn-link" onclick="window.open('/crm/auto_send.php?popupMode=yes#member', 'auto_send', 'width=1400, height=700, scrollbars=no'); return false;">상세설정 ></a> | |
| <label class="checkbox-inline"> | |
| <input type="checkbox" name="guideSend[]" | |
| value="email" <?= gd_isset($checked['guideSend']['email']); ?> | |
| <div> | |
| <span class="notice-info">* SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : | |
| <span class="text-darkred bold"><?= number_format(gd_get_sms_point(), 1); ?></span> | |
| ) <a href="#" class="btn btn-xs btn-gray mgl10 js-link-sms-charge">메시지 포인트 충전하기</a> | |
| </span> | |
| </div> | |
| </td> | |
변경 전member_group_appraisal_config.php
| if(data === true) { | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: 'SMS 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 후member_group_appraisal_config.php
| if(data === true) { | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: '메시지 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 전member_group_list.php
| </td> | |
| </tr> | |
| </table> | |
| <div class="notice-info" style="margin-bottom: 20px;">회원 등급 변경으로 인한 쿠폰 혜택 지급 시 자동 SMS 항목인 '회원등급 변경안내와 '수동쿠폰 발급 안내'가 모두 발송될 수 있으니, 발송 설정을 확인해주세요. <a href="/member/sms_auto.php#promotion" target="_blank" class="btn-link-underline">자동 SMS 설정 ></a></div> | |
| </form> | |
| <form id="frmList" action="" method="get" target="ifrmProcess"> | |
| <input type="hidden" name="mode" value=""/> | |
| if (data === true) { | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: 'SMS 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 후member_group_list.php
| </td> | |
| </tr> | |
| </table> | |
| <div class="notice-info" style="margin-bottom: 20px;">회원 등급 변경으로 인한 쿠폰 혜택 지급 시 자동 SMS 항목인 '회원등급 변경안내와 '수동쿠폰 발급 안내'가 모두 발송될 수 있으니, 발송 설정을 확인해주세요. <a href="/crm/auto_send.php#promotion" target="_blank" class="btn-link-underline">자동 알림 설정 ></a></div> | |
| </form> | |
| <form id="frmList" action="" method="get" target="ifrmProcess"> | |
| <input type="hidden" name="mode" value=""/> | |
| if (data === true) { | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: '메시지 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 전member_mileage_basic.php
| <label> | |
| <input type="hidden" name="expirySms" value="<?= $smsMemberSend == 'y' ? '1' : ''; ?>"> | |
| <input type="checkbox" name="tmpExpirySms" value="1" <?= $smsMemberSend == 'y' ? 'checked="checked"' : ''; ?>> | |
| SMS발송 <a href="../member/sms_auto.php#member" target="_blank" class="btn-link">상세설정</a> | |
| </label> | |
| <label> | |
| <input type="hidden" name="expiryEmail" value="<?= $mailMemberSend == 'y' ? '1' : ''; ?>"> | |
| </div> | |
| <span class="notice-info">※ SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : | |
| <span class="text-darkred bold"><?= number_format($smsPoint, 1); ?></span> | |
| ) <input type="button" class="btn btn-xs btn-gray mgl10 js-link-sms-charge" value="SMS포인트 충전하기" /> | |
| </span> | |
| <span class="notice-info info-block">※ SMS/이메일 자동안내 발송 여부는 자동 메일/SMS의 "마일리지 소멸" 항목 발송여부 설정에 따라 자동으로 설정됩니다. | |
| <span class="info-block">(체크박스 우측 "상세설정" 클릭 시 설정 페이지로 이동하실 수 있습니다.)</span> | |
| </span> | |
| <span class="notice-danger notice-info text-darkred info-block">※ 카카오 알림톡을 사용중이신 경우, 마일리지 소멸 자동안내는 자동 SMS 설정이 아닌 카카오 알림톡 설정 기준으로 발송되오니 주의바랍니다.</span> | |
| </td> | |
| </tr> | |
| <tr> | |
변경 후member_mileage_basic.php
| <label> | |
| <input type="hidden" name="expirySms" value="<?= $smsMemberSend == 'y' ? '1' : ''; ?>"> | |
| <input type="checkbox" name="tmpExpirySms" value="1" <?= $smsMemberSend == 'y' ? 'checked="checked"' : ''; ?>> | |
| SMS발송 <a href="../crm/auto_send.php#member" target="_blank" class="btn-link">상세설정</a> | |
| </label> | |
| <label> | |
| <input type="hidden" name="expiryEmail" value="<?= $mailMemberSend == 'y' ? '1' : ''; ?>"> | |
| </div> | |
| <span class="notice-info">※ SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : | |
| <span class="text-darkred bold"><?= number_format($smsPoint, 1); ?></span> | |
| ) <input type="button" class="btn btn-xs btn-gray mgl10 js-link-sms-charge" value="메시지 포인트 충전하기" /> | |
| </span> | |
| <span class="notice-info info-block">※ SMS/이메일 자동안내 발송 여부는 자동 메일/SMS의 "마일리지 소멸" 항목 발송여부 설정에 따라 자동으로 설정됩니다. | |
| <span class="info-block">(체크박스 우측 "상세설정" 클릭 시 설정 페이지로 이동하실 수 있습니다.)</span> | |
| </span> | |
| </td> | |
| </tr> | |
| <tr> | |
변경 전member_sleep.php
| </div> | |
| <div class="pd5 pdl15"> | |
| <span class="notice-info">* SMS는 잔여포인트가 있어야 발송됩니다. | |
| <a href="../member/sms_charge.php" class="btn btn-xs btn-gray mgl10">SMS포인트 충전하기</a> | |
| </span> | |
| </div> | |
| </div> | |
변경 후member_sleep.php
| </div> | |
| <div class="pd5 pdl15"> | |
| <span class="notice-info">* SMS는 잔여포인트가 있어야 발송됩니다. | |
| <a href="../crm/message_config.php" target="_blank" class="btn btn-xs btn-gray mgl10">메시지 포인트 충전하기</a> | |
| </span> | |
| </div> | |
| </div> | |
변경 전manage_register.php
| <?php } ?> | |
| </div> | |
| <div class="notice-info"> | |
| 인증번호는 SMS발신번호 및 SMS인증번호가 등록 되어있어야 하며, 잔여포인트가 있어야 발송 됩니다. (잔여포인트 : <strong class="font-num text-red sms-point"></strong>) | |
| <button type="button" class="btn btn-gray btn-sm" onclick="show_popup('../member/sms_charge.php?popupMode=yes')">SMS 포인트 충전하기</button> | |
| </div> | |
| <div class="notice-info"> | |
| SMS발신번호 및 SMS인증번호 관리는 <a href="/crm/message_config.php" target="_blank" class="btn-link">[CRM > 메시지 설정 > 모바일 메시지 설정]</a> 에서 확인할 수 있습니다. | |
| </div> | |
| </td> | |
| </tr> | |
| $('.js-request-authno').bind('click', function () { | |
| if (manage_register.sms_point < 1) { | |
| alert('SMS 포인트가 부족합니다. 인증번호 발송을 위해 SMS 포인트를 충전해주세요'); | |
| return false; | |
| } | |
변경 후manage_register.php
| <?php } ?> | |
| </div> | |
| <div class="notice-info"> | |
| 인증번호는 발신번호 및 메시지 인증번호가 등록 되어있어야 하며, 잔여포인트가 있어야 발송 됩니다. (잔여포인트 : <strong class="font-num text-red sms-point"></strong>) | |
| <button type="button" class="btn btn-gray btn-sm" onclick="show_popup('../crm/popup_charge_message_points.php')">메시지 포인트 충전</button> | |
| </div> | |
| <div class="notice-info"> | |
| 발신번호 및 메시지 인증번호 관리는 <a href="/crm/message_config.php" target="_blank" class="btn-link">[CRM > 메시지 설정 > 모바일 메시지 설정]</a> 에서 확인할 수 있습니다. | |
| </div> | |
| </td> | |
| </tr> | |
| $('.js-request-authno').bind('click', function () { | |
| if (manage_register.sms_point < 1) { | |
| alert('메시지 포인트가 부족합니다. 인증번호 발송을 위해 메시지 포인트를 충전해주세요'); | |
| return false; | |
| } | |
변경 전manage_security.php
| 로그인한 운영자 정보에 인증정보(SMS, 이메일)가 없는 경우, 보안인증화면이 노출되지 않습니다.<br/>관리자 보안인증 설정을 사용 시, 운영자 정보에 인증정보를 등록해주세요. <a href="../policy/manage_list.php" target="_blank" class="btn-link">운영자 정보 수정하기 ></a> | |
| </p> | |
| <p class="notice-info"> | |
| 인증번호 SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : <?php echo number_format($smsPoint, 1) ?>) <a href="../member/sms_charge.php" target="_blank" class="btn-link">SMS포인트 충전하기 ></a> | |
| </p> | |
| <p class="notice-info"> | |
| SMS잔여포인트가 없는 경우 자동으로 이메일이 인증수단으로 노출되며, 포인트 충전 이후 설정한 인증수단으로 노출됩니다. | |
| </p> | |
| <p class="notice-info"> | |
| 이메일인증은 주문처리 및 프로모션 등으로 인해 이메일이 대량으로 발송될 경우 인증번호 전송이 지연될 수 있으므로 SMS인증을 사용하시길 권장합니다. | |
| <td> | |
| <input type="hidden" name="excel[smsAuth]" id="excelSmsAuthManager" value="manager" /> | |
| 운영자 정보에 등록된 SMS로 관리자 보안 인증번호가 발송됩니다. | |
| <p class="notice-info">운영자 인증번호 SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : <?= number_format($smsPoint) ?>) <a href="../member/sms_charge.php" target="_blank" class="btn-link">SMS포인트 충전하기 ></a></p> | |
| <p class="notice-info">로그인한 운영자 정보에 SMS 인증정보(휴대폰번호)가 없는 경우, 엑셀 다운로드가 불가합니다.</p> | |
| </td> | |
| </tr> | |
변경 후manage_security.php
| 로그인한 운영자 정보에 인증정보(SMS, 이메일)가 없는 경우, 보안인증화면이 노출되지 않습니다.<br/>관리자 보안인증 설정을 사용 시, 운영자 정보에 인증정보를 등록해주세요. <a href="../policy/manage_list.php" target="_blank" class="btn-link">운영자 정보 수정하기 ></a> | |
| </p> | |
| <p class="notice-info"> | |
| 인증번호 SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : <?php echo number_format($smsPoint, 1) ?>) <a href="../crm/message_config.php" target="_blank" class="btn-link">메시지 포인트 충전하기 ></a> | |
| </p> | |
| <p class="notice-info"> | |
| 잔여 메시지 포인트가 없는 경우 자동으로 이메일이 인증수단으로 노출되며, 포인트 충전 이후 설정한 인증수단으로 노출됩니다. | |
| </p> | |
| <p class="notice-info"> | |
| 이메일인증은 주문처리 및 프로모션 등으로 인해 이메일이 대량으로 발송될 경우 인증번호 전송이 지연될 수 있으므로 SMS인증을 사용하시길 권장합니다. | |
| <td> | |
| <input type="hidden" name="excel[smsAuth]" id="excelSmsAuthManager" value="manager" /> | |
| 운영자 정보에 등록된 SMS로 관리자 보안 인증번호가 발송됩니다. | |
| <p class="notice-info">운영자 인증번호 SMS는 잔여포인트가 있어야 발송됩니다. (잔여포인트 : <?= number_format($smsPoint) ?>) <a href="../crm/message_config.php" target="_blank" class="btn-link">메시지 포인트 충전하기 ></a></p> | |
| <p class="notice-info">로그인한 운영자 정보에 SMS 인증정보(휴대폰번호)가 없는 경우, 엑셀 다운로드가 불가합니다.</p> | |
| </td> | |
| </tr> | |
변경 전member_password_find.php
| 사용안함 | |
| </label> | |
| <div class="notice-info notice-sm">회원정보에 등록된 휴대폰 번호로 비밀번호 찾기 인증번호를 발송합니다.</div> | |
| <div class="notice-info notice-sm">휴대폰 인증은 SMS 잔여포인트가 없으면 노출되지 않습니다. (잔여포인트 : | |
| <span class="number text-darkred"><?= number_format(gd_get_sms_point(), 1); ?></span> | |
| ) <a target="_blank" href="../member/sms_charge.php" class="btn-link">SMS포인트 충전하기</a>> | |
| </div> | |
| <div class="notice-info notice-sm">자동 SMS 설정 또는 카카오 알림톡 설정에서 ‘비밀번호 찾기 인증번호’ 항목을 자동발송으로 설정해야 인증번호가 발송됩니다. | |
| <a target="_blank" href="../member/sms_auto.php" class="btn-link">SMS발송 상세설정</a>> | |
| <a target="_blank" href="../member/kakao_alrim_setting.php" class="btn-link">카카오 알림톡 상세설정</a>> | |
| </div> | |
| <div class="notice-info notice-sm">회원정보에 휴대폰 정보가 등록되지 않은 회원에게는 노출되지 않습니다.</div> | |
| </td> | |
변경 후member_password_find.php
| 사용안함 | |
| </label> | |
| <div class="notice-info notice-sm">회원정보에 등록된 휴대폰 번호로 비밀번호 찾기 인증번호를 발송합니다.</div> | |
| <div class="notice-info notice-sm">휴대폰 인증은 잔여 메시지 포인트가 없으면 노출되지 않습니다. (잔여포인트 : | |
| <span class="number text-darkred"><?= number_format(gd_get_sms_point(), 1); ?></span> | |
| ) <a target="_blank" href="../crm/message_config.php" class="btn-link">메시지 포인트 충전하기</a>> | |
| </div> | |
| <div class="notice-info notice-sm">자동 알림 설정에서 ‘비밀번호 찾기 인증번호’ 항목을 자동발송으로 설정해야 인증번호가 발송됩니다. | |
| <a target="_blank" href="../crm/auto_send_config.php?code=PASS_AUTH" class="btn-link">자동 알림 설정 ></a> | |
| </div> | |
| <div class="notice-info notice-sm">회원정보에 휴대폰 정보가 등록되지 않은 회원에게는 노출되지 않습니다.</div> | |
| </td> | |
변경 전cart_remind_list.php
| <col/> | |
| </colgroup> | |
| <tr> | |
| <th>SMS 잔여 포인트</th> | |
| <td class="form-inline"> | |
| <span class="number text-darkred bold"><?php echo number_format($smsPoint, 1) ?></span> 포인트 | |
| <button type="button" class="btn btn-gray btn-sm" onclick="show_popup('../member/sms_charge.php?popupMode=yes')">SMS 포인트 충전하기</button> | |
| <?php if ($smsPoint === '0') { ?> | |
| <div class="notice-danger">[SMS 설정]에 설정된 인증번호와 <a href="<?= $commerceShopMainUrl; ?>" class="btn-link text-red"><b>[마이페이지 > 쇼핑몰 관리]</b></a>에 설정된 인증번호가 일치해야 포인트 정보가 정상 출력됩니다.</div> | |
| <?php } ?> | |
| $(document).ready(function () { | |
| // SMS 사전 등록 발신번호 선택하기 | |
| $('.js-sms-call-number').click(function (e) { | |
| var params = { | |
| returnInput: 'smsCallNum' | |
| }; | |
| $.get('../member/layer_sms_call_number_select.php', params, function (data) { | |
| BootstrapDialog.show({ | |
| title: 'SMS 발신번호 목록', | |
| message: $(data), | |
| closable: true | |
| }); | |
| }); | |
| }); | |
| $('#frmCartRemind').validate({ | |
| if(cnt >= 100) { | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: 'SMS 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 후cart_remind_list.php
| <col/> | |
| </colgroup> | |
| <tr> | |
| <th>메시지 잔여 포인트</th> | |
| <td class="form-inline"> | |
| <span class="number text-darkred bold"><?php echo number_format($smsPoint, 1) ?></span> 포인트 | |
| <button type="button" class="btn btn-gray btn-sm" onclick="show_popup('/crm/popup_charge_message_points.php')">메시지 포인트 충전하기</button> | |
| <?php if ($smsPoint === '0') { ?> | |
| <div class="notice-danger">[SMS 설정]에 설정된 인증번호와 <a href="<?= $commerceShopMainUrl; ?>" class="btn-link text-red"><b>[마이페이지 > 쇼핑몰 관리]</b></a>에 설정된 인증번호가 일치해야 포인트 정보가 정상 출력됩니다.</div> | |
| <?php } ?> | |
| $(document).ready(function () { | |
| // SMS 사전 등록 발신번호 선택하기 | |
| $('.js-sms-call-number').click(function (e) { | |
| show_popup('/crm/popup_manage_call_number.php'); | |
| }); | |
| $('#frmCartRemind').validate({ | |
| if(cnt >= 100) { | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: '메시지 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 전comeback_coupon_list.php
| <col/> | |
| </colgroup> | |
| <tr> | |
| <th>SMS 잔여 포인트</th> | |
| <td class="form-inline"> | |
| <span class="number text-darkred bold"><?php echo number_format($smsPoint, 1) ?></span> 포인트 | |
| <input type="hidden" id="sms-point" value="<?php echo $smsPoint ?>"> | |
| <button type="button" class="btn btn-gray btn-sm" onclick="show_popup('../member/sms_charge.php?popupMode=yes')">SMS 포인트 충전하기</button> | |
| <?php if ($smsPoint === '0') { ?> | |
| <div class="notice-danger">[SMS 설정]에 설정된 인증번호와 <a href="<?= $commerceShopMainUrl; ?>" class="btn-link text-red"><b>[마이페이지 > 쇼핑몰 관리]</b></a>에 설정된 인증번호가 일치해야 포인트 정보가 정상 출력됩니다.</div> | |
| <?php } ?> | |
| $(document).ready(function () { | |
| // SMS 사전 등록 발신번호 선택하기 | |
| $('.js-sms-call-number').click(function (e) { | |
| var params = { | |
| returnInput: 'smsCallNum' | |
| }; | |
| $.get('../member/layer_sms_call_number_select.php', params, function (data) { | |
| BootstrapDialog.show({ | |
| title: 'SMS 발신번호 목록', | |
| message: $(data), | |
| closable: true | |
| }); | |
| }); | |
| }); | |
| $('#frmCouponList').validate({ | |
| if (smsCount < data.count) { | |
| BootstrapDialog.alert({ | |
| title: '', | |
| message: 'SMS 잔여 포인트가 부족하여 SMS를 발송할 수 없습니다.<br/>SMS 포인트 충전 후 발송하시기 바랍니다.', | |
| closable: true, | |
| }); | |
| return false; | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| console.log(arguments); | |
| BootstrapDialog.show({ | |
| title: 'SMS 인증번호 변경하기', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 후comeback_coupon_list.php
| <col/> | |
| </colgroup> | |
| <tr> | |
| <th>메시지 잔여 포인트</th> | |
| <td class="form-inline"> | |
| <span class="number text-darkred bold"><?php echo number_format($smsPoint, 1) ?></span> 포인트 | |
| <input type="hidden" id="sms-point" value="<?php echo $smsPoint ?>"> | |
| <button type="button" class="btn btn-gray btn-sm" onclick="show_popup('/crm/popup_charge_message_points.php')">메시지 포인트 충전하기</button> | |
| <?php if ($smsPoint === '0') { ?> | |
| <div class="notice-danger">[SMS 설정]에 설정된 인증번호와 <a href="<?= $commerceShopMainUrl; ?>" class="btn-link text-red"><b>[마이페이지 > 쇼핑몰 관리]</b></a>에 설정된 인증번호가 일치해야 포인트 정보가 정상 출력됩니다.</div> | |
| <?php } ?> | |
| $(document).ready(function () { | |
| // SMS 사전 등록 발신번호 선택하기 | |
| $('.js-sms-call-number').click(function (e) { | |
| show_popup('/crm/popup_manage_call_number.php'); | |
| }); | |
| $('#frmCouponList').validate({ | |
| if (smsCount < data.count) { | |
| BootstrapDialog.alert({ | |
| title: '', | |
| message: '메시지 잔여 포인트가 부족하여 SMS를 발송할 수 없습니다.<br/>메시지 포인트 충전 후 발송하시기 바랍니다.', | |
| closable: true, | |
| }); | |
| return false; | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| console.log(arguments); | |
| BootstrapDialog.show({ | |
| title: '메시지 인증번호 변경하기', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 전coupon_regist.php
| $('#selectUseMemberGroup').click(function (e) { | |
| layer_register('UseMemberGroup', 'use'); | |
| }); | |
| // 자동발급이벤트 선택으로 인한 체크박스 옵션 해제 | |
| $('body').on('unchecked', '[name="couponEventType"]', function(e){ | |
| $(e.target).parents('div.radio').find(':checkbox').prop('checked', false); | |
| if($('input:radio[name="couponUsePeriodType"]:checked').val() == 'period') { | |
| $('#divCouponUsePeriodTypePeriod').show(); | |
| $('#divCouponUsePeriodTypeDay').hide(); | |
| } else { | |
| $('#divCouponUsePeriodTypePeriod').hide(); | |
| $('#divCouponUsePeriodTypeDay').show(); | |
| } | |
| }); | |
| // 상품리스트, 상품상세 쿠폰발급설정 타입 변경 시 | |
| $('#couponExceptTypeGoodsTitle').html('사용 제외 특정 상품 선택'); | |
| } | |
| setCouponAmountEnabledByType(); | |
| bindCouponAmountTypeEvents(); | |
| } | |
| $('#benefitFixApply').hide(); | |
| $('input:checkbox[name="couponBenefitFixApply"]').prop("checked", false); | |
| } else { | |
| $('input:checkbox[name="couponMaxBenefitType"]').prop("disabled", true); | |
| $('input:text[name="couponMaxBenefit"]').prop("disabled", true); | |
| $('input:text[name="couponBenefit"]').removeAttr('maxlength'); | |
| $('input:text[name="couponBenefit"]').attr('maxlength', '8'); | |
| if (shouldResetValue) { | |
| minOrderPriceInput.style.display = ''; | |
| } else { | |
| minOrderPriceInput.style.display = 'none'; | |
| } | |
| } | |
| }; | |
| if (amountInput) { | |
| amountInput.disabled = selected !== 'y' || isManual; | |
| } | |
| if (container) { | |
변경 후coupon_regist.php
| $('#selectUseMemberGroup').click(function (e) { | |
| layer_register('UseMemberGroup', 'use'); | |
| }); | |
| // 동일 아이디 재발급 제한 설정안함 시 하위 필드 초기화 | |
| $('input:radio[name="couponSaveDuplicateType"]').change(function () { | |
| if ($(this).val() == 'n') { | |
| $('input:checkbox[name="couponSaveDuplicateLimitType"]').prop('checked', false); | |
| $('input:text[name="couponSaveDuplicateLimit"]').val(''); | |
| } | |
| }); | |
| // 자동발급이벤트 선택으로 인한 체크박스 옵션 해제 | |
| $('body').on('unchecked', '[name="couponEventType"]', function(e){ | |
| $(e.target).parents('div.radio').find(':checkbox').prop('checked', false); | |
| if($('input:radio[name="couponUsePeriodType"]:checked').val() == 'period') { | |
| $('#divCouponUsePeriodTypePeriod').show(); | |
| $('#divCouponUsePeriodTypeDay').hide(); | |
| // 발급일 기준 필드 초기화 | |
| $('input[name="couponUsePeriodDay"]').val(''); | |
| $('input[name="couponUsePeriodDayLimit"]').prop('checked', false); | |
| $('input[name="couponUseDateLimit"]').val(''); | |
| } else { | |
| $('#divCouponUsePeriodTypePeriod').hide(); | |
| $('#divCouponUsePeriodTypeDay').show(); | |
| // 설정기간 필드 초기화 | |
| $('input[name="couponUsePeriodStartDate"]').val(''); | |
| $('input[name="couponUsePeriodEndDate"]').val(''); | |
| } | |
| }); | |
| // 상품리스트, 상품상세 쿠폰발급설정 타입 변경 시 | |
| $('#couponExceptTypeGoodsTitle').html('사용 제외 특정 상품 선택'); | |
| } | |
| // 자동발급이 아닌 경우 이벤트/SMS 필드 초기화 | |
| if ($('input:radio[name="couponSaveType"]:checked').val() != 'auto') { | |
| $('[name="couponEventType"]').val(''); | |
| $('[name="couponEventFirstSmsType"][value="n"]').prop('checked', true); | |
| $('[name="couponEventOrderSmsType"][value="n"]').prop('checked', true); | |
| $('[name="couponEventBirthSmsType"][value="n"]').prop('checked', true); | |
| $('[name="couponEventMemberSmsType"][value="n"]').prop('checked', true); | |
| $('[name="couponEventAttendanceSmsType"][value="n"]').prop('checked', true); | |
| $('[name="couponEventMemberModifySmsType"][value="n"]').prop('checked', true); | |
| $('[name="couponEventWakeSmsType"][value="n"]').prop('checked', true); | |
| $('[name="couponEventOrderFirstType"]').prop('checked', false); | |
| } | |
| setCouponAmountEnabledByType(); | |
| bindCouponAmountTypeEvents(); | |
| } | |
| $('#benefitFixApply').hide(); | |
| $('input:checkbox[name="couponBenefitFixApply"]').prop("checked", false); | |
| } else { | |
| $('input:checkbox[name="couponMaxBenefitType"]').prop("disabled", true).prop("checked", false); | |
| $('input:text[name="couponMaxBenefit"]').prop("disabled", true).val(''); | |
| $('input:text[name="couponBenefit"]').removeAttr('maxlength'); | |
| $('input:text[name="couponBenefit"]').attr('maxlength', '8'); | |
| if (shouldResetValue) { | |
| minOrderPriceInput.style.display = ''; | |
| } else { | |
| minOrderPriceInput.style.display = 'none'; | |
| // 제한없음 선택 시 금액 초기화 | |
| const priceInput = minOrderPriceInput.querySelector('input[name="couponMinOrderPrice"]'); | |
| if (priceInput) priceInput.value = ''; | |
| } | |
| } | |
| }; | |
| if (amountInput) { | |
| amountInput.disabled = selected !== 'y' || isManual; | |
| // 무제한 선택 시 수량 초기화 | |
| if (selected !== 'y') { | |
| amountInput.value = ''; | |
| } | |
| } | |
| if (container) { | |
변경 전coupon_save.php
| <?php | |
| } | |
| ?> | |
| <span class="notice-info">SMS 발송은 <a href="/crm/auto_send.php" target="_blank" class="btn-link-underline">CRM > 메시지 설정 > 모바일 메시지 설정</a>에서 설정할 수 있습니다.</span> | |
| </td> | |
| </tr> | |
| <tr class="save-type-excel"> | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| console.log(arguments); | |
| BootstrapDialog.show({ | |
| title: 'SMS 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
| <?php if (isset($smsSendFlag) && $smsSendFlag === 'y') { ?> | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: 'SMS 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 후coupon_save.php
| <?php | |
| } | |
| ?> | |
| <span class="notice-info">SMS 발송은 <a href="/crm/auto_send.php" target="_blank" class="btn-link-underline">CRM > 메시지 발송 > 자동 알림 발송</a>에서 설정할 수 있습니다.</span> | |
| </td> | |
| </tr> | |
| <tr class="save-type-excel"> | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| console.log(arguments); | |
| BootstrapDialog.show({ | |
| title: '메시지 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
| <?php if (isset($smsSendFlag) && $smsSendFlag === 'y') { ?> | |
| $.get('../share/layer_sms_password.php?mode=input', function () { | |
| BootstrapDialog.show({ | |
| title: '메시지 인증번호 입력', | |
| size: BootstrapDialog.SIZE_WIDE, | |
| message: arguments[0] | |
| }); | |
변경 전ifdo_config.php
| <form id="frmIfdo" name="frmIfdo" action="ifdo_ps.php" method="post"> | |
| <input type="hidden" name="mode" value="config"/> | |
| <div class="page-header js-affix"> | |
| <h3><?php echo end($naviMenu->location); ?></h3> | |
| <div class="btn-group"> | |
| <input type="submit" value="저장" class="btn btn-red"/> | |
| </div> | |
| </div> | |
| <div class="table-title gd-help-manual"> | |
| IFDO 마케팅 자동화 사용 설정 | |
| </div> | |
| <table class="table table-cols"> | |
| <colgroup> | |
| <col class="width-lg"/> | |
| <col/> | |
| </colgroup> | |
| <tbody> | |
| <tr> | |
| <th>사용여부</th> | |
| <td class="form-inline"> | |
| <label class="radio-inline"> | |
| <input type="radio" name="ifdoUseType" value="y" <?= $checked['ifdoUseType']['y']; ?> />사용함 | |
| </label> | |
| <label class="radio-inline"> | |
| <input type="radio" name="ifdoUseType" value="n" <?= $checked['ifdoUseType']['n']; ?> />사용안함 | |
| </label> | |
| <p class="notice-info">서비스를 사용하시려면 IFDO 마케팅 자동화 신청 후 사용이 가능합니다.<a href="https://www.nhn-commerce.com/echost/power/add/marketing/ifdo-intro.gd" target="_blank" class="btn-link">신청하기</a></p> | |
| </td> | |
| </tr> | |
| <tr> | |
| <th>사이트 구분 코드</th> | |
| <td class="form-inline"> | |
| <input type="text" name="ifdoServiceCode" value="<?= $data['ifdoServiceCode'] ?>" class="form-control width-sm"/> | |
| <p class="notice-info">IFDO 회원가입 시 발급 된 회원 구분키를 입력해주세요.</p> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </form> | |
| <div class="notice-info"> | |
| IFDO 관리자 화면에서 실시간 방문자 정보 확인 및 고객 세분화, 타겟 메시지 발송 등을 하실 수 있습니다. | |
| </div> | |
| <div class="notice-info"> | |
| 사이트 구분 코드는 IFDO 관리자 > 분석 스크립트 메뉴에서 다시 확인하실 수 있습니다. | |
| </div> | |
| <div class="center"> | |
| <a href="https://ifdo.co.kr/login/login_frm.apz" target="_blank"/><button type="button" class="btn btn-lg btn-black">IFDO 관리자 바로가기</button></a> | |
| </div> | |
| <script type="text/javascript"> | |
| <!-- | |
| $(document).ready(function () { | |
| $('#frmIfdo').validate({ | |
| submitHandler: function (form) { | |
| form.target = 'ifrmProcess'; | |
| form.submit(); | |
| }, | |
| rules: { | |
| ifdoServiceCode: { | |
| required: function (input) { | |
| var required = false; | |
| if ($('[name=ifdoUseType]:checked').val() == 'y') { | |
| required = true; | |
| } | |
| return required; | |
| }, | |
| }, | |
| }, | |
| messages: { | |
| ifdoServiceCode: { | |
| required: '회원 구분키를 입력하여주세요.', | |
| }, | |
| } | |
| }); | |
| $('input:radio[name="ifdoUseType"]').click(function () { | |
| ifdoServiceCodeChk(); | |
| }); | |
| ifdoServiceCodeChk(); | |
| }); | |
| function ifdoServiceCodeChk() { | |
| if ($('input:radio[name="ifdoUseType"]:checked').val() == 'y') { | |
| $('input:text[name="ifdoServiceCode"]').prop('readonly', false); | |
| } else { | |
| $('input:text[name="ifdoServiceCode"]').prop('readonly', true); | |
| } | |
| } | |
| //--> | |
| </script> | |
변경 후ifdo_config.php
변경 전layer_sms_password.php
| <label> | |
| <input type="password" class="form-control mgb5" name="password"/> | |
| </label> | |
| <div class="notice-danger">무단으로 SMS 포인트가 사용되지 않도록 SMS 인증번호로 인증 후 변경할 수 있습니다.</div> | |
| <div class="notice-info">SMS 인증번호는 | |
| <a class="btn-link" href="<?= $commerceShopMainUrl; ?>">[마이페이지 > 쇼핑몰 관리]</a> 에서 확인할 수 있습니다. | |
| </div> | |
| </td> | |
변경 후layer_sms_password.php
| <label> | |
| <input type="password" class="form-control mgb5" name="password"/> | |
| </label> | |
| <div class="notice-danger">무단으로 메시지 포인트가 사용되지 않도록 메시지 인증번호로 인증 후 변경할 수 있습니다.</div> | |
| <div class="notice-info">메시지 인증번호는 | |
| <a class="btn-link" href="<?= $commerceShopMainUrl; ?>">[마이페이지 > 쇼핑몰 관리]</a> 에서 확인할 수 있습니다. | |
| </div> | |
| </td> | |
변경 전_head.html
| <!--{ / }--> | |
| <!-- <link rel="stylesheet" href="{=setDesignEditorBrowserCache('css/main', 'css')}"> --> | |
| <link rel="stylesheet" href="https://fe-sdk.cdn-nhncommerce.com/@design-editor/skin/1.0/main.css"> | |
| <style> | |
| @import '{=setDesignEditorBrowserCache('css/reset', 'css')}' layer(vendors); | |
| @import '{=setDesignEditorBrowserCache('css/common/common', 'css')}' layer(vendors); | |
| <!-- Add script : end --> | |
| <!--{ / }--> | |
| <script type="text/javascript"> | |
| window.__NDE_CURRENT_PAGE_NAME__ = '{=gCurrentPageName}'; | |
변경 후_head.html
| <!--{ / }--> | |
| <!-- <link rel="stylesheet" href="{=setDesignEditorBrowserCache('css/main', 'css')}"> --> | |
| <link rel="stylesheet" href="https://fe-sdk.cdn-nhncommerce.com/@design-editor/skin/<!--{ ? !isProduction }-->alpha/<!--{ / }-->1.0/styles/main.css"> | |
| <style> | |
| @import '{=setDesignEditorBrowserCache('css/reset', 'css')}' layer(vendors); | |
| @import '{=setDesignEditorBrowserCache('css/common/common', 'css')}' layer(vendors); | |
| <!-- Add script : end --> | |
| <!--{ / }--> | |
| <!-- NDE 카테고리 캐시: 로그인 상태 변경 시 초기화 --> | |
| <script> | |
| (function() { | |
| try { | |
| var isLogin = '<!--{ ? gd_is_login() }-->1<!--{ : }-->0<!--{ / }-->'; | |
| var prevLogin = sessionStorage.getItem('nde_categories_login'); | |
| if (prevLogin === null || prevLogin !== isLogin) { | |
| document.cookie = 'nde_categories_cache=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/'; | |
| } | |
| sessionStorage.setItem('nde_categories_login', isLogin); | |
| } catch(e) { | |
| document.cookie = 'nde_categories_cache=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/'; | |
| } | |
| })(); | |
| </script> | |
| <script type="text/javascript"> | |
| window.__NDE_CURRENT_PAGE_NAME__ = '{=gCurrentPageName}'; | |
변경 전_share_head.html
| <!--{ / }--> | |
| <!--link rel="stylesheet" href="{=setDesignEditorBrowserCache('css/main', 'css')}"--> | |
| <link rel="stylesheet" href="https://fe-sdk.cdn-nhncommerce.com/@design-editor/skin/1.0/main.css"> | |
| <style> | |
| @import '{=setDesignEditorBrowserCache('css/reset', 'css')}' layer(vendors); | |
| @import '{=setDesignEditorBrowserCache('css/common/common', 'css')}' layer(vendors); | |
변경 후_share_head.html
| <!--{ / }--> | |
| <!--link rel="stylesheet" href="{=setDesignEditorBrowserCache('css/main', 'css')}"--> | |
| <link rel="stylesheet" href="https://fe-sdk.cdn-nhncommerce.com/@design-editor/skin/<!--{ ? !isProduction }-->alpha/<!--{ / }-->1.0/styles/main.css"> | |
| <style> | |
| @import '{=setDesignEditorBrowserCache('css/reset', 'css')}' layer(vendors); | |
| @import '{=setDesignEditorBrowserCache('css/common/common', 'css')}' layer(vendors); | |
변경 전_category_side.html
| <!--{ / }--> | |
| ]; | |
| </script> | |
| <script async src="https://fe-sdk.cdn-nhncommerce.com/@design-editor/skin/1.0/header.js"></script> | |
변경 후_category_side.html
| <!--{ / }--> | |
| ]; | |
| </script> | |
| <script async src="https://fe-sdk.cdn-nhncommerce.com/@design-editor/skin/<!--{ ? !isProduction }-->alpha/<!--{ / }-->1.0/scripts/header.js"></script> | |
변경 전AdminMenu.php
| <?php | |
| /** | |
| * This is commercial software, only users who have purchased a valid license | |
| * and accept to the terms of the License Agreement can install and use this | |
| // 페이지가 메뉴에 등록되어 있음 | |
| // 페이코 서치 사용안함, 페이지 직접 접근 - 해당 메뉴 열람 권한 삭제 | |
| $hideMenuPaycoSearch = array('godo00578','godo00577', 'godo00751'); | |
| if(gd_in_array($this->lno[2], $hideMenuPaycoSearch) && $this->paycosearchUseFl == 'N') { | |
| if(Request::request()->get('popupMode') === 'yes') { | |
| throw new AlertCloseException(__('권한이 없는 메뉴입니다.')); | |
| } else { | |
| throw new AlertBackException(__('권한이 없는 메뉴입니다.')); | |
| } | |
| } | |
| } else { | |
| if ($isThirdMenuPlusShop) { | |
| if (\Request::get()->get('inflow') == 'godo') { | |
| throw new AlertBackException(__('[플러스샵] 미설치 또는 미사용 상태입니다. 설치 완료 및 사용 설정 후 플러스샵 앱을 사용할 수 있습니다.')); | |
| } | |
| } else { | |
| if(Request::request()->get('popupMode') === 'yes') { | |
| throw new AlertCloseException(__('권한이 없는 메뉴입니다.')); | |
| } else { | |
| throw new AlertBackException(__('권한이 없는 메뉴입니다.')); | |
| $goodsBenefit = \App::load('\\Component\\Goods\\GoodsBenefit'); | |
| $goodsBenefitUse = $goodsBenefit->getConfig(); | |
| $hideMenu = array('godo00723','godo00724'); | |
| //상품혜택을 사용하지 않으면 해당 메뉴 숨김처리 | |
| if($goodsBenefitUse == 'n'){ | |
| foreach($hideMenu as $menuNo) { | |
| $this->arrWhere[] = 'f.adminMenuNo != \'' . $menuNo . '\''; | |
| $this->arrWhere[] = 't.adminMenuNo != \'' . $menuNo . '\''; | |
| } | |
| } | |
| //페이코 서치 사용하지 않으면 해당 메뉴 숨김처리 && 솔루션신규설치업체 해당메뉴 숨김처리 | |
| $hideMenuPaycoSearch = array('godo00578','godo00577', 'godo00751'); | |
| if($this->paycosearchUseFl == 'N'){ | |
| foreach($hideMenuPaycoSearch as $menuNo) { | |
| $this->arrWhere[] = 'f.adminMenuNo != \'' . $menuNo . '\''; | |
| $this->arrWhere[] = 't.adminMenuNo != \'' . $menuNo . '\''; | |
| } | |
| $externalOrder = \App::load('\\Component\\Order\\ExternalOrder'); | |
| $externalOrderAdminMenuUseFl = $externalOrder->getUseAdminMenu(); | |
| if($externalOrderAdminMenuUseFl === false){ | |
| //외부채널 주문등록 메뉴를 사용하고 있지 않다면 접근권한에서 노출시키지 않는다. | |
| $this->arrWhere[] = 's.adminMenuNo != ?'; | |
| $this->arrWhere[] = 't.adminMenuNo != ?'; | |
| } | |
| // 방문자분석 호출방식 변경으로 신규상점에 메뉴 숨김처리 | |
| if($this->sDate > '20220823'){ | |
| $this->arrWhere[] = 's.adminMenuCode != ?'; | |
| $this->db->bind_param_push($this->arrBind, 's', 'visit'); | |
| } | |
| if ($plusShopType === null) { | |
| if ($val['fSetting'] == 'p') { | |
| if (GodoUtils::isPlusShop($val['fPlusCode']) === false) { | |
| if($showAllMenu === false) { | |
| unset($getData[$key]); | |
| } | |
| $getData[$key]['isPlusShop'] = 'n'; | |
| } | |
| if ($val['sSetting'] == 'p') { | |
| if (GodoUtils::isPlusShop($val['sPlusCode']) === false) { | |
| if($showAllMenu === false) { | |
| unset($getData[$key]); | |
| } | |
| $getData[$key]['isPlusShop'] = 'n'; | |
| } | |
| if (gd_array_key_exists('tSetting', $val) && $val['tSetting'] === 'p') { | |
| if (GodoUtils::isPlusShop($val['tPlusCode']) === false) { | |
| if($showAllMenu === false) { | |
| unset($getData[$key]); | |
| } | |
| $getData[$key]['isPlusShop'] = 'n'; | |
| } | |
| } | |
| if($val['depth'] == 3 ) { | |
| if($getData[$key]['fDisplay'] == 'y') { | |
| $checkDisplay[]= $val['sNo'] ; | |
| } | |
| } | |
| // 카카오 클라우드 알림톡 체크 | |
| if(in_array($val['tCode'], ['kakaoAlrimSetting', 'kakaoAlrimTemplate', 'kakaoAlrimLog'])) { | |
| $kakaoCloudSetting = gd_policy('kakaoAlrimCloud.config'); | |
| $cloudUsed = gd_isset($kakaoCloudSetting['useFlag'], 'n'); | |
| // 클라우드 사용중이면 메뉴 클릭 시 클라우드로 이동 되게 변경 | |
| if ($cloudUsed === 'y') { | |
| switch ($val['tCode']) { | |
| case 'kakaoAlrimSetting' : | |
| $redirectUrl = 'kakao_alrim_cloud_setting.php'; | |
| break; | |
| case 'kakaoAlrimTemplate' : | |
| $redirectUrl = 'kakao_alrim_cloud_template.php'; | |
| break; | |
| case 'kakaoAlrimLog' : | |
| $redirectUrl = 'kakao_alrim_cloud_log.php'; | |
| break; | |
| } | |
| //2차메뉴중 하위메뉴가 전부 히든처리가 돼있으면 히든처리 | |
| $checkDisplay = gd_array_unique($checkDisplay); | |
| if($checkDisplay) { | |
| foreach ($getData as &$val) { | |
| if ($val['depth'] == 2 && (gd_in_array($val['sNo'], $checkDisplay) === false)) { | |
| $val['fDisplay'] = $val['sDisplay'] = 'n'; | |
| // empty : 권한없음 | |
| // readonly : 읽기 | |
| // writable : 읽기+쓰기 | |
| $selected = ['permission_1' => [], 'permission_2' => [], 'permission_3' => [], ]; | |
| // 쓰기 권한 메뉴 | |
| if (\is_array($dataWriteEnabledMenu) && gd_count($dataWriteEnabledMenu) > 0) { | |
| if (gd_count($selected['permission_3'][$val_2]) < gd_count($menuTreeList['top'][$key_1]['mid'][$val_2]['last'])) { // 메뉴 개수 대비 읽기&쓰기 개수가 적은 경우 | |
| $type = 'individual'; | |
| } | |
| else { // 메뉴 개수와 읽기&쓰기 개수가 같은 경우 | |
| $tmp = gd_array_values($selected['permission_3'][$val_2]); | |
| $writableCnt = gd_count(gd_array_column($tmp, 'writable')); | |
| $readonlyCnt = gd_count(gd_array_column($tmp, 'readonly')); | |
| if (gd_count($selected['permission_2'][$val_1]) < gd_count($menuTreeList['top'][$val_1]['mid'])) { // 메뉴 개수 대비 읽기&쓰기 개수가 적은 경우 | |
| $type = 'individual'; | |
| } | |
| else { // 메뉴 개수와 읽기&쓰기 개수가 같은 경우 | |
| $tmp = gd_array_values($selected['permission_2'][$val_1]); | |
| $individualCnt = gd_count(gd_array_column($tmp, 'individual')); | |
| $writableCnt = gd_count(gd_array_column($tmp, 'writable')); | |
| // 뱅크다 미사용 경우 필터 | |
| $bankdaConfig = gd_policy('order.bankda'); | |
| if($bankdaConfig['useFl'] != 'y') { | |
| unset($functionAuth['godo00099']['bankdaManual']); | |
| } | |
| // 공급사 미사용 경우 필터 | |
| if(gd_use_provider() !== true) { | |
| unset($functionAuth['godo00271']); | |
| } | |
| unset($functionAuth['godo00445']['orderSalesStatisticsProcess']); | |
| } | |
| return $functionAuth; | |
| } | |
| /** | |
| foreach ($dataTreeArrList as $key => $val) { | |
| if (is_array($val)) { | |
| array_push( | |
| $result, [ | |
| 'text' => $key, | |
| 'number' => $val['number'], | |
| 'children' => self::convertTreeForJson($val), | |
| } else { | |
| if ($key != 'number') { | |
| array_push( | |
| $result, [ | |
| 'text' => $key, | |
| 'number' => $val['number'], | |
| ] | |
| } | |
| // 관리자 메인 통계 권한 확인 - 매출 탭 | |
| if(gd_count($this->accessMenu[$accessCode['sales']]) > 0) { | |
| $returnMainAccessMenu['sales'] = true; | |
| } | |
| // 관리자 메인 통계 권한 확인 - 주문 탭 | |
| if(gd_count($this->accessMenu[$accessCode['order']]) > 0) { | |
| $returnMainAccessMenu['order'] = true; | |
| } | |
| // 관리자 메인 통계 권한 확인 - 방문자 탭 | |
| if(gd_count($this->accessMenu[$accessCode['visit']]) > 0) { | |
| $returnMainAccessMenu['visit'] = true; | |
| } | |
| // 관리자 메인 통계 권한 확인 - 회원 탭 | |
| if(gd_count($this->accessMenu[$accessCode['member']]) > 0) { | |
| $returnMainAccessMenu['member'] = true; | |
| } | |
변경 후AdminMenu.php
| <?php | |
| /** | |
| * This is commercial software, only users who have purchased a valid license | |
| * and accept to the terms of the License Agreement can install and use this | |
| // 페이지가 메뉴에 등록되어 있음 | |
| // 페이코 서치 사용안함, 페이지 직접 접근 - 해당 메뉴 열람 권한 삭제 | |
| $hideMenuPaycoSearch = array('godo00578', 'godo00577', 'godo00751'); | |
| if (gd_in_array($this->lno[2], $hideMenuPaycoSearch) && $this->paycosearchUseFl == 'N') { | |
| if (Request::request()->get('popupMode') === 'yes') { | |
| throw new AlertCloseException(__('권한이 없는 메뉴입니다.')); | |
| } else { | |
| throw new AlertBackException(__('권한이 없는 메뉴입니다.')); | |
| } | |
| } | |
| } else { | |
| if ($isThirdMenuPlusShop) { | |
| if (\Request::get()->get('inflow') == 'godo') { | |
| throw new AlertBackException(__('[플러스샵] 미설치 또는 미사용 상태입니다. 설치 완료 및 사용 설정 후 플러스샵 앱을 사용할 수 있습니다.')); | |
| } | |
| } else { | |
| if (Request::request()->get('popupMode') === 'yes') { | |
| throw new AlertCloseException(__('권한이 없는 메뉴입니다.')); | |
| } else { | |
| throw new AlertBackException(__('권한이 없는 메뉴입니다.')); | |
| $goodsBenefit = \App::load('\\Component\\Goods\\GoodsBenefit'); | |
| $goodsBenefitUse = $goodsBenefit->getConfig(); | |
| $hideMenu = array('godo00723', 'godo00724'); | |
| //상품혜택을 사용하지 않으면 해당 메뉴 숨김처리 | |
| if ($goodsBenefitUse == 'n') { | |
| foreach ($hideMenu as $menuNo) { | |
| $this->arrWhere[] = 'f.adminMenuNo != \'' . $menuNo . '\''; | |
| $this->arrWhere[] = 't.adminMenuNo != \'' . $menuNo . '\''; | |
| } | |
| } | |
| //페이코 서치 사용하지 않으면 해당 메뉴 숨김처리 && 솔루션신규설치업체 해당메뉴 숨김처리 | |
| $hideMenuPaycoSearch = array('godo00578', 'godo00577', 'godo00751'); | |
| if ($this->paycosearchUseFl == 'N') { | |
| foreach ($hideMenuPaycoSearch as $menuNo) { | |
| $this->arrWhere[] = 'f.adminMenuNo != \'' . $menuNo . '\''; | |
| $this->arrWhere[] = 't.adminMenuNo != \'' . $menuNo . '\''; | |
| } | |
| $externalOrder = \App::load('\\Component\\Order\\ExternalOrder'); | |
| $externalOrderAdminMenuUseFl = $externalOrder->getUseAdminMenu(); | |
| if ($externalOrderAdminMenuUseFl === false) { | |
| //외부채널 주문등록 메뉴를 사용하고 있지 않다면 접근권한에서 노출시키지 않는다. | |
| $this->arrWhere[] = 's.adminMenuNo != ?'; | |
| $this->arrWhere[] = 't.adminMenuNo != ?'; | |
| } | |
| // 방문자분석 호출방식 변경으로 신규상점에 메뉴 숨김처리 | |
| if ($this->sDate > '20220823') { | |
| $this->arrWhere[] = 's.adminMenuCode != ?'; | |
| $this->db->bind_param_push($this->arrBind, 's', 'visit'); | |
| } | |
| if ($plusShopType === null) { | |
| if ($val['fSetting'] == 'p') { | |
| if (GodoUtils::isPlusShop($val['fPlusCode']) === false) { | |
| if ($showAllMenu === false) { | |
| unset($getData[$key]); | |
| } | |
| $getData[$key]['isPlusShop'] = 'n'; | |
| } | |
| if ($val['sSetting'] == 'p') { | |
| if (GodoUtils::isPlusShop($val['sPlusCode']) === false) { | |
| if ($showAllMenu === false) { | |
| unset($getData[$key]); | |
| } | |
| $getData[$key]['isPlusShop'] = 'n'; | |
| } | |
| if (gd_array_key_exists('tSetting', $val) && $val['tSetting'] === 'p') { | |
| if (GodoUtils::isPlusShop($val['tPlusCode']) === false) { | |
| if ($showAllMenu === false) { | |
| unset($getData[$key]); | |
| } | |
| $getData[$key]['isPlusShop'] = 'n'; | |
| } | |
| } | |
| if ($val['depth'] == 3) { | |
| if ($getData[$key]['fDisplay'] == 'y') { | |
| $checkDisplay[] = $val['sNo']; | |
| } | |
| } | |
| // 카카오 클라우드 알림톡 체크 | |
| if (in_array($val['tCode'], ['kakaoAlrimSetting', 'kakaoAlrimTemplate', 'kakaoAlrimLog'])) { | |
| $kakaoCloudSetting = gd_policy('kakaoAlrimCloud.config'); | |
| $cloudUsed = gd_isset($kakaoCloudSetting['useFlag'], 'n'); | |
| // 클라우드 사용중이면 메뉴 클릭 시 클라우드로 이동 되게 변경 | |
| if ($cloudUsed === 'y') { | |
| switch ($val['tCode']) { | |
| case 'kakaoAlrimSetting': | |
| $redirectUrl = 'kakao_alrim_cloud_setting.php'; | |
| break; | |
| case 'kakaoAlrimTemplate': | |
| $redirectUrl = 'kakao_alrim_cloud_template.php'; | |
| break; | |
| case 'kakaoAlrimLog': | |
| $redirectUrl = 'kakao_alrim_cloud_log.php'; | |
| break; | |
| } | |
| //2차메뉴중 하위메뉴가 전부 히든처리가 돼있으면 히든처리 | |
| $checkDisplay = gd_array_unique($checkDisplay); | |
| if ($checkDisplay) { | |
| foreach ($getData as &$val) { | |
| if ($val['depth'] == 2 && (gd_in_array($val['sNo'], $checkDisplay) === false)) { | |
| $val['fDisplay'] = $val['sDisplay'] = 'n'; | |
| // empty : 권한없음 | |
| // readonly : 읽기 | |
| // writable : 읽기+쓰기 | |
| $selected = ['permission_1' => [], 'permission_2' => [], 'permission_3' => [],]; | |
| // 쓰기 권한 메뉴 | |
| if (\is_array($dataWriteEnabledMenu) && gd_count($dataWriteEnabledMenu) > 0) { | |
| if (gd_count($selected['permission_3'][$val_2]) < gd_count($menuTreeList['top'][$key_1]['mid'][$val_2]['last'])) { // 메뉴 개수 대비 읽기&쓰기 개수가 적은 경우 | |
| $type = 'individual'; | |
| } else { // 메뉴 개수와 읽기&쓰기 개수가 같은 경우 | |
| $tmp = gd_array_values($selected['permission_3'][$val_2]); | |
| $writableCnt = gd_count(gd_array_column($tmp, 'writable')); | |
| $readonlyCnt = gd_count(gd_array_column($tmp, 'readonly')); | |
| if (gd_count($selected['permission_2'][$val_1]) < gd_count($menuTreeList['top'][$val_1]['mid'])) { // 메뉴 개수 대비 읽기&쓰기 개수가 적은 경우 | |
| $type = 'individual'; | |
| } else { // 메뉴 개수와 읽기&쓰기 개수가 같은 경우 | |
| $tmp = gd_array_values($selected['permission_2'][$val_1]); | |
| $individualCnt = gd_count(gd_array_column($tmp, 'individual')); | |
| $writableCnt = gd_count(gd_array_column($tmp, 'writable')); | |
| // 뱅크다 미사용 경우 필터 | |
| $bankdaConfig = gd_policy('order.bankda'); | |
| if ($bankdaConfig['useFl'] != 'y') { | |
| unset($functionAuth['godo00099']['bankdaManual']); | |
| } | |
| // 공급사 미사용 경우 필터 | |
| if (gd_use_provider() !== true) { | |
| unset($functionAuth['godo00271']); | |
| } | |
| unset($functionAuth['godo00445']['orderSalesStatisticsProcess']); | |
| } | |
| return $functionAuth; | |
| } | |
| /** | |
| foreach ($dataTreeArrList as $key => $val) { | |
| if (is_array($val)) { | |
| array_push( | |
| $result, | |
| [ | |
| 'text' => $key, | |
| 'number' => $val['number'], | |
| 'children' => self::convertTreeForJson($val), | |
| } else { | |
| if ($key != 'number') { | |
| array_push( | |
| $result, | |
| [ | |
| 'text' => $key, | |
| 'number' => $val['number'], | |
| ] | |
| } | |
| // 관리자 메인 통계 권한 확인 - 매출 탭 | |
| if (gd_count($this->accessMenu[$accessCode['sales']]) > 0) { | |
| $returnMainAccessMenu['sales'] = true; | |
| } | |
| // 관리자 메인 통계 권한 확인 - 주문 탭 | |
| if (gd_count($this->accessMenu[$accessCode['order']]) > 0) { | |
| $returnMainAccessMenu['order'] = true; | |
| } | |
| // 관리자 메인 통계 권한 확인 - 방문자 탭 | |
| if (gd_count($this->accessMenu[$accessCode['visit']]) > 0) { | |
| $returnMainAccessMenu['visit'] = true; | |
| } | |
| // 관리자 메인 통계 권한 확인 - 회원 탭 | |
| if (gd_count($this->accessMenu[$accessCode['member']]) > 0) { | |
| $returnMainAccessMenu['member'] = true; | |
| } | |
변경 전Cart.php
| use Globals; | |
| use Request; | |
| use Session; | |
| /** | |
| * 장바구니 class | |
| */ | |
| public $taxGoodsChk = true; | |
| /** | |
| * @var array 결제제한 수단 | |
| */ | |
| $this->tax = gd_policy('goods.tax'); | |
| } | |
| // 비과세 설정에 따른 세금계산서 출력 여부 | |
| if ($this->tax['taxFreeFl'] == 'f') { | |
| $this->taxInvoice = false; | |
| } | |
| // 상품 출력여부 설정 | |
| if (Request::isMobile()) { | |
| $this->goodsDisplayFl = 'goodsDisplayMobileFl'; | |
| // 총 부가세율 | |
| $this->totalVatRate = gd_tax_rate($this->totalGoodsPrice, $this->totalPriceSupply); | |
| // 비과세 설정에 따른 세금계산서 출력 여부 | |
| if ($this->taxInvoice === true && $this->taxGoodsChk === false) { | |
| $this->taxInvoice = false; | |
| } | |
| // 과세/비과세 상품 존재 여부 체크 초기화 | |
| $this->taxGoodsChk = true; | |
| // 장바구니 갯수 | |
| $cartCnt = 0; | |
| $taxPercent = $taxFreeFl == 'f' ? 0 : $dataVal['taxPercent']; | |
| $memberDcFl = true; | |
| // 상품할인(개별,혜택) DB 저장 데이터 가공 | |
| if($dataVal['goodsDiscountFl'] == 'y' || $dataVal['goodsBenefitSetFl'] == 'y') { | |
| $getData[$dataKey]['goodsDiscountInfo'] = $goodsBenefit->setBenefitOrderGoodsData($dataVal, 'discount'); | |
| $this->taxGoodsChk = false; | |
| } | |
| // 추가 상품 순수 개별 부가세 계산 (할인 적용 안됨) | |
| $getData[$dataKey]['addGoods'][$key]['addGoodsVat'] = NumberUtils::taxAll($tmp['goodsPrice'] * $dataVal['addGoodsCnt'][$key], $tmp['taxPercent'], $tmp['taxFreeFl']); | |
| $gVal['price']['goodsDeliveryCollectPrice'] = $goodsDeliveryCollectPrice; | |
| $gVal['price']['goodsDeliveryWholeFreePrice'] = $goodsDeliveryWholeFreePrice; | |
| // 반환데이터 설정 | |
| $getCart[$scmNo][$deliverySno][$gKey] = $gVal; | |
| $this->totalDeliveryCharge += $deliveryCond['goodsDeliveryAreaPrice']; | |
| } | |
| return $deliveryCond; | |
| } | |
| $gVal['price']['goodsDeliveryCollectPrice'] = $goodsDeliveryCollectPrice; | |
| $gVal['price']['goodsDeliveryWholeFreePrice'] = $goodsDeliveryWholeFreePrice; | |
| // 반환데이터 설정 | |
| $getCart[$scmNo][$deliverySno][$gKey] = $gVal; | |
| $this->taxGoodsChk = false; | |
| } | |
| // 추가 상품 순수 개별 부가세 계산 (할인 적용 안됨) | |
| $getData[$dataKey]['addGoods'][$key]['addGoodsVat'] = NumberUtils::taxAll($tmp['goodsPrice'] * $dataVal['addGoodsCnt'][$key], $tmp['taxPercent'], $tmp['taxFreeFl']); | |
| } | |
| return $orderData; | |
| } | |
| } | |
변경 후Cart.php
| use Globals; | |
| use Request; | |
| use Session; | |
| use Origin\Enum\Tax\TaxRate; | |
| use Origin\Enum\Tax\TaxType; | |
| /** | |
| * 장바구니 class | |
| */ | |
| public $taxGoodsChk = true; | |
| /** | |
| * @var boolean 장바구니 내 과세 상품 존재 여부 | |
| */ | |
| public bool $hasTaxableGoods = false; | |
| /** | |
| * @var boolean 배송비 과세 부과 여부 | |
| */ | |
| public bool $hasDeliveryTaxable = false; | |
| /** | |
| * @var boolean 배송비 과세율 세금계산서 발급 가능 여부 | |
| */ | |
| public bool $taxDeliveryChk = true; | |
| /** | |
| * @var array 결제제한 수단 | |
| */ | |
| $this->tax = gd_policy('goods.tax'); | |
| } | |
| // 상품 출력여부 설정 | |
| if (Request::isMobile()) { | |
| $this->goodsDisplayFl = 'goodsDisplayMobileFl'; | |
| // 총 부가세율 | |
| $this->totalVatRate = gd_tax_rate($this->totalGoodsPrice, $this->totalPriceSupply); | |
| // 과세 배송비가 실제 발생한 경우 세금계산서 발행 가능 | |
| if ($this->hasDeliveryTaxable) { | |
| $this->hasTaxableGoods = true; | |
| } | |
| // 장바구니 내 과세 가능 상품(상품/추가상품/배송비) 존재 여부에 따른 세금계산서 출력 여부 | |
| if ($this->taxInvoice === true && (!$this->hasTaxableGoods || $this->taxGoodsChk === false)) { | |
| $this->taxInvoice = false; | |
| } | |
| // 배송비 과세율이 10% 또는 0%가 아니고 실제 배송비가 발생한 경우 세금계산서 발급 불가 | |
| if ($this->taxInvoice === true && $this->taxDeliveryChk === false && $this->totalDeliveryCharge > 0) { | |
| $this->taxInvoice = false; | |
| } | |
| // 과세/비과세 상품 존재 여부 체크 초기화 | |
| $this->taxGoodsChk = true; | |
| $this->taxDeliveryChk = true; | |
| $this->hasTaxableGoods = false; | |
| $this->hasDeliveryTaxable = false; | |
| // 장바구니 갯수 | |
| $cartCnt = 0; | |
| $taxPercent = $taxFreeFl == 'f' ? 0 : $dataVal['taxPercent']; | |
| $memberDcFl = true; | |
| // 과세 상품 존재 여부 체크 | |
| if ($taxFreeFl === TaxType::TAXABLE->value) { | |
| $this->hasTaxableGoods = true; | |
| } | |
| // 상품할인(개별,혜택) DB 저장 데이터 가공 | |
| if($dataVal['goodsDiscountFl'] == 'y' || $dataVal['goodsBenefitSetFl'] == 'y') { | |
| $getData[$dataKey]['goodsDiscountInfo'] = $goodsBenefit->setBenefitOrderGoodsData($dataVal, 'discount'); | |
| $this->taxGoodsChk = false; | |
| } | |
| // 추가상품 과세 상품 존재 여부 체크 | |
| if ($tmp['taxFreeFl'] === TaxType::TAXABLE->value) { | |
| $this->hasTaxableGoods = true; | |
| } | |
| // 추가 상품 순수 개별 부가세 계산 (할인 적용 안됨) | |
| $getData[$dataKey]['addGoods'][$key]['addGoodsVat'] = NumberUtils::taxAll($tmp['goodsPrice'] * $dataVal['addGoodsCnt'][$key], $tmp['taxPercent'], $tmp['taxFreeFl']); | |
| $gVal['price']['goodsDeliveryCollectPrice'] = $goodsDeliveryCollectPrice; | |
| $gVal['price']['goodsDeliveryWholeFreePrice'] = $goodsDeliveryWholeFreePrice; | |
| // 과세 배송정책에서 기본 배송비가 발생한 경우 기록, 지역별 배송비 제외 | |
| if ($goodsDeliveryTaxFreeFl === TaxType::TAXABLE->value) { | |
| if ($goodsDeliveryPrice > 0) { | |
| $this->hasDeliveryTaxable = true; | |
| } | |
| // 배송비 과세율에 따른 세금계산서 출력여부 선택 | |
| if ((int)$goodsDeliveryTaxPercent != TaxRate::STANDARD->value && (int)$goodsDeliveryTaxPercent != TaxRate::TAX_FREE->value) { | |
| $this->taxDeliveryChk = false; | |
| } | |
| } | |
| // 반환데이터 설정 | |
| $getCart[$scmNo][$deliverySno][$gKey] = $gVal; | |
| $this->totalDeliveryCharge += $deliveryCond['goodsDeliveryAreaPrice']; | |
| } | |
| // 배송비조건별(goodsDeliveryFl === 'y') 경로의 기본 배송비 발생 여부 기록, 지역별 배송비 제외 | |
| if ($deliveryInfo['taxFreeFl'] === TaxType::TAXABLE->value) { | |
| $basicDeliveryPrice = gd_isset($deliveryCond['goodsDeliveryPrice'], 0); | |
| if ($basicDeliveryPrice > 0 && $deliveryCond['goodsDeliveryCollectFl'] != 'later') { | |
| $this->hasDeliveryTaxable = true; | |
| } | |
| // 배송비 과세율에 따른 세금계산서 출력여부 선택 | |
| if ((int)$deliveryInfo['taxPercent'] != TaxRate::STANDARD->value && (int)$deliveryInfo['taxPercent'] != TaxRate::TAX_FREE->value) { | |
| $this->taxDeliveryChk = false; | |
| } | |
| } | |
| return $deliveryCond; | |
| } | |
| $gVal['price']['goodsDeliveryCollectPrice'] = $goodsDeliveryCollectPrice; | |
| $gVal['price']['goodsDeliveryWholeFreePrice'] = $goodsDeliveryWholeFreePrice; | |
| // 과세 배송정책에서 기본 배송비가 발생한 경우 기록, 지역별 배송비 제외 | |
| if ($goodsDeliveryTaxFreeFl === TaxType::TAXABLE->value) { | |
| if ($goodsDeliveryPrice > 0) { | |
| $this->hasDeliveryTaxable = true; | |
| } | |
| // 배송비 과세율에 따른 세금계산서 출력여부 선택 | |
| if ((int)$goodsDeliveryTaxPercent != TaxRate::STANDARD->value && (int)$goodsDeliveryTaxPercent != TaxRate::TAX_FREE->value) { | |
| $this->taxDeliveryChk = false; | |
| } | |
| } | |
| // 반환데이터 설정 | |
| $getCart[$scmNo][$deliverySno][$gKey] = $gVal; | |
| $this->taxGoodsChk = false; | |
| } | |
| // 추가상품 과세 상품 존재 여부 체크 | |
| if ($tmp['taxFreeFl'] === TaxType::TAXABLE->value) { | |
| $this->hasTaxableGoods = true; | |
| } | |
| // 추가 상품 순수 개별 부가세 계산 (할인 적용 안됨) | |
| $getData[$dataKey]['addGoods'][$key]['addGoodsVat'] = NumberUtils::taxAll($tmp['goodsPrice'] * $dataVal['addGoodsCnt'][$key], $tmp['taxPercent'], $tmp['taxFreeFl']); | |
| } | |
| return $orderData; | |
| } | |
| /** | |
| * 여러 상품을 한번에 장바구니에 담기 | |
| * | |
| * @param array $cartDataList 상품 정보 배열 | |
| * @return array 장바구니 sno 배열 | |
| * @throws \Throwable | |
| */ | |
| public function saveMultipleInfoCart(array $cartDataList): array | |
| { | |
| $cartSnoList = []; | |
| try { | |
| $this->db->begin_tran(); | |
| foreach ($cartDataList as $cartData) { | |
| $cartSnoList[] = $this->saveInfoCart($cartData); | |
| } | |
| $this->db->commit(); | |
| } catch (\Throwable $e) { | |
| $this->db->rollback(); | |
| throw $e; | |
| } | |
| return $cartSnoList; | |
| } | |
| } | |
변경 전ValidationException.php
변경 후ValidationException.php
| <?php | |
| /* | |
| * Copyright (C) 2025 NHN COMMERCE. - All Rights Reserved | |
| * | |
| * Unauthorized copying or redistribution of this file in source and binary forms via any medium | |
| * is strictly prohibited. | |
| */ | |
| namespace Bundle\Component\Cart\Exception; | |
| use Exception; | |
| class ValidationException extends Exception | |
| { | |
| } | |
변경 전ReorderCart.php
변경 후ReorderCart.php
| <?php | |
| /* | |
| * Copyright (C) 2025 NHN COMMERCE. - All Rights Reserved | |
| * | |
| * Unauthorized copying or redistribution of this file in source and binary forms via any medium is strictly prohibited. | |
| */ | |
| namespace Bundle\Component\Cart; | |
| use DTO\Cart\CartRequestDTO; | |
| use Repository\Goods\GoodsOptionRepository; | |
| use Repository\Goods\GoodsOptionTextRepository; | |
| use Repository\Goods\GoodsRepository; | |
| use Repository\Cart\CartRepository; | |
| use Repository\Member\MemberOrderGoodsCountRepository; | |
| class ReorderCart | |
| { | |
| public const MAX_REORDER_GOODS_COUNT = 50; | |
| public function __construct( | |
| protected GoodsRepository $goodsRepository, | |
| protected GoodsOptionRepository $goodsOptionRepository, | |
| protected GoodsOptionTextRepository $goodsOptionTextRepository, | |
| protected CartRepository $cartRepository, | |
| protected MemberOrderGoodsCountRepository $memberOrderGoodsCountRepository, | |
| ) | |
| { | |
| } | |
| /** | |
| * 재주문 대상 주문상품 목록을 장바구니 데이터로 변환 | |
| * | |
| * @param array $orderGoodsList 재주문 대상 주문상품 목록 | |
| * @param string $cartMode 장바구니 모드 ('' = 장바구니, 'd' = 바로구매) | |
| * @return array | |
| */ | |
| public function convertToCartData(array $orderGoodsList, string $cartMode): array | |
| { | |
| $cartData = []; | |
| foreach ($orderGoodsList as $orderGoods) { | |
| $cartKey = $this->generateCartKey($orderGoods); | |
| // 동일 상품(상품번호, 옵션번호, 텍스트옵션 동일) 제외 처리 | |
| if (isset($cartData[$cartKey])) { | |
| continue; | |
| } | |
| $cartDTO = $this->convertOrderGoodsToCartData($orderGoods, $cartMode); | |
| $cartData[$cartKey] = $cartDTO->toArray(); | |
| } | |
| return $cartData; | |
| } | |
| /** | |
| * 장바구니 데이터 키 생성 | |
| * 상품번호, 옵션번호, 텍스트옵션이 모두 같아야 동일 상품으로 처리 | |
| * | |
| * @param array $orderGoods 주문상품 정보 | |
| * @return string | |
| */ | |
| protected function generateCartKey(array $orderGoods): string | |
| { | |
| $key = $orderGoods['goodsNo'] . '_' . $orderGoods['optionSno']; | |
| // 텍스트 옵션이 있으면 키에 포함 | |
| if (!empty($orderGoods['optionTextInfo'])) { | |
| $optionText = $this->extractOptionTextValues($orderGoods['optionTextInfo']); | |
| if (!empty($optionText)) { | |
| $key .= '_' . hash('xxh64', serialize($optionText)); | |
| } | |
| } | |
| return $key; | |
| } | |
| /** | |
| * optionTextInfo에서 텍스트 옵션 정보를 추출 | |
| * | |
| * @param mixed $optionTextInfo | |
| * @return array | |
| */ | |
| protected function extractOptionTextValues($optionTextInfo): array | |
| { | |
| // JSON 문자열인 경우 디코딩 | |
| if (is_string($optionTextInfo)) { | |
| $optionTextInfo = json_decode($optionTextInfo, true); | |
| } | |
| if (!is_array($optionTextInfo)) { | |
| return []; | |
| } | |
| $optionText = []; | |
| foreach ($optionTextInfo as $optionSno => $optionInfo) { | |
| if (isset($optionInfo['optionValue'])) { | |
| $optionText[$optionSno] = $optionInfo['optionValue']; | |
| } | |
| } | |
| return $optionText; | |
| } | |
| /** | |
| * 개별 주문상품을 장바구니 데이터로 변환 | |
| * | |
| * @param array $orderGoods 주문상품 정보 | |
| * @param string $cartMode 장바구니 모드 | |
| * @return CartRequestDTO | |
| */ | |
| protected function convertOrderGoodsToCartData(array $orderGoods, string $cartMode = ''): CartRequestDTO | |
| { | |
| // 텍스트 옵션 정보 변환 | |
| $optionText = null; | |
| if (!empty($orderGoods['optionTextInfo'])) { | |
| $optionText = $this->convertOptionTextInfoToCartData($orderGoods['optionTextInfo']); | |
| } | |
| return new CartRequestDTO( | |
| scmNo: $orderGoods['scmNo'], | |
| goodsNo: [$orderGoods['goodsNo']], | |
| optionSno: [$orderGoods['optionSno']], | |
| goodsCnt: [$orderGoods['goodsCnt']], | |
| setTotalPrice: $orderGoods['goodsPrice'], | |
| deliveryCollectFl: $orderGoods['deliveryCollectFl'], | |
| deliveryMethodFl: $orderGoods['deliveryMethodFl'], | |
| cartMode: $cartMode, | |
| optionText: $optionText, | |
| ); | |
| } | |
| /** | |
| * 텍스트 옵션 정보를 장바구니 데이터로 변환 | |
| * | |
| * @param array|string $optionTextInfo 텍스트 옵션 정보 (배열 또는 JSON 문자열) | |
| * @return array | |
| */ | |
| protected function convertOptionTextInfoToCartData($optionTextInfo): array | |
| { | |
| $optionText = $this->extractOptionTextValues($optionTextInfo); | |
| return [$optionText]; | |
| } | |
| /** | |
| * 장바구니 데이터의 가격을 현재 가격으로 재계산 | |
| * | |
| * @param array $cartDataList 장바구니 데이터 목록 | |
| * @return array | |
| */ | |
| public function recalculateCartPrices(array $cartDataList): array | |
| { | |
| $keyList = $this->extractGoodsKeyList($cartDataList); | |
| $priceData = $this->getGoodsPriceData($keyList); | |
| foreach ($cartDataList as $cartKey => $cartData) { | |
| $cartDataList[$cartKey]['set_total_price'] = $this->calculateCartTotalPrice($cartData, $priceData); | |
| } | |
| return $cartDataList; | |
| } | |
| /** | |
| * 가격 데이터 조회 (상품, 옵션, 텍스트 옵션) | |
| * | |
| * @param array $keyList 추출된 번호 리스트 | |
| * @return array | |
| */ | |
| protected function getGoodsPriceData(array $keyList): array | |
| { | |
| // 상품 가격 배치 조회 | |
| if (!empty($keyList['goodsNoList'])) { | |
| $goodsPriceData = $this->goodsRepository->findGoodsPricesByGoodsNoList($keyList['goodsNoList']); | |
| } | |
| // 옵션 가격 배치 조회 | |
| if (!empty($keyList['optionSnoList'])) { | |
| $optionPriceData = $this->goodsOptionRepository->findOptionPricesBySnoList($keyList['optionSnoList']); | |
| } | |
| // 텍스트 옵션 가격 배치 조회 | |
| if (!empty($keyList['optionTextSnoList'])) { | |
| $textOptionPriceData = $this->goodsOptionTextRepository->findOptionTextPricesBySnoList($keyList['optionTextSnoList']); | |
| } | |
| return [ | |
| 'goods' => $goodsPriceData ?? [], | |
| 'options' => $optionPriceData ?? [], | |
| 'textOptions' => $textOptionPriceData ?? [], | |
| ]; | |
| } | |
| /** | |
| * 장바구니 키 추출 (상품번호, 옵션번호, 텍스트 옵션번호) | |
| * | |
| * @param array $cartDataList 장바구니 목록 | |
| * @return array | |
| */ | |
| protected function extractGoodsKeyList(array $cartDataList): array | |
| { | |
| // 상품번호 추출 | |
| $goodsNoList = array_unique(array_column(array_column($cartDataList, 'goodsNo'), 0)); | |
| // 옵션번호 추출 | |
| $optionSnoList = array_unique(array_column(array_column($cartDataList, 'optionSno'), 0)); | |
| // 텍스트 옵션번호 추출 | |
| $optionTextSnoList = []; | |
| foreach ($cartDataList as $cartData) { | |
| $optionTextSnoList = array_merge($optionTextSnoList, array_keys($cartData['optionText'][0] ?? [])); | |
| } | |
| $optionTextSnoList = array_unique($optionTextSnoList); | |
| return [ | |
| 'goodsNoList' => $goodsNoList, | |
| 'optionSnoList' => $optionSnoList, | |
| 'optionTextSnoList' => $optionTextSnoList, | |
| ]; | |
| } | |
| /** | |
| * 장바구니 총 가격 계산 | |
| * | |
| * @param array $cartData 장바구니 데이터 | |
| * @param array $priceData 가격 데이터 (상품, 옵션, 텍스트 옵션, 추가상품) | |
| * @return int|float | |
| */ | |
| protected function calculateCartTotalPrice(array $cartData, array $priceData): int|float | |
| { | |
| $goodsNo = $cartData['goodsNo'][0] ?? 0; | |
| $optionSno = $cartData['optionSno'][0] ?? 0; | |
| $goodsCnt = $cartData['goodsCnt'][0] ?? 1; | |
| // 상품 가격 | |
| $goodsPrice = $priceData['goods'][$goodsNo] ?? 0; | |
| // 옵션 가격 | |
| $optionPrice = $priceData['options'][$optionSno] ?? 0; | |
| // 텍스트 옵션 가격 | |
| $optionTextPrice = 0; | |
| foreach ($cartData['optionText'][0] ?? [] as $textSno => $textValue) { | |
| $optionTextPrice += $priceData['textOptions'][$textSno] ?? 0; | |
| } | |
| // 총 가격 합산 | |
| return ($goodsPrice + $optionPrice + $optionTextPrice) * $goodsCnt; | |
| } | |
| /** | |
| * 재구매 상품 목록을 장바구니 데이터로 변환 | |
| * | |
| * @param array $orderGoodsList 재구매 상품 목록 | |
| * @param string $cartMode 장바구니 모드 | |
| * @return array | |
| */ | |
| public function convertToReorderCartData(array $orderGoodsList, string $cartMode): array | |
| { | |
| $reorderCartDataList = $this->convertToCartData($orderGoodsList, $cartMode); | |
| return $this->recalculateCartPrices($reorderCartDataList); | |
| } | |
| /** | |
| * 장바구니에 담을 수 있는 데이터만 필터링 | |
| * | |
| * @param array $cartDataList 장바구니 데이터 목록 | |
| * @return array 장바구니에 담을 수 있는 데이터만 반환 | |
| */ | |
| public function filterAvailableCartData(array $cartDataList): array | |
| { | |
| $availableCartDataList = []; | |
| $zeroPriceOrderFl = gd_policy('order.cart')['zeroPriceOrderFl']; | |
| $goodsNoList = array_unique(array_map(fn($cartData) => $cartData['goodsNo'][0], $cartDataList)); | |
| $existingGoodsNoList = $this->goodsRepository->findExistGoodsNoListByGoodsNoList($goodsNoList); | |
| foreach ($cartDataList as $cartKey => $cartData) { | |
| $goodsNo = $cartData['goodsNo'][0]; | |
| // 삭제 상품 제외 (완전 삭제 또는 delFl='y' 상품) | |
| if (!in_array($goodsNo, $existingGoodsNoList)) { | |
| continue; | |
| } | |
| // 가격이 0원인 상품을 담을 수 없는 경우 | |
| if ($zeroPriceOrderFl === 'n' && $cartData['set_total_price'] <= 0) { | |
| continue; | |
| } | |
| $availableCartDataList[$cartKey] = $cartData; | |
| } | |
| return $availableCartDataList; | |
| } | |
| /** | |
| * 바로구매 시 구매 제한 유효성 검사 (묶음주문 단위 + 구매수량 제한) | |
| * | |
| * @param array $cartDataList 장바구니 데이터 목록 | |
| * @param int $memNo 회원번호 (ID 기준 구매수량 체크용) | |
| * @return bool | |
| */ | |
| public function isPurchasable(array $cartDataList, int $memNo): bool | |
| { | |
| if (empty($cartDataList)) { | |
| return true; | |
| } | |
| $goodsNoList = array_unique(array_column(array_column($cartDataList, 'goodsNo'), 0)); | |
| // 상품별 수량 집계 (동일 상품의 각 옵션 수량을 배열로 수집) | |
| $goodsCntList = []; | |
| foreach ($cartDataList as $cartData) { | |
| $goodsNo = $cartData['goodsNo'][0]; | |
| $goodsCnt = (int) $cartData['goodsCnt'][0]; | |
| $goodsCntList[$goodsNo][] = $goodsCnt; | |
| } | |
| $salesInfoList = $this->goodsRepository->findSalesInfoByGoodsNoList($goodsNoList); | |
| if (empty($salesInfoList)) { | |
| return true; | |
| } | |
| // ID 기준 구매수량 제한 상품의 회원 누적 구매수량 일괄 조회 (비회원은 조회 불필요) | |
| $idLimitGoodsNoList = array_keys(array_filter($salesInfoList, fn($info) => $info['fixedOrderCnt'] === 'id')); | |
| $memberOrderCounts = (!empty($idLimitGoodsNoList) && $memNo > 0) | |
| ? $this->memberOrderGoodsCountRepository->findOrderCountByGoodsNoList($memNo, $idLimitGoodsNoList) | |
| : []; | |
| foreach ($goodsCntList as $goodsNo => $optionCntList) { | |
| $salesInfo = $salesInfoList[$goodsNo] ?? null; | |
| if (empty($salesInfo)) { | |
| continue; | |
| } | |
| //구매수량 제한 체크 | |
| if (!$this->isWithinOrderCntLimit($optionCntList, $salesInfo, $memberOrderCounts[$goodsNo] ?? 0)) { | |
| return false; | |
| } | |
| // 묶음주문 단위 체크 | |
| if (!$this->isWithinSalesUnitLimit($optionCntList, $salesInfo)) { | |
| return false; | |
| } | |
| } | |
| return true; | |
| } | |
| /** | |
| * 구매수량 제한 체크 (옵션/상품/ID 기준) | |
| * | |
| * - option: 각 옵션별 수량이 min~max 범위 내인지 체크 | |
| * - goods: 동일 상품의 전체 옵션 수량 합산으로 체크 | |
| * - id: 회원 누적 구매수량 + 현재 주문 수량 합산으로 체크 | |
| * | |
| * @param array $optionCntList 동일 상품 내 각 옵션의 주문 수량 목록 | |
| * @param array $salesInfo 상품 판매 정보 (fixedOrderCnt, minOrderCnt, maxOrderCnt) | |
| * @param int $historicalCnt 회원의 해당 상품 누적 구매수량 (ID 기준일 때 사용) | |
| * @return bool | |
| */ | |
| protected function isWithinOrderCntLimit(array $optionCntList, array $salesInfo, int $historicalCnt = 0): bool | |
| { | |
| $minOrderCnt = (int) $salesInfo['minOrderCnt']; | |
| $maxOrderCnt = (int) $salesInfo['maxOrderCnt']; | |
| $fixedOrderCnt = $salesInfo['fixedOrderCnt']; | |
| $totalCnt = array_sum($optionCntList); | |
| // 구매수량 제한 설정이 없으면 true 반환 | |
| $hasMinMaxRestriction = !($minOrderCnt <= 1 && $maxOrderCnt == 0); | |
| if (!$hasMinMaxRestriction) { | |
| return true; | |
| } | |
| if ($fixedOrderCnt === 'option') { | |
| foreach ($optionCntList as $cnt) { | |
| if ($cnt < $minOrderCnt || ($maxOrderCnt > 0 && $cnt > $maxOrderCnt)) { | |
| return false; | |
| } | |
| } | |
| } elseif ($fixedOrderCnt === 'id') { | |
| $totalWithHistory = $totalCnt + $historicalCnt; | |
| if ($totalWithHistory < $minOrderCnt || ($maxOrderCnt > 0 && $totalWithHistory > $maxOrderCnt)) { | |
| return false; | |
| } | |
| } else { | |
| if ($totalCnt < $minOrderCnt || ($maxOrderCnt > 0 && $totalCnt > $maxOrderCnt)) { | |
| return false; | |
| } | |
| } | |
| return true; | |
| } | |
| /** | |
| * 묶음주문 단위 체크 (옵션/상품 기준) | |
| * | |
| * - option: 각 옵션별 수량이 묶음 단위(salesUnit)의 배수인지 체크 | |
| * - goods: 동일 상품의 전체 옵션 수량 합산이 묶음 단위의 배수인지 체크 | |
| * | |
| * @param array $optionCntList 동일 상품 내 각 옵션의 주문 수량 목록 | |
| * @param array $salesInfo 상품 판매 정보 (fixedSales, salesUnit) | |
| * @return bool | |
| */ | |
| protected function isWithinSalesUnitLimit(array $optionCntList, array $salesInfo): bool | |
| { | |
| $salesUnit = (int) $salesInfo['salesUnit']; | |
| $fixedSales = $salesInfo['fixedSales']; | |
| if (empty($salesUnit)) { | |
| return true; | |
| } | |
| $totalCnt = array_sum($optionCntList); | |
| if ($fixedSales === 'option') { | |
| foreach ($optionCntList as $cnt) { | |
| if ($cnt % $salesUnit !== 0) { | |
| return false; | |
| } | |
| } | |
| } else { | |
| if ($totalCnt % $salesUnit !== 0) { | |
| return false; | |
| } | |
| } | |
| return true; | |
| } | |
| /** | |
| * 바로구매 상품을 일반 장바구니로 변환 | |
| * | |
| * @param array $cartSnoList 바로구매 상품 sno 목록 | |
| * @return void | |
| */ | |
| public function moveDirectToNormalCart(array $cartSnoList): void | |
| { | |
| try { | |
| $this->cartRepository->updateDirectCartBySnoList($cartSnoList); | |
| } catch (\Throwable $e) { | |
| throw new \Exception('바로구매 상품을 일반 장바구니로 변환 중 오류가 발생했습니다.'); | |
| } | |
| } | |
| } | |
변경 전CouponAdmin.php
| $page = \App::load('\\Component\\Page\\Page', $getValue['page']); | |
| $page->page['list'] = $getValue['pageNum']; | |
| $total = $this->db->fetch('SELECT count(mc.memNo) as total FROM ' . DB_MEMBER_COUPON . ' as mc WHERE mc.couponNo = ' . $getValue['couponNo']); | |
| $page->recode['amount'] = $total['total']; | |
| $page->setPage(); | |
| $page->setUrl(\Request::getQueryString()); | |
| $page = \App::load('\\Component\\Page\\Page', $getValue['page']); | |
| $page->page['list'] = $getValue['pageNum']; | |
| $total = $this->db->fetch('SELECT count(mc.memNo) as total FROM ' . DB_MEMBER_COUPON . ' as mc WHERE mc.couponNo = ' . $getValue['couponNo']); | |
| $page->recode['amount'] = $total['total']; | |
| $page->setPage(); | |
| $page->setUrl(\Request::getQueryString()); | |
| if ($arrData['couponSaveType'] != 'manual') { // 수동 발급이 아니면 | |
| gd_isset($arrData['couponSaveDuplicateLimitType'], 'n'); | |
| $validator->add('couponSaveDuplicateType', 'yn', true); // 중복발급제한여부–안됨(‘n’),중복가능(‘y’) | |
| $validator->add('couponSaveDuplicateLimitType', 'yn', true); // 중복발급최대제한여부–사용(‘y’) | |
| if ($arrData['couponSaveDuplicateLimitType'] == 'y') { | |
| $validator->add('couponSaveDuplicateLimit', 'number', true); // 중복발급최대개수 | |
| } | |
| } | |
| $validator->add('couponProductMinOrderType', 'alpha', true); // 쿠폰유형–상품쿠폰(‘product’),주문쿠폰(‘order’),배송비쿠폰('delivery') | |
| $validator->add('couponMinOrderPrice', null, null); // 쿠폰적용의 최소상품구매금액제한–소수점2자리가능 | |
| $validator->add('couponApplyDuplicateType', 'yn', true); // 쿠폰적용 여부-중복가능(‘y’),안됨(‘n’) | |
| // 쿠폰유형 (주문적용 쿠폰/배송비할인 쿠폰/기프트쿠폰) 따른 설정 초기값 정의 | |
| throw new \Exception(gd_implode("<br/>", $validator->errors)); | |
| } | |
| // 선택에 따른 값의 초기화를 위한 빈값 제거 - 주석처리 함 - 상태에 따른 빈값 저장(초기화)이 필요한 경우가 존재함. | |
| // $arrData = ArrayUtils::removeEmpty($arrData); | |
| $isImageUploaded = false; | |
| switch (substr($arrData['mode'], 0, 6)) { | |
| $validator->add('couponSaveDuplicateLimit', 'number', true); // 중복발급최대개수 | |
| } | |
| $validator->add('couponApplyMemberGroup', null, null); // 발급가능회원등급 | |
| $validator->add('couponProductMinOrderType', 'alpha', true); // 쿠폰유형–상품쿠폰(‘product’),주문쿠폰(‘order’),배송비쿠폰('delivery') | |
| $validator->add('couponMinOrderPrice', null, null); // 쿠폰적용의 최소상품구매금액제한–소수점2자리가능 | |
| $validator->add('couponApplyDuplicateType', 'yn', true); // 쿠폰적용 여부-중복가능(‘y’),안됨(‘n’) | |
| if ($arrData['targetGoodGoods'] != '') { | |
| $arrData['targetGoodGoods'] = str_replace(INT_DIVISION, ',', $arrData['targetGoodGoods']); | |
| } | |
| //$this->arrWhere[] = 'og.goodsNo IN (?) '; | |
| //$this->db->bind_param_push($this->arrBind, 'i', $arrData['targetGoodGoods']); | |
| $sTargetTable = '(SELECT o.memNo, MAX(o.orderNo) as orderNo, MAX(og.' . $sSelect1 . ') as ' . $sSelect1 . ' FROM ' . DB_ORDER_GOODS . ' as og JOIN ' . DB_ORDER . ' as o ON o.orderNo = og.orderNo WHERE o.memNo > 0 AND og.goodsNo IN (' . $arrData['targetGoodGoods'] . ') AND (og.' . $sSelect1 . ' IS NOT NULL AND og.' . $sSelect1 . ' != \'0000-00-00 00:00:00\') GROUP BY o.memNo) as tt'; | |
| } | |
| if ($applyMemberGroup != '') { | |
| $this->arrWhere[] = 'm.groupSno IN (?) '; | |
| $this->db->strOrder = $sort['fieldName'] . ' ' . $sort['sortMode']; | |
| $this->db->strGroup = 'm.memId'; | |
| $query = $this->db->query_complete(); | |
| $strSQL = 'SELECT ' . array_shift($query) . ' FROM ' . $sTargetTable . ' JOIN ' . DB_ORDER . ' as o ON o.orderNo = tt.orderNo JOIN ' | |
| . DB_MEMBER . ' as m ON tt.memNo = m.memNo AND m.memNo > 0 AND m.sleepFl = \'n\' AND m.mallSno = 1 ' . $whereSmsFlag . ' JOIN ' . DB_MEMBER_GROUP . ' as mg ON m.groupSno = mg.sno LEFT JOIN ' | |
| . DB_MEMBER_COUPON . ' as mc ON mc.couponNo = ' . $arrData['couponNo'] . ' AND m.memNo = mc.memNo ' . gd_implode(' ', $query); | |
| // \Logger::debug($strSQL, $this->arrBind); | |
| $data = $this->db->query_fetch($strSQL, $this->arrBind); | |
| // 검색 카운트 | |
| $strSQL = ' SELECT COUNT(*) AS cnt FROM ' . $sTargetTable . ' JOIN ' . DB_ORDER . ' as o ON o.orderNo = tt.orderNo JOIN ' | |
| . DB_MEMBER . ' as m ON tt.memNo = m.memNo AND m.memNo > 0 AND m.sleepFl = \'n\' AND m.mallSno = 1 ' . $whereSmsFlag . ' JOIN ' . DB_MEMBER_GROUP . ' as mg ON m.groupSno = mg.sno LEFT JOIN ' | |
| . DB_MEMBER_COUPON . ' as mc ON mc.couponNo = ' . $arrData['couponNo'] . ' AND m.memNo = mc.memNo ' . ' WHERE ' . $this->db->strWhere; | |
| $res = $this->db->query_fetch($strSQL, $this->arrBind, false); | |
| $page->recode['total'] = $res['cnt']; // 검색 레코드 수 | |
| $page->setPage(); | |
| $query = $this->db->query_complete(); | |
| $strSQL = 'SELECT ' . array_shift($query) . ' FROM ' . $sTargetTable . ' JOIN ' . DB_ORDER . ' as o ON o.orderNo = tt.orderNo JOIN ' | |
| . DB_MEMBER . ' as m ON tt.memNo = m.memNo AND m.memNo > 0 AND m.sleepFl = \'n\' AND m.mallSno = 1 ' . $whereSmsFlag . ' JOIN ' . DB_MEMBER_GROUP . ' as mg ON m.groupSno = mg.sno LEFT JOIN ' | |
| . DB_MEMBER_COUPON . ' as mc ON mc.couponNo = ' . $arrData['couponNo'] . ' AND m.memNo = mc.memNo ' . gd_implode(' ', $query); | |
| $data = $this->db->query_fetch($strSQL, $this->arrBind); | |
| Manager::displayListData($data); | |
| $this->db->set_insert_db(DB_MEMBER_COUPON, $arrBind['param'], $arrBind['bind'], 'y'); | |
| $this->setCouponMemberSaveCount($getData['couponNo']); | |
| $data = $this->db->query_fetch("SELECT memberCouponNo FROM " . DB_MEMBER_COUPON . " WHERE memNo = " . $val['memNo'] . " AND couponNo = " . $getData['couponNo'] . " ORDER BY regDt DESC LIMIT 1"); | |
| $tempMemberCouponNo = $data[0]['memberCouponNo']; | |
| } | |
변경 후CouponAdmin.php
| $page = \App::load('\\Component\\Page\\Page', $getValue['page']); | |
| $page->page['list'] = $getValue['pageNum']; | |
| $arrBindTotal = []; | |
| $this->db->bind_param_push($arrBindTotal, 'i', $getValue['couponNo']); | |
| $total = $this->db->query_fetch('SELECT count(mc.memNo) as total FROM ' . DB_MEMBER_COUPON . ' as mc WHERE mc.couponNo = ?', $arrBindTotal, false); | |
| $page->recode['amount'] = $total['total']; | |
| $page->setPage(); | |
| $page->setUrl(\Request::getQueryString()); | |
| $page = \App::load('\\Component\\Page\\Page', $getValue['page']); | |
| $page->page['list'] = $getValue['pageNum']; | |
| $arrBindTotal = []; | |
| $this->db->bind_param_push($arrBindTotal, 'i', $getValue['couponNo']); | |
| $total = $this->db->query_fetch('SELECT count(mc.memNo) as total FROM ' . DB_MEMBER_COUPON . ' as mc WHERE mc.couponNo = ?', $arrBindTotal, false); | |
| $page->recode['amount'] = $total['total']; | |
| $page->setPage(); | |
| $page->setUrl(\Request::getQueryString()); | |
| if ($arrData['couponSaveType'] != 'manual') { // 수동 발급이 아니면 | |
| gd_isset($arrData['couponSaveDuplicateLimitType'], 'n'); | |
| $validator->add('couponSaveDuplicateType', 'yn', true); // 중복발급제한여부–안됨(‘n’),중복가능(‘y’) | |
| // 재발급 설정안함 시 하위 필드 초기화 | |
| if ($arrData['couponSaveDuplicateType'] == 'n') { | |
| $arrData['couponSaveDuplicateLimitType'] = 'n'; | |
| $arrData['couponSaveDuplicateLimit'] = '0'; | |
| } | |
| $validator->add('couponSaveDuplicateLimitType', 'yn', true); // 중복발급최대제한여부–사용(‘y’) | |
| if ($arrData['couponSaveDuplicateLimitType'] == 'y') { | |
| $validator->add('couponSaveDuplicateLimit', 'number', true); // 중복발급최대개수 | |
| } else { | |
| $validator->add('couponSaveDuplicateLimit', null, null); // garbageDelete 방지 | |
| } | |
| } | |
| $validator->add('couponProductMinOrderType', 'alpha', true); // 쿠폰유형–상품쿠폰(‘product’),주문쿠폰(‘order’),배송비쿠폰(‘delivery’) | |
| $validator->add('couponMinOrderPrice', null, null); // 쿠폰적용의 최소상품구매금액제한–소수점2자리가능 | |
| // 제한없음 선택 시 최소금액 초기화 | |
| if ($arrData['couponProductMinOrderType'] == 'none') { | |
| $arrData['couponMinOrderPrice'] = '0'; | |
| } | |
| $validator->add('couponApplyDuplicateType', 'yn', true); // 쿠폰적용 여부-중복가능(‘y’),안됨(‘n’) | |
| // 쿠폰유형 (주문적용 쿠폰/배송비할인 쿠폰/기프트쿠폰) 따른 설정 초기값 정의 | |
| throw new \Exception(gd_implode("<br/>", $validator->errors)); | |
| } | |
| // 자동발급이 아닌 경우 이벤트/SMS 필드 초기화 | |
| if ($arrData['couponSaveType'] != 'auto') { | |
| // couponEventType 은 insert 시 기본값, 업데이트시 기존값 유지 | |
| $arrData['couponEventOrderFirstType'] = 'n'; | |
| $arrData['couponEventOrderSmsType'] = 'n'; | |
| $arrData['couponEventFirstSmsType'] = 'n'; | |
| $arrData['couponEventBirthSmsType'] = 'n'; | |
| $arrData['couponEventMemberSmsType'] = 'n'; | |
| $arrData['couponEventAttendanceSmsType'] = 'n'; | |
| $arrData['couponEventMemberModifySmsType'] = 'n'; | |
| $arrData['couponEventWakeSmsType'] = 'n'; | |
| } | |
| // 최대할인금액 미사용 시 초기화 | |
| if (gd_isset($arrData['couponMaxBenefitType']) != 'y') { | |
| $arrData['couponMaxBenefit'] = '0'; | |
| } | |
| // 발급수량 무제한 시 초기화 | |
| if (gd_isset($arrData['couponAmountType']) != 'y') { | |
| $arrData['couponAmount'] = '0'; | |
| } | |
| // 사용기간 반대 타입 필드 초기화 | |
| if ($arrData['couponUsePeriodType'] == 'period') { | |
| $arrData['couponUsePeriodDay'] = '0'; | |
| $arrData['couponUseDateLimit'] = ''; | |
| } else if ($arrData['couponUsePeriodType'] == 'day') { | |
| $arrData['couponUsePeriodStartDate'] = ''; | |
| $arrData['couponUsePeriodEndDate'] = ''; | |
| } | |
| $isImageUploaded = false; | |
| switch (substr($arrData['mode'], 0, 6)) { | |
| $validator->add('couponSaveDuplicateLimit', 'number', true); // 중복발급최대개수 | |
| } | |
| $validator->add('couponApplyMemberGroup', null, null); // 발급가능회원등급 | |
| $validator->add('couponProductMinOrderType', 'alpha', true); // 쿠폰유형–상품쿠폰(‘product’),주문쿠폰(‘order’),배송비쿠폰(‘delivery’) | |
| $validator->add('couponMinOrderPrice', null, null); // 쿠폰적용의 최소상품구매금액제한–소수점2자리가능 | |
| $validator->add('couponApplyDuplicateType', 'yn', true); // 쿠폰적용 여부-중복가능(‘y’),안됨(‘n’) | |
| if ($arrData['targetGoodGoods'] != '') { | |
| $arrData['targetGoodGoods'] = str_replace(INT_DIVISION, ',', $arrData['targetGoodGoods']); | |
| } | |
| $safeGoodsNoList = implode(',', array_map('intval', explode(',', $arrData['targetGoodGoods']))); | |
| $sTargetTable = '(SELECT o.memNo, MAX(o.orderNo) as orderNo, MAX(og.' . $sSelect1 . ') as ' . $sSelect1 . ' FROM ' . DB_ORDER_GOODS . ' as og JOIN ' . DB_ORDER . ' as o ON o.orderNo = og.orderNo WHERE o.memNo > 0 AND og.goodsNo IN (' . $safeGoodsNoList . ') AND (og.' . $sSelect1 . ' IS NOT NULL AND og.' . $sSelect1 . ' != \'0000-00-00 00:00:00\') GROUP BY o.memNo) as tt'; | |
| } | |
| if ($applyMemberGroup != '') { | |
| $this->arrWhere[] = 'm.groupSno IN (?) '; | |
| $this->db->strOrder = $sort['fieldName'] . ' ' . $sort['sortMode']; | |
| $this->db->strGroup = 'm.memId'; | |
| $safeCouponNo = intval($arrData['couponNo']); | |
| $query = $this->db->query_complete(); | |
| $strSQL = 'SELECT ' . array_shift($query) . ' FROM ' . $sTargetTable . ' JOIN ' . DB_ORDER . ' as o ON o.orderNo = tt.orderNo JOIN ' | |
| . DB_MEMBER . ' as m ON tt.memNo = m.memNo AND m.memNo > 0 AND m.sleepFl = \'n\' AND m.mallSno = 1 ' . $whereSmsFlag . ' JOIN ' . DB_MEMBER_GROUP . ' as mg ON m.groupSno = mg.sno LEFT JOIN ' | |
| . DB_MEMBER_COUPON . ' as mc ON mc.couponNo = ' . $safeCouponNo . ' AND m.memNo = mc.memNo ' . gd_implode(' ', $query); | |
| // \Logger::debug($strSQL, $this->arrBind); | |
| $data = $this->db->query_fetch($strSQL, $this->arrBind); | |
| // 검색 카운트 | |
| $strSQL = ' SELECT COUNT(*) AS cnt FROM ' . $sTargetTable . ' JOIN ' . DB_ORDER . ' as o ON o.orderNo = tt.orderNo JOIN ' | |
| . DB_MEMBER . ' as m ON tt.memNo = m.memNo AND m.memNo > 0 AND m.sleepFl = \'n\' AND m.mallSno = 1 ' . $whereSmsFlag . ' JOIN ' . DB_MEMBER_GROUP . ' as mg ON m.groupSno = mg.sno LEFT JOIN ' | |
| . DB_MEMBER_COUPON . ' as mc ON mc.couponNo = ' . $safeCouponNo . ' AND m.memNo = mc.memNo ' . ' WHERE ' . $this->db->strWhere; | |
| $res = $this->db->query_fetch($strSQL, $this->arrBind, false); | |
| $page->recode['total'] = $res['cnt']; // 검색 레코드 수 | |
| $page->setPage(); | |
| $query = $this->db->query_complete(); | |
| $strSQL = 'SELECT ' . array_shift($query) . ' FROM ' . $sTargetTable . ' JOIN ' . DB_ORDER . ' as o ON o.orderNo = tt.orderNo JOIN ' | |
| . DB_MEMBER . ' as m ON tt.memNo = m.memNo AND m.memNo > 0 AND m.sleepFl = \'n\' AND m.mallSno = 1 ' . $whereSmsFlag . ' JOIN ' . DB_MEMBER_GROUP . ' as mg ON m.groupSno = mg.sno LEFT JOIN ' | |
| . DB_MEMBER_COUPON . ' as mc ON mc.couponNo = ' . $safeCouponNo . ' AND m.memNo = mc.memNo ' . gd_implode(' ', $query); | |
| $data = $this->db->query_fetch($strSQL, $this->arrBind); | |
| Manager::displayListData($data); | |
| $this->db->set_insert_db(DB_MEMBER_COUPON, $arrBind['param'], $arrBind['bind'], 'y'); | |
| $this->setCouponMemberSaveCount($getData['couponNo']); | |
| $arrBindLocal = []; | |
| $this->db->bind_param_push($arrBindLocal, 'i', $val['memNo']); | |
| $this->db->bind_param_push($arrBindLocal, 'i', $getData['couponNo']); | |
| $data = $this->db->query_fetch("SELECT memberCouponNo FROM " . DB_MEMBER_COUPON . " WHERE memNo = ? AND couponNo = ? ORDER BY regDt DESC LIMIT 1", $arrBindLocal); | |
| $tempMemberCouponNo = $data[0]['memberCouponNo']; | |
| } | |
변경 전ExcelDataConvert.php
| $unitPriceData = $goods->getGoodsUnitPrice($getData['goodsNo']); | |
| $getData['unitPriceFl'] = gd_isset($unitPriceData['unitPriceFl'], 'n'); | |
| if ($unitPriceData && $unitPriceData['unitPriceFl'] === 'y') { | |
| $getData['unitPrice'] = $unitPriceData['unitQuantity'] . STR_DIVISION . $unitPriceData['unitType'] . STR_DIVISION . $unitPriceData['unitBaseQuantity']; | |
| } else { | |
| $getData['unitPrice'] = ''; | |
| } | |
변경 후ExcelDataConvert.php
| $unitPriceData = $goods->getGoodsUnitPrice($getData['goodsNo']); | |
| $getData['unitPriceFl'] = gd_isset($unitPriceData['unitPriceFl'], 'n'); | |
| if ($unitPriceData && $unitPriceData['unitPriceFl'] === 'y') { | |
| $getData['unitPrice'] = (float)$unitPriceData['unitQuantity'] . STR_DIVISION . $unitPriceData['unitType'] . STR_DIVISION . (int)$unitPriceData['unitBaseQuantity']; | |
| } else { | |
| $getData['unitPrice'] = ''; | |
| } | |
변경 전ExcelOrderConvert.php
| $this->db->bind_param_push($arrBind, 's', $orderNo); | |
| } | |
| // 쿼리 구성 | |
| $this->db->strField = implode(',', $arrField) . ',og.sno,og.regDt'; | |
| $this->db->strWhere = implode(' AND ', $arrWhere); | |
| $this->db->strLimit = '1'; | |
| // 쿼리 생성 | |
| $query = $this->db->query_complete(); | |
변경 후ExcelOrderConvert.php
| $this->db->bind_param_push($arrBind, 's', $orderNo); | |
| } | |
| // 쿼리 구성 | |
| $this->db->strField = gd_implode(',', $arrField) . ',og.sno,og.regDt'; | |
| $this->db->strWhere = gd_implode(' AND ', $arrWhere); | |
| $this->db->strLimit = '1'; | |
| // 쿼리 생성 | |
| $query = $this->db->query_complete(); | |
변경 전ExcelOrderSort.php
변경 후ExcelOrderSort.php
| <?php | |
| /* | |
| * Copyright (C) 2026 NHN COMMERCE. - All Rights Reserved | |
| * | |
| * Unauthorized copying or redistribution of this file in source and binary forms via any medium | |
| * is strictly prohibited. | |
| */ | |
| namespace Bundle\Component\Excel; | |
| /** | |
| * 주문 엑셀 다운로드 정렬 처리 | |
| */ | |
| class ExcelOrderSort | |
| { | |
| /** | |
| * 주문 상태 예외 정렬 + 2,3차 정렬 처리 | |
| * | |
| * @param string $sort 정렬 기준 | |
| * @return string 변환된 ORDER BY 절 | |
| */ | |
| public function resolve(string $sort): string | |
| { | |
| // 주문 상태 예외 정렬 처리 | |
| if ($sort == 'og.orderStatus asc') { | |
| $sort = 'case LEFT(og.orderStatus, 1) when \'o\' then \'01\' when \'p\' then \'02\' when \'g\' then \'03\' when \'d\' then \'04\' when \'s\' then \'05\' when \'e\' then \'06\' when \'b\' then \'07\' when \'r\' then \'08\' when \'c\' then \'09\' when \'f\' then \'10\' else \'11\' end'; | |
| } elseif ($sort == 'og.orderStatus desc') { | |
| $sort = 'case LEFT(og.orderStatus, 1) when \'f\' then \'01\' when \'c\' then \'02\' when \'r\' then \'03\' when \'b\' then \'04\' when \'e\' then \'05\' when \'s\' then \'06\' when \'d\' then \'07\' when \'g\' then \'08\' when \'p\' then \'09\' when \'o\' then \'10\' else \'11\' end'; | |
| } | |
| // 선택된 정렬 + 2,3차 정렬 처리 | |
| if (str_contains($sort, 'packetCode') && str_contains($sort, 'desc')) { | |
| // 묶음배송 내림차순 정렬인 경우 주문배송테이블번호 기준 내림차순, 주문코드 기준 내림차순으로 정렬 | |
| return $sort . ', og.orderDeliverySno desc, og.orderCd desc'; | |
| } | |
| // 그 외 주문배송테이블번호 기준 오름차순, 주문코드 기준 오름차순으로 고정 | |
| return $sort . ', og.orderDeliverySno asc, og.orderCd asc'; | |
| } | |
| } | |
변경 전ExcelRequest.php
| $unitPriceData = $goodsAdmin->getGoodsUnitPrice($val['goodsNo']); | |
| $val['unitPriceFl'] = gd_isset($unitPriceData['unitPriceFl'], 'n'); | |
| if ($unitPriceData && $unitPriceData['unitPriceFl'] === 'y') { | |
| $val['unitPrice'] = $unitPriceData['unitQuantity'] . STR_DIVISION . $unitPriceData['unitType'] . STR_DIVISION . $unitPriceData['unitBaseQuantity']; | |
| } else { | |
| $val['unitPrice'] = ''; | |
| } | |
변경 후ExcelRequest.php
| $unitPriceData = $goodsAdmin->getGoodsUnitPrice($val['goodsNo']); | |
| $val['unitPriceFl'] = gd_isset($unitPriceData['unitPriceFl'], 'n'); | |
| if ($unitPriceData && $unitPriceData['unitPriceFl'] === 'y') { | |
| $val['unitPrice'] = (float)$unitPriceData['unitQuantity'] . STR_DIVISION . $unitPriceData['unitType'] . STR_DIVISION . (int)$unitPriceData['unitBaseQuantity']; | |
| } else { | |
| $val['unitPrice'] = ''; | |
| } | |
변경 전Faq.php
| $this->db->strOrder = "sortNo, sno DESC"; | |
| } | |
| $offset = ($req['page'] - 1) * self::PAGE_LIST_COUNT; | |
| $this->db->strLimit = $offset." , ".self::PAGE_LIST_COUNT; | |
변경 후Faq.php
| $this->db->strOrder = "sortNo, sno DESC"; | |
| } | |
| if (!is_numeric($req['page'])) { | |
| throw new \Exception("허용되지 않는 Page값"); | |
| } | |
| $offset = ($req['page'] - 1) * self::PAGE_LIST_COUNT; | |
| $this->db->strLimit = $offset." , ".self::PAGE_LIST_COUNT; | |
변경 전Goods.php
| if (isset($unitPriceDataArr[$val['goodsNo']])) { | |
| $unitData = $unitPriceDataArr[$val['goodsNo']]; | |
| $val['unitPriceFl'] = $unitData['unitPriceFl']; | |
| $val['unitQuantity'] = $unitData['unitQuantity']; | |
| $val['unitType'] = $unitData['unitType']; | |
| $val['unitBaseQuantity'] = intval($unitData['unitBaseQuantity']); | |
| $val['unitPriceValue'] = intval($unitData['unitPrice']); | |
| $unitPriceData = $this->getGoodsUnitPrice($goodsNo); | |
| if ($unitPriceData && $unitPriceData['unitPriceFl'] == 'y') { | |
| $getData['unitPriceFl'] = $unitPriceData['unitPriceFl']; | |
| $getData['unitQuantity'] = $unitPriceData['unitQuantity']; | |
| $getData['unitType'] = $unitPriceData['unitType']; | |
| $getData['unitBaseQuantity'] = intval($unitPriceData['unitBaseQuantity']); | |
| $getData['unitPrice'] = intval($unitPriceData['unitPrice']); | |
변경 후Goods.php
| if (isset($unitPriceDataArr[$val['goodsNo']])) { | |
| $unitData = $unitPriceDataArr[$val['goodsNo']]; | |
| $val['unitPriceFl'] = $unitData['unitPriceFl']; | |
| $val['unitQuantity'] = (float)$unitData['unitQuantity']; | |
| $val['unitType'] = $unitData['unitType']; | |
| $val['unitBaseQuantity'] = intval($unitData['unitBaseQuantity']); | |
| $val['unitPriceValue'] = intval($unitData['unitPrice']); | |
| $unitPriceData = $this->getGoodsUnitPrice($goodsNo); | |
| if ($unitPriceData && $unitPriceData['unitPriceFl'] == 'y') { | |
| $getData['unitPriceFl'] = $unitPriceData['unitPriceFl']; | |
| $getData['unitQuantity'] = (float)$unitPriceData['unitQuantity']; | |
| $getData['unitType'] = $unitPriceData['unitType']; | |
| $getData['unitBaseQuantity'] = intval($unitPriceData['unitBaseQuantity']); | |
| $getData['unitPrice'] = intval($unitPriceData['unitPrice']); | |
변경 전GoodsAdmin.php
| $this->db->set_update_db(DB_GOODS_SEARCH, $arrBind['param'], 'goodsNo = \'' . $value . '\'', $arrBind['bind']); | |
| } | |
| } | |
| return $param['applyFl']; | |
| } | |
변경 후GoodsAdmin.php
| $this->db->set_update_db(DB_GOODS_SEARCH, $arrBind['param'], 'goodsNo = \'' . $value . '\'', $arrBind['bind']); | |
| } | |
| } | |
| $goodsWebHookService = \App::getInstance(GoodsWebHookService::class); | |
| $goodsWebHookService->sendGoodsWebHook(gd_implode(',', $goodsNo), 'UPDATED'); | |
| return $param['applyFl']; | |
| } | |
변경 전MemberDAO.php
| { | |
| use SingletonTrait; | |
| /** 벌크 인서트 배치 크기 */ | |
| private const BULK_INSERT_BATCH_SIZE = 100; | |
| /** @var \Framework\Database\DBTool $db */ | |
| protected $db; | |
| protected $fields; | |
변경 후MemberDAO.php
| { | |
| use SingletonTrait; | |
| /** @var \Framework\Database\DBTool $db */ | |
| protected $db; | |
| protected $fields; | |
변경 전PageAccess.php
| 'guest' => 'x', | |
| 'intro' => 'x', | |
| ], | |
| 'allpay/pg_return.php' => [ | |
| 'member' => 'x', | |
| 'guest' => 'x', | |
변경 후PageAccess.php
| 'guest' => 'x', | |
| 'intro' => 'x', | |
| ], | |
| 'easypay/pg_vbank_return.php' => [ | |
| 'member' => 'x', | |
| 'guest' => 'x', | |
| 'intro' => 'x', | |
| ], | |
| 'allpay/pg_return.php' => [ | |
| 'member' => 'x', | |
| 'guest' => 'x', | |
변경 전Mileage.php
| $logger->info(sprintf('Mileage have been added. sno[%s], memNo[%s]', $sno, $memNo)); | |
| $domain->setSno($sno); | |
| // 적립/차감 내용 저장 | |
| if ($domain->getMileage() < 0 && $domain->getSno() > 0) { | |
| $dao = new MileageDAO(); | |
| $history = new MileageHistory($dao, $this); | |
| $history->setMileageDomain($domain); | |
| $willHistoryDelete = $reasonCd == self::REASON_CODE_GROUP . self::REASON_CODE_USE_GOODS_BUY && isset($handleCd) && $handleMode == 'o'; | |
| $history->saveUseHistory($targetMileage, $willHistoryDelete); | |
| $logger->info('Saved usage mileage history.'); | |
| } | |
| // 회원 마일리지 가감 처리 | |
| $this->memberService->update($domain->getMemNo(), 'memNo', ['mileage'], [$domain->getAfterMileage()]); | |
| // 마일리지 히스토리 웹훅 전송 | |
| $this->memberWebHookService->sendMileageWebhook($domain->toArray()); | |
| return $memberVO; | |
| } | |
변경 후Mileage.php
| $logger->info(sprintf('Mileage have been added. sno[%s], memNo[%s]', $sno, $memNo)); | |
| $domain->setSno($sno); | |
| // 적립/차감 내용 저장 | |
| $originSnoList = []; | |
| if ($domain->getMileage() < 0 && $domain->getSno() > 0) { | |
| $dao = new MileageDAO(); | |
| $history = new MileageHistory($dao, $this); | |
| $history->setMileageDomain($domain); | |
| $willHistoryDelete = $reasonCd == self::REASON_CODE_GROUP . self::REASON_CODE_USE_GOODS_BUY && isset($handleCd) && $handleMode == 'o'; | |
| $history->saveUseHistory($targetMileage, $willHistoryDelete); | |
| $useMileage = $history->getUseMileage(); | |
| if (!empty($useMileage) && is_array($useMileage)){ | |
| $originSnoList = array_filter(array_map(fn($d) => method_exists($d, 'getSno') ? $d->getSno() : null, $useMileage)); | |
| } | |
| $logger->info('Saved usage mileage history.'); | |
| } | |
| // 회원 마일리지 가감 처리 | |
| $this->memberService->update($domain->getMemNo(), 'memNo', ['mileage'], [$domain->getAfterMileage()]); | |
| // 마일리지 히스토리 웹훅 전송 | |
| $webhookData = $domain->toArray(); | |
| $webhookData['originSnoList'] = $originSnoList; | |
| $this->memberWebHookService->sendMileageWebhook($webhookData); | |
| return $memberVO; | |
| } | |
변경 전Order.php
| * @todo 쿼리 리팩 필요 (현재 ORDER리스트를 가져온 후 별도로 ORDER_GOODS를 바인딩 처리) | |
| * | |
| * @param int $pageNum 페이지당 출력할 갯수 | |
| * @param null $dates 시작날짜와 끝날짜의 배열 | |
| * @param boolean $statusMode 취소상태 표기 여부 | |
| * | |
| * @return string | |
| continue; | |
| } | |
| // 일반 결제 사용여부에 따라 | |
| if ($val['mode'] == 'general' && substr($key, 0, 1) == 'p' && (empty($pgConf['pgId']) || empty($pgConf['pgName']))) { | |
| if ($key == 'ph' && $mobilePgConfFl === true) { | |
| // 휴대폰 결제 이고, 휴대폰 결제설정이 되어 있는 경우 패스 | |
| } elseif ($key == 'pk' && $val['useFl'] != 'n') { | |
| // 카카오페이이고 사용설정이면 패스 | |
| } else { | |
| continue; | |
| } | |
| } | |
| throw new Exception(__('재고 부족으로 구매가 불가능합니다')); | |
| } | |
| } | |
변경 후Order.php
| * @todo 쿼리 리팩 필요 (현재 ORDER리스트를 가져온 후 별도로 ORDER_GOODS를 바인딩 처리) | |
| * | |
| * @param int $pageNum 페이지당 출력할 갯수 | |
| * @param null $dates 시작날짜와 끝날짜의 배열 | |
| * @param boolean $statusMode 취소상태 표기 여부 | |
| * | |
| * @return string | |
| continue; | |
| } | |
| // 일반 결제 사용여부에 따라 (PG 미설정 시 간편결제·휴대폰 결제 예외 처리) | |
| if ($val['mode'] == 'general' && str_starts_with($key, 'p') && (empty($pgConf['pgId']) || empty($pgConf['pgName']))) { | |
| $isMobilePhoneWithConfig = ($key == 'ph' && $mobilePgConfFl); | |
| $isSimplePayWithUseEnabled = (in_array($key, ['pn', 'pp', 'pk', 'pt']) && $val['useFl'] != 'n'); | |
| if (!$isMobilePhoneWithConfig && !$isSimplePayWithUseEnabled) { | |
| continue; | |
| } | |
| } | |
| throw new Exception(__('재고 부족으로 구매가 불가능합니다')); | |
| } | |
| /** | |
| * 마이페이지 > 주문리스트(재구매용)에서 사용하며, 회원/비회원 데이터를 모두 출력함 | |
| * @see \Bundle\Component\Order\Order::getOrderList() 기반 키워드 검색 추가 | |
| * | |
| * @param int $pageNum 페이지당 출력할 갯수 | |
| * @param array|null $dates 시작날짜와 끝날짜의 배열 | |
| * @param string|null $statusMode 취소상태 표기 여부 | |
| * @param string|null $searchKey 검색 항목 | |
| * @param string|null $searchKeyword 검색어 | |
| * | |
| * @return string | |
| * @throws AlertRedirectException | |
| */ | |
| public function getOrderListBySearchKeyword($pageNum = 10, $dates = null, $statusMode = null, $searchKey = null, $searchKeyword = null) | |
| { | |
| // 배열 선언 | |
| $arrBind = $arrWhere = []; | |
| // 상품혜택관리 치환코드 생성 | |
| $goodsBenefit = \App::load('\\Component\\Goods\\GoodsBenefit'); | |
| // 회원 or 비회원 패스워드 체크 | |
| if (MemberUtil::checkLogin() == 'member') { | |
| $arrWhere[] = 'o.memNo = ?'; | |
| $this->db->bind_param_push($arrBind, 'i', Session::get('member.memNo')); | |
| } else { | |
| throw new AlertRedirectException(__('로그인 정보가 존재하지 않습니다.'), null, null, '../member/login.php'); | |
| } | |
| // 기간 설정 | |
| if (null === $dates || !is_array($dates) || $dates[0] == '' || $dates[1] == '') { | |
| $dates = [date('Y-m-d', strtotime('-365 days')), date('Y-m-d')]; | |
| } | |
| $arrWhere[] = 'o.regDt BETWEEN ? AND ?'; | |
| $this->db->bind_param_push($arrBind, 's', $dates[0] . ' 00:00:00'); | |
| $this->db->bind_param_push($arrBind, 's', $dates[1] . ' 23:59:59'); | |
| // 주문 테이블 필드 | |
| $arrInclude = [ | |
| 'orderNo', | |
| 'orderChannelFl', | |
| 'settlePrice', | |
| 'settleKind', | |
| 'orderGoodsCnt', | |
| 'orderTypeFl', | |
| 'multiShippingFl' | |
| ]; | |
| if (Globals::get('gGlobal.isFront')) { | |
| array_push($arrInclude, 'currencyPolicy', 'exchangeRatePolicy'); | |
| } | |
| $tmpField[] = DBTableField::setTableField('tableOrder', $arrInclude, null, 'o'); | |
| // 조인 | |
| $arrJoin[] = ' LEFT JOIN ' . DB_ORDER_GOODS . ' og ON o.orderNo = og.orderNo '; | |
| // 결제실패를 제외하고 전부 출력 | |
| $arrWhere[] = 'og.orderStatus != ?'; | |
| $this->db->bind_param_push($arrBind, 's', 'f1'); | |
| if (!empty($searchKey) && !empty($searchKeyword)) { | |
| $allowedSearchKeys = ['orderNo', 'goodsNm', 'goodsNo']; | |
| if (!in_array($searchKey, $allowedSearchKeys)) { | |
| throw new Exception(__('유효하지 않은 검색 항목입니다.')); | |
| } | |
| $arrWhere[] = 'og.' . $searchKey . ' LIKE ?'; | |
| $this->db->bind_param_push($arrBind, 's', '%' . $searchKeyword . '%'); | |
| } | |
| // 주문 or 취소 리스트 조건 | |
| switch ($statusMode) { | |
| // 주문관련 리스트만 | |
| case 'order': | |
| $tmpField[] = DBTableField::setTableField('tableOrderUserHandle', ['userHandleFl'], null, 'ouh'); | |
| $arrJoin[] = ' LEFT JOIN ' . DB_ORDER_USER_HANDLE . ' ouh ON og.userHandleSno = ouh.sno AND og.orderNo = ouh.orderNo '; | |
| $arrWhere[] = 'og.handleSno<=0 AND LEFT(og.orderStatus, 1) NOT IN (\'' . gd_implode('\',\'', $this->statusExcludeCd) . '\')'; | |
| break; | |
| // 기본 프로퍼티에서 반품(r) 제거 | |
| case 'cancel': | |
| $statusExcludeCd = []; | |
| foreach ($this->statusExcludeCd as $key => $val) { | |
| if ($val != 'r') { | |
| $statusExcludeCd[$key] = $val; | |
| } | |
| } | |
| $tmpField[] = DBTableField::setTableField('tableOrderGoods', ['handleSno'], null, 'og'); | |
| $arrWhere[] = '((og.handleSno > 0) OR (LEFT(og.orderStatus, 1) IN (\'' . gd_implode('\',\'', $statusExcludeCd) . '\')))'; | |
| break; | |
| // 교환, 반품 신청 및 거절 상태 | |
| case 'cancelRequest': | |
| // 사용자 클레임 승인 코드에서 승인(y) 제거 | |
| $statusClaimHandleCode = []; | |
| foreach ($this->statusClaimHandleCode as $key => $val) { | |
| if ($val != 'y') { | |
| $statusClaimHandleCode[$key] = $val; | |
| } | |
| } | |
| // 사용자 클레임 신청 코드에서 환불(r) 제거 | |
| $statusUserClaimRequestCode = []; | |
| foreach ($this->statusUserClaimRequestCode as $key => $val) { | |
| if ($val != 'r') { | |
| $statusUserClaimRequestCode[$key] = $val; | |
| } | |
| } | |
| $tmpField[] = DBTableField::setTableField('tableOrderUserHandle', ['userHandleFl'], null, 'ouh'); | |
| $arrJoin[] = ' LEFT JOIN ' . DB_ORDER_USER_HANDLE . ' ouh ON og.orderNo = ouh.orderNo AND (og.userHandleSno = ouh.sno || (og.sno = ouh.userHandleGoodsNo && left(og.orderStatus, 1) NOT IN (\'' . gd_implode('\',\'', $statusUserClaimRequestCode) . '\')))'; | |
| $arrWhere[] = 'ouh.userHandleFl IN (\'' . gd_implode('\',\'', $statusClaimHandleCode) . '\') AND ouh.userHandleMode IN (\'' . gd_implode('\',\'', $statusUserClaimRequestCode) . '\') AND LEFT(og.orderStatus, 1) IN (\'' . gd_implode('\',\'', $this->statusClaimCode['b']) . '\')'; | |
| break; | |
| // 반품만 | |
| case 'refund': | |
| $arrJoin[] = ' LEFT JOIN ' . DB_ORDER_USER_HANDLE . ' ouh ON og.userHandleSno = ouh.sno AND og.orderNo = ouh.orderNo AND ouh.userHandleFl = \'y\''; | |
| $arrWhere[] = 'LEFT(og.orderStatus, 1) IN (\'r\')'; | |
| break; | |
| // 환불 신청 및 거절 상태 | |
| case 'refundRequest': | |
| // 사용자 클레임 승인 코드에서 승인(y) 제거 | |
| $statusClaimHandleCode = []; | |
| foreach ($this->statusClaimHandleCode as $key => $val) { | |
| if ($val != 'y') { | |
| $statusClaimHandleCode[$key] = $val; | |
| } | |
| } | |
| // 사용자 클레임 신청 코드에서 반품, 교환(b, e) 제거 | |
| $statusUserClaimRequestCode = []; | |
| foreach ($this->statusUserClaimRequestCode as $key => $val) { | |
| if ($val != 'b' && $val != 'e') { | |
| $statusUserClaimRequestCode[$key] = $val; | |
| } | |
| } | |
| $tmpField[] = DBTableField::setTableField('tableOrderUserHandle', ['userHandleFl'], null, 'ouh'); | |
| $arrJoin[] = ' LEFT JOIN ' . DB_ORDER_USER_HANDLE . ' ouh ON og.orderNo = ouh.orderNo AND (og.userHandleSno = ouh.sno || (og.sno = ouh.userHandleGoodsNo && left(og.orderStatus, 1) NOT IN (\'' . gd_implode('\',\'', $statusUserClaimRequestCode) . '\')))'; | |
| $arrWhere[] = 'ouh.userHandleFl IN (\'' . gd_implode('\',\'', $statusClaimHandleCode) . '\') AND ouh.userHandleMode IN (\'' . gd_implode('\',\'', $statusUserClaimRequestCode) . '\') AND LEFT(og.orderStatus, 1) IN (\'' . gd_implode('\',\'', $this->statusReceiptApprovalPossible) . '\')'; | |
| break; | |
| // 모바일 프론트에서 사용 | |
| case 'mobile': | |
| break; | |
| } | |
| // 필드 정리 | |
| $tmpKey = gd_array_keys($tmpField); | |
| $arrField = []; | |
| foreach ($tmpKey as $key) { | |
| $arrField = gd_array_merge($arrField, $tmpField[$key]); | |
| } | |
| unset($tmpField, $tmpKey); | |
| // 페이지 기본설정 | |
| $pageNo = Request::get()->get('page', 1); | |
| $page = \App::load('\\Component\\Page\\Page', $pageNo); | |
| $page->page['list'] = $pageNum; // 페이지당 리스트 수 | |
| $page->block['cnt'] = 5; | |
| $page->setPage(); | |
| $page->setUrl(Request::getQueryString()); | |
| // 현 페이지 결과 | |
| $this->db->strJoin = gd_implode('', $arrJoin); | |
| $this->db->strField = gd_implode(', ', $arrField) . ', o.regDt'; | |
| $this->db->strWhere = gd_implode(' AND ', gd_isset($arrWhere)); | |
| $this->db->strOrder = 'og.orderNo desc'; | |
| $this->db->strLimit = $page->recode['start'] . ',' . $pageNum; | |
| $this->db->strGroup = 'og.orderNo'; | |
| if (empty($arrBind)) { | |
| $arrBind = null; | |
| } | |
| $query = $this->db->query_complete(); | |
| $strSQL = 'SELECT ' . array_shift($query) . ' FROM ' . DB_ORDER . ' o ' . gd_implode(' ', $query); | |
| $data = $this->db->secondary()->query_fetch($strSQL, $arrBind); | |
| // 현 페이지 검색 결과 | |
| unset($query['group'], $query['order'], $query['limit']); | |
| $strCntSQL = 'SELECT COUNT(DISTINCT og.orderNo) AS cnt FROM ' . DB_ORDER . ' AS o ' . gd_implode(' ', $query); | |
| $total = $this->db->secondary()->query_fetch($strCntSQL, $arrBind, false)['cnt']; | |
| // 검색 레코드 수 | |
| $page->recode['total'] = $total; | |
| $page->setPage(); | |
| // 결제방법 과 처리 상태 설정 | |
| if (gd_isset($data)) { | |
| foreach ($data as $key => $val) { | |
| $useMultiShippingKey = false; | |
| if (\Component\Order\OrderMultiShipping::isUseMultiShipping()) { | |
| $useMultiShippingKey = true; | |
| } | |
| $val['goods'] = $this->getOrderGoodsData($val['orderNo'], null, null, null, null, false, false, null, null, false, $useMultiShippingKey); | |
| $val['orderInfo'] = $this->getOrderInfo($val['orderNo'], false); | |
| $val['orderGoodsCnt'] = gd_isset(gd_count($val['goods']), 0); | |
| $val['settleName'] = $this->getSettleKind($val['settleKind']); | |
| // 멀티상점 환율 기본 정보 | |
| if (Globals::get('gGlobal.isFront')) { | |
| $val['currencyPolicy'] = json_decode($val['currencyPolicy'], true); | |
| $val['exchangeRatePolicy'] = json_decode($val['exchangeRatePolicy'], true); | |
| $val['currencyIsoCode'] = $val['currencyPolicy']['isoCode']; | |
| $val['exchangeRate'] = $val['exchangeRatePolicy']['exchangeRate' . $val['currencyPolicy']['isoCode']]; | |
| } | |
| // 주문상품 loop | |
| if (!empty($val['goods'])) { | |
| foreach ($val['goods'] as $aKey => $aVal) { | |
| $addGoodsCnt = gd_isset($aVal['addGoodsCnt'], 0); | |
| //상품혜택 사용시 해당 변수 재설정 | |
| $val['goods'][$aKey] = $goodsBenefit->goodsDataFrontReplaceCode($aVal, 'mypage'); | |
| // 리스트에서 각 모드별로 불필요한 row를 제거 | |
| switch ($statusMode) { | |
| case 'order': | |
| if (gd_in_array(substr($aVal['orderStatus'], 0, 1), $this->statusExcludeCd)) { | |
| $val['orderGoodsCnt'] -= 1; | |
| unset($val['goods'][$aKey]); | |
| } else { | |
| $val['orderAddGoodsCnt'] += $addGoodsCnt; | |
| } | |
| break; | |
| case 'cancel': | |
| $includeOrderGoods = false; | |
| if (gd_in_array(substr($aVal['orderStatus'], 0, 1), $statusExcludeCd)) { | |
| $includeOrderGoods = true; | |
| } | |
| if ((int)$aVal['handleSno'] > 0) { | |
| $includeOrderGoods = true; | |
| } | |
| if ($includeOrderGoods) { | |
| $val['orderAddGoodsCnt'] += $addGoodsCnt; | |
| $val['goods'][$aKey]['orderInfoRow'] = 1; | |
| } | |
| else { | |
| $val['orderGoodsCnt'] -= 1; | |
| unset($val['goods'][$aKey]); | |
| } | |
| break; | |
| case 'cancelRequest': | |
| if ($aVal['userHandleSno'] <= 0 || gd_in_array(substr($aVal['orderStatus'], 0, 1), $this->statusClaimCode['r']) || gd_in_array(substr($aVal['orderStatus'], 0, 1), $statusUserClaimRequestCode)) { | |
| $val['orderGoodsCnt'] -= 1; | |
| unset($val['goods'][$aKey]); | |
| } else { | |
| $val['orderAddGoodsCnt'] += $addGoodsCnt; | |
| $val['goods'][$aKey]['orderInfoRow'] = 1; | |
| } | |
| break; | |
| case 'refund': | |
| if (!gd_in_array(substr($aVal['orderStatus'], 0, 1), ['r'])) { | |
| $val['orderGoodsCnt'] -= 1; | |
| unset($val['goods'][$aKey]); | |
| } else { | |
| $val['orderAddGoodsCnt'] += $addGoodsCnt; | |
| $val['goods'][$aKey]['orderInfoRow'] = 1; | |
| } | |
| break; | |
| case 'refundRequest': | |
| if ($aVal['userHandleSno'] <= 0 || gd_in_array(substr($aVal['orderStatus'], 0, 1), ['r'])) { | |
| $val['orderGoodsCnt'] -= 1; | |
| unset($val['goods'][$aKey]); | |
| } else { | |
| $val['orderAddGoodsCnt'] += $addGoodsCnt; | |
| $val['goods'][$aKey]['orderInfoRow'] = 1; | |
| } | |
| break; | |
| } | |
| } | |
| } | |
| // 데이터 재가공 | |
| $data[$key] = $val; | |
| } | |
| } | |
| // 배열 인덱스 정리 | |
| foreach ($data as $key => $val) { | |
| $data[$key]['goods'] = gd_array_values($data[$key]['goods']); | |
| } | |
| return gd_htmlspecialchars_stripslashes($data); | |
| } | |
| } | |
변경 전OrderAdmin.php
| use Vendor\Spreadsheet\Excel\Reader as SpreadsheetExcelReader; | |
| use Component\Page\Page; | |
| use Origin\Traits\Logger\CommonLogStorageTrait; | |
| /** | |
| * 주문 class | |
| $cancelOrderGenerator->rewind(); | |
| while ($cancelOrderGenerator->valid()) { | |
| $data = $cancelOrderGenerator->current(); | |
| if ($data['orderChannelFl'] === 'etc' || $data['orderStatus'] !== 'o') { | |
| continue; | |
| } | |
| $this->targetOrderGoodsNoArr[$data['orderNo']][$data['sno']] = $data['goodsCnt']; | |
| $this->targetOrderGoodsNo[$data['orderNo']][] = $data['sno']; | |
| $cancelOrderGenerator->next(); | |
| } | |
| } | |
| ); | |
| foreach ($this->targetOrderGoodsNoArr as $orderNo => $orderGoodsNoArr) { | |
| $orderData = $this->getOrderView($orderNo); | |
| $isVBank = gd_in_array($orderData['settleKind'], $vBankSettleKinds); | |
| $cancelMsg = [ | |
| 'orderStatus' => 'c1', | |
| 'handleDetailReason' => sprintf( | |
| __($isVBank ? '[가상계좌]주문 후 %s일 이상되어 취소 처리' | |
| : '[무통장입금]주문 후 %s일 이상되어 취소 처리') | |
| , $isVBank ? $vBankDay | |
| : $autoCancel | |
| ), | |
| ]; | |
| try { | |
| $this->db->begin_tran(); | |
| switch ($orderData['orderChannelFl']) { | |
| case 'naverpay': | |
| unset($tmpWhere); | |
| } | |
| // 주문상태 정렬 예외 케이스 처리 | |
| if ($searchData['sort'] == 'og.orderStatus asc') { | |
| $searchData['sort'] = 'case LEFT(og.orderStatus, 1) when \'o\' then \'1\' when \'p\' then \'2\' when \'g\' then \'3\' when \'d\' then \'4\' when \'s\' then \'5\' when \'e\' then \'6\' when \'b\' then \'7\' when \'r\' then \'8\' when \'c\' then \'9\' when \'f\' then \'10\' else \'11\' end'; | |
| } elseif ($searchData['sort'] == 'og.orderStatus desc') { | |
| $searchData['sort'] = 'case LEFT(og.orderStatus, 1) when \'f\' then \'1\' when \'c\' then \'2\' when \'r\' then \'3\' when \'b\' then \'4\' when \'e\' then \'5\' when \'s\' then \'6\' when \'d\' then \'7\' when \'g\' then \'8\' when \'p\' then \'9\' when \'o\' then \'10\' else \'11\' end'; | |
| } | |
| // 정렬 설정 | |
| if ($orderType === 'goods') { | |
| $orderSort = gd_isset($searchData['sort'], $this->orderGoodsMultiShippingOrderBy); | |
| } | |
| else { | |
| $orderSort = gd_isset($searchData['sort'], $this->orderGoodsOrderBy); | |
| } | |
| if ($orderType === 'goods') { | |
| if (!preg_match("/orderInfoCd/", $orderSort)) { | |
| $orderSort = $orderSort . ", oi.orderInfoCd asc"; | |
| } | |
| } | |
변경 후OrderAdmin.php
| use Vendor\Spreadsheet\Excel\Reader as SpreadsheetExcelReader; | |
| use Component\Page\Page; | |
| use Origin\Traits\Logger\CommonLogStorageTrait; | |
| use Component\Excel\ExcelOrderSort; | |
| /** | |
| * 주문 class | |
| $cancelOrderGenerator->rewind(); | |
| while ($cancelOrderGenerator->valid()) { | |
| $data = $cancelOrderGenerator->current(); | |
| $cancelOrderGenerator->next(); | |
| if ($data['orderChannelFl'] === 'etc' || $data['orderStatus'] !== 'o') { | |
| continue; | |
| } | |
| $this->targetOrderGoodsNoArr[$data['orderNo']][$data['sno']] = $data['goodsCnt']; | |
| $this->targetOrderGoodsNo[$data['orderNo']][] = $data['sno']; | |
| } | |
| } | |
| ); | |
| foreach ($this->targetOrderGoodsNoArr as $orderNo => $orderGoodsNoArr) { | |
| try { | |
| $orderData = $this->getOrderView($orderNo); | |
| if (empty($orderData)) { | |
| \Logger::channel('scheduler')->warning('[autoCancelJob] 주문 정보 없음 - 건너뜀', ["orderNo" => $orderNo]); | |
| // 처리 결과에 따른 로그 (실패) | |
| $this->autoOrderCancelLog($orderNo, key($orderGoodsNoArr), false, '주문 정보 없음'); | |
| continue; | |
| } | |
| $isVBank = gd_in_array($orderData['settleKind'], $vBankSettleKinds); | |
| $cancelMsg = [ | |
| 'orderStatus' => 'c1', | |
| 'handleDetailReason' => sprintf( | |
| __($isVBank ? '[가상계좌]주문 후 %s일 이상되어 취소 처리' | |
| : '[무통장입금]주문 후 %s일 이상되어 취소 처리') | |
| , $isVBank ? $vBankDay | |
| : $autoCancel | |
| ), | |
| ]; | |
| $this->db->begin_tran(); | |
| switch ($orderData['orderChannelFl']) { | |
| case 'naverpay': | |
| unset($tmpWhere); | |
| } | |
| // 정렬 설정 | |
| if (!empty($searchData['sort'])) { | |
| $orderSort = \App::getInstance(ExcelOrderSort::class)->resolve($searchData['sort']); | |
| } elseif ($this->isUseMultiShipping === true) { | |
| $orderSort = $this->orderGoodsMultiShippingOrderBy; | |
| } else { | |
| $orderSort = $this->orderGoodsOrderBy; | |
| } | |
| // 복수배송지 사용시 배송지별 묶음 | |
| if ($this->isUseMultiShipping === true) { | |
| if (!preg_match('/orderInfoCd/', $orderSort)) { | |
| $orderSort = $orderSort . ', oi.orderInfoCd asc'; | |
| } | |
| } | |
변경 전OrderAdminNew.php
| use Session; | |
| use Component\Page\Page; | |
| use Origin\Traits\Logger\CommonLogStorageTrait; | |
| /** | |
| * 주문 class | |
| $cancelOrderGenerator->rewind(); | |
| while ($cancelOrderGenerator->valid()) { | |
| $data = $cancelOrderGenerator->current(); | |
| if ($data['orderChannelFl'] === 'etc' || $data['orderStatus'] !== 'o') { | |
| continue; | |
| } | |
| $this->targetOrderGoodsNoArr[$data['orderNo']][$data['sno']] = $data['goodsCnt']; | |
| $this->targetOrderGoodsNo[$data['orderNo']][] = $data['sno']; | |
| $cancelOrderGenerator->next(); | |
| } | |
| } | |
| ); | |
| foreach ($this->targetOrderGoodsNoArr as $orderNo => $orderGoodsNoArr) { | |
| $orderData = $this->getOrderView($orderNo); | |
| $isVBank = gd_in_array($orderData['settleKind'], $vBankSettleKinds); | |
| $cancelMsg = [ | |
| 'orderStatus' => 'c1', | |
| 'handleDetailReason' => sprintf( | |
| __($isVBank ? '[가상계좌]주문 후 %s일 이상되어 취소 처리' | |
| : '[무통장입금]주문 후 %s일 이상되어 취소 처리') | |
| , $isVBank ? $vBankDay | |
| : $autoCancel | |
| ), | |
| ]; | |
| try { | |
| $this->db->begin_tran(); | |
| switch ($orderData['orderChannelFl']) { | |
| case 'naverpay': | |
| unset($tmpWhere); | |
| } | |
| // 주문상태 정렬 예외 케이스 처리 | |
| if ($searchData['sort'] == 'og.orderStatus asc') { | |
| $searchData['sort'] = 'case LEFT(og.orderStatus, 1) when \'o\' then \'1\' when \'p\' then \'2\' when \'g\' then \'3\' when \'d\' then \'4\' when \'s\' then \'5\' when \'e\' then \'6\' when \'b\' then \'7\' when \'r\' then \'8\' when \'c\' then \'9\' when \'f\' then \'10\' else \'11\' end'; | |
| } elseif ($searchData['sort'] == 'og.orderStatus desc') { | |
| $searchData['sort'] = 'case LEFT(og.orderStatus, 1) when \'f\' then \'1\' when \'c\' then \'2\' when \'r\' then \'3\' when \'b\' then \'4\' when \'e\' then \'5\' when \'s\' then \'6\' when \'d\' then \'7\' when \'g\' then \'8\' when \'p\' then \'9\' when \'o\' then \'10\' else \'11\' end'; | |
| } | |
| // 정렬 설정 | |
| if($orderType === 'goods'){ | |
| $orderSort = gd_isset($searchData['sort'], $this->orderGoodsMultiShippingOrderBy); | |
| } | |
| else { | |
| $orderSort = gd_isset($searchData['sort'], $this->orderGoodsOrderBy); | |
| } | |
| if($orderType === 'goods'){ | |
| if(!preg_match("/orderInfoCd/", $orderSort)){ | |
| $orderSort = $orderSort . ", oi.orderInfoCd asc"; | |
| } | |
| } | |
변경 후OrderAdminNew.php
| use Session; | |
| use Component\Page\Page; | |
| use Origin\Traits\Logger\CommonLogStorageTrait; | |
| use Component\Excel\ExcelOrderSort; | |
| /** | |
| * 주문 class | |
| $cancelOrderGenerator->rewind(); | |
| while ($cancelOrderGenerator->valid()) { | |
| $data = $cancelOrderGenerator->current(); | |
| $cancelOrderGenerator->next(); | |
| if ($data['orderChannelFl'] === 'etc' || $data['orderStatus'] !== 'o') { | |
| continue; | |
| } | |
| $this->targetOrderGoodsNoArr[$data['orderNo']][$data['sno']] = $data['goodsCnt']; | |
| $this->targetOrderGoodsNo[$data['orderNo']][] = $data['sno']; | |
| } | |
| } | |
| ); | |
| foreach ($this->targetOrderGoodsNoArr as $orderNo => $orderGoodsNoArr) { | |
| try { | |
| $orderData = $this->getOrderView($orderNo); | |
| if (empty($orderData)) { | |
| \Logger::channel('scheduler')->warning('[autoCancelJob] 주문 정보 없음 - 건너뜀', ["orderNo" => $orderNo]); | |
| // 처리 결과에 따른 로그 (실패) | |
| $this->autoOrderCancelLog($orderNo, key($orderGoodsNoArr), false, '주문 정보 없음'); | |
| continue; | |
| } | |
| $isVBank = in_array($orderData['settleKind'], $vBankSettleKinds); | |
| $cancelMsg = [ | |
| 'orderStatus' => 'c1', | |
| 'handleDetailReason' => sprintf( | |
| __($isVBank ? '[가상계좌]주문 후 %s일 이상되어 취소 처리' | |
| : '[무통장입금]주문 후 %s일 이상되어 취소 처리') | |
| , $isVBank ? $vBankDay | |
| : $autoCancel | |
| ), | |
| ]; | |
| $this->db->begin_tran(); | |
| switch ($orderData['orderChannelFl']) { | |
| case 'naverpay': | |
| unset($tmpWhere); | |
| } | |
| // 정렬 설정 | |
| if (!empty($searchData['sort'])) { | |
| $orderSort = \App::getInstance(ExcelOrderSort::class)->resolve($searchData['sort']); | |
| } elseif ($this->isUseMultiShipping === true) { | |
| $orderSort = $this->orderGoodsMultiShippingOrderBy; | |
| } else { | |
| $orderSort = $this->orderGoodsOrderBy; | |
| } | |
| // 복수배송지 사용시 배송지별 묶음 | |
| if ($this->isUseMultiShipping === true) { | |
| if (!preg_match('/orderInfoCd/', $orderSort)) { | |
| $orderSort = $orderSort . ', oi.orderInfoCd asc'; | |
| } | |
| } | |
변경 전OrderNew.php
| * @todo 쿼리 리팩 필요 (현재 ORDER리스트를 가져온 후 별도로 ORDER_GOODS를 바인딩 처리) | |
| * | |
| * @param int $pageNum 페이지당 출력할 갯수 | |
| * @param null $dates 시작날짜와 끝날짜의 배열 | |
| * @param boolean $statusMode 취소상태 표기 여부 | |
| * | |
| * @return string | |
| throw new Exception(__('재고 부족으로 구매가 불가능합니다')); | |
| } | |
| } | |
변경 후OrderNew.php
| * @todo 쿼리 리팩 필요 (현재 ORDER리스트를 가져온 후 별도로 ORDER_GOODS를 바인딩 처리) | |
| * | |
| * @param int $pageNum 페이지당 출력할 갯수 | |
| * @param null $dates 시작날짜와 끝날짜의 배열 | |
| * @param boolean $statusMode 취소상태 표기 여부 | |
| * | |
| * @return string | |
| throw new Exception(__('재고 부족으로 구매가 불가능합니다')); | |
| } | |
| /** | |
| * 마이페이지 > 주문리스트(재구매용)에서 사용하며, 회원/비회원 데이터를 모두 출력함 | |
| * @see \Bundle\Component\Order\OrderNew::getOrderList() 기반 키워드 검색 추가 | |
| * | |
| * @param int $pageNum 페이지당 출력할 갯수 | |
| * @param array|null $dates 시작날짜와 끝날짜의 배열 | |
| * @param string|null $statusMode 취소상태 표기 여부 | |
| * @param string|null $searchKey 검색 항목 | |
| * @param string|null $searchKeyword 검색어 | |
| * | |
| * @return string | |
| * @throws AlertRedirectException | |
| */ | |
| public function getOrderListBySearchKeyword($pageNum = 10, $dates = null, $statusMode = null, $searchKey = null, $searchKeyword = null) | |
| { | |
| // 배열 선언 | |
| $arrBind = $arrWhere = []; | |
| // 상품혜택관리 치환코드 생성 | |
| $goodsBenefit = \App::load('\\Component\\Goods\\GoodsBenefit'); | |
| // 회원 or 비회원 패스워드 체크 | |
| if (MemberUtil::checkLogin() == 'member') { | |
| $arrWhere[] = 'o.memNo = ?'; | |
| $this->db->bind_param_push($arrBind, 'i', Session::get('member.memNo')); | |
| } else { | |
| throw new AlertRedirectException(__('로그인 정보가 존재하지 않습니다.'), null, null, '../member/login.php'); | |
| } | |
| // 기간 설정 | |
| if (null === $dates || !is_array($dates) || $dates[0] == '' || $dates[1] == '') { | |
| $dates = [date('Y-m-d', strtotime('-365 days')), date('Y-m-d')]; | |
| } | |
| $arrWhere[] = 'o.regDt BETWEEN ? AND ?'; | |
| $this->db->bind_param_push($arrBind, 's', $dates[0] . ' 00:00:00'); | |
| $this->db->bind_param_push($arrBind, 's', $dates[1] . ' 23:59:59'); | |
| // 주문 테이블 필드 | |
| $arrInclude = [ | |
| 'orderNo', | |
| 'orderChannelFl', | |
| 'settlePrice', | |
| 'settleKind', | |
| 'orderGoodsCnt', | |
| 'orderTypeFl', | |
| 'multiShippingFl' | |
| ]; | |
| if (Globals::get('gGlobal.isFront')) { | |
| array_push($arrInclude, 'currencyPolicy', 'exchangeRatePolicy'); | |
| } | |
| $tmpField[] = DBTableField::setTableField('tableOrder', $arrInclude, null, 'o'); | |
| // 조인 | |
| $arrJoin[] = ' LEFT JOIN ' . DB_ORDER_GOODS . ' og ON o.orderNo = og.orderNo '; | |
| // 결제실패를 제외하고 전부 출력 | |
| $arrWhere[] = 'og.orderStatus != ?'; | |
| $this->db->bind_param_push($arrBind, 's', 'f1'); | |
| if (!empty($searchKey) && !empty($searchKeyword)) { | |
| $allowedSearchKeys = ['orderNo', 'goodsNm', 'goodsNo']; | |
| if (!in_array($searchKey, $allowedSearchKeys)) { | |
| throw new Exception(__('유효하지 않은 검색 항목입니다.')); | |
| } | |
| $arrWhere[] = 'og.' . $searchKey . ' LIKE ?'; | |
| $this->db->bind_param_push($arrBind, 's', '%' . $searchKeyword . '%'); | |
| } | |
| // 주문 or 취소 리스트 조건 | |
| switch ($statusMode) { | |
| // 주문관련 리스트만 | |
| case 'order': | |
| $tmpField[] = DBTableField::setTableField('tableOrderUserHandle', ['userHandleFl'], null, 'ouh'); | |
| $arrJoin[] = ' LEFT JOIN ' . DB_ORDER_USER_HANDLE . ' ouh ON og.userHandleSno = ouh.sno AND og.orderNo = ouh.orderNo '; | |
| $arrWhere[] = 'og.handleSno<=0 AND LEFT(og.orderStatus, 1) NOT IN (\'' . gd_implode('\',\'', $this->statusExcludeCd) . '\')'; | |
| break; | |
| // 기본 프로퍼티에서 반품(r) 제거 | |
| case 'cancel': | |
| $statusExcludeCd = []; | |
| foreach ($this->statusExcludeCd as $key => $val) { | |
| if ($val != 'r') { | |
| $statusExcludeCd[$key] = $val; | |
| } | |
| } | |
| $tmpField[] = DBTableField::setTableField('tableOrderGoods', ['handleSno'], null, 'og'); | |
| $arrWhere[] = '((og.handleSno > 0) OR (LEFT(og.orderStatus, 1) IN (\'' . gd_implode('\',\'', $statusExcludeCd) . '\')))'; | |
| break; | |
| // 교환, 반품 신청 및 거절 상태 | |
| case 'cancelRequest': | |
| // 사용자 클레임 승인 코드에서 승인(y) 제거 | |
| $statusClaimHandleCode = []; | |
| foreach ($this->statusClaimHandleCode as $key => $val) { | |
| if ($val != 'y') { | |
| $statusClaimHandleCode[$key] = $val; | |
| } | |
| } | |
| // 사용자 클레임 신청 코드에서 환불(r) 제거 | |
| $statusUserClaimRequestCode = []; | |
| foreach ($this->statusUserClaimRequestCode as $key => $val) { | |
| if ($val != 'r') { | |
| $statusUserClaimRequestCode[$key] = $val; | |
| } | |
| } | |
| $tmpField[] = DBTableField::setTableField('tableOrderUserHandle', ['userHandleFl'], null, 'ouh'); | |
| $arrJoin[] = ' LEFT JOIN ' . DB_ORDER_USER_HANDLE . ' ouh ON og.orderNo = ouh.orderNo AND (og.userHandleSno = ouh.sno || (og.sno = ouh.userHandleGoodsNo && left(og.orderStatus, 1) NOT IN (\'' . gd_implode('\',\'', $statusUserClaimRequestCode) . '\')))'; | |
| $arrWhere[] = 'ouh.userHandleFl IN (\'' . gd_implode('\',\'', $statusClaimHandleCode) . '\') AND ouh.userHandleMode IN (\'' . gd_implode('\',\'', $statusUserClaimRequestCode) . '\') AND LEFT(og.orderStatus, 1) IN (\'' . gd_implode('\',\'', $this->statusClaimCode['b']) . '\')'; | |
| break; | |
| // 반품만 | |
| case 'refund': | |
| $arrJoin[] = ' LEFT JOIN ' . DB_ORDER_USER_HANDLE . ' ouh ON og.userHandleSno = ouh.sno AND og.orderNo = ouh.orderNo AND ouh.userHandleFl = \'y\''; | |
| $arrWhere[] = 'LEFT(og.orderStatus, 1) IN (\'r\')'; | |
| break; | |
| // 환불 신청 및 거절 상태 | |
| case 'refundRequest': | |
| // 사용자 클레임 승인 코드에서 승인(y) 제거 | |
| $statusClaimHandleCode = []; | |
| foreach ($this->statusClaimHandleCode as $key => $val) { | |
| if ($val != 'y') { | |
| $statusClaimHandleCode[$key] = $val; | |
| } | |
| } | |
| // 사용자 클레임 신청 코드에서 반품, 교환(b, e) 제거 | |
| $statusUserClaimRequestCode = []; | |
| foreach ($this->statusUserClaimRequestCode as $key => $val) { | |
| if ($val != 'b' && $val != 'e') { | |
| $statusUserClaimRequestCode[$key] = $val; | |
| } | |
| } | |
| $tmpField[] = DBTableField::setTableField('tableOrderUserHandle', ['userHandleFl'], null, 'ouh'); | |
| $arrJoin[] = ' LEFT JOIN ' . DB_ORDER_USER_HANDLE . ' ouh ON og.orderNo = ouh.orderNo AND (og.userHandleSno = ouh.sno || (og.sno = ouh.userHandleGoodsNo && left(og.orderStatus, 1) NOT IN (\'' . gd_implode('\',\'', $statusUserClaimRequestCode) . '\')))'; | |
| $arrWhere[] = 'ouh.userHandleFl IN (\'' . gd_implode('\',\'', $statusClaimHandleCode) . '\') AND ouh.userHandleMode IN (\'' . gd_implode('\',\'', $statusUserClaimRequestCode) . '\') AND LEFT(og.orderStatus, 1) IN (\'' . gd_implode('\',\'', $this->statusReceiptApprovalPossible) . '\')'; | |
| break; | |
| // 모바일 프론트에서 사용 | |
| case 'mobile': | |
| break; | |
| } | |
| // 필드 정리 | |
| $tmpKey = gd_array_keys($tmpField); | |
| $arrField = []; | |
| foreach ($tmpKey as $key) { | |
| $arrField = gd_array_merge($arrField, $tmpField[$key]); | |
| } | |
| unset($tmpField, $tmpKey); | |
| // 페이지 기본설정 | |
| $pageNo = Request::get()->get('page', 1); | |
| $page = \App::load('\\Component\\Page\\Page', $pageNo); | |
| $page->page['list'] = $pageNum; // 페이지당 리스트 수 | |
| $page->block['cnt'] = 5; | |
| $page->setPage(); | |
| $page->setUrl(Request::getQueryString()); | |
| // 현 페이지 결과 | |
| $this->db->strJoin = gd_implode('', $arrJoin); | |
| $this->db->strField = gd_implode(', ', $arrField) . ', o.regDt'; | |
| $this->db->strWhere = gd_implode(' AND ', gd_isset($arrWhere)); | |
| $this->db->strOrder = 'og.orderNo desc'; | |
| $this->db->strLimit = $page->recode['start'] . ',' . $pageNum; | |
| $this->db->strGroup = 'og.orderNo'; | |
| if (empty($arrBind)) { | |
| $arrBind = null; | |
| } | |
| $query = $this->db->query_complete(); | |
| $strSQL = 'SELECT ' . array_shift($query) . ' FROM ' . DB_ORDER . ' o ' . gd_implode(' ', $query); | |
| $data = $this->db->query_fetch($strSQL, $arrBind); | |
| // 현 페이지 검색 결과 | |
| unset($query['group'], $query['order'], $query['limit']); | |
| $strCntSQL = 'SELECT COUNT(DISTINCT og.orderNo) AS cnt FROM ' . DB_ORDER . ' AS o ' . gd_implode(' ', $query); | |
| $total = $this->db->query_fetch($strCntSQL, $arrBind, false)['cnt']; | |
| // 검색 레코드 수 | |
| $page->recode['total'] = $total; | |
| $page->setPage(); | |
| // 결제방법 과 처리 상태 설정 | |
| if (gd_isset($data)) { | |
| foreach ($data as $key => $val) { | |
| $useMultiShippingKey = false; | |
| if (\Component\Order\OrderMultiShipping::isUseMultiShipping()) { | |
| $useMultiShippingKey = true; | |
| } | |
| $val['goods'] = $this->getOrderGoodsData($val['orderNo'], null, null, null, null, false, false, null, null, false, $useMultiShippingKey); | |
| $val['orderInfo'] = $this->getOrderInfo($val['orderNo'], false); | |
| $val['orderGoodsCnt'] = gd_isset(gd_count($val['goods']), 0); | |
| $val['settleName'] = $this->getSettleKind($val['settleKind']); | |
| // 멀티상점 환율 기본 정보 | |
| if (Globals::get('gGlobal.isFront')) { | |
| $val['currencyPolicy'] = json_decode($val['currencyPolicy'], true); | |
| $val['exchangeRatePolicy'] = json_decode($val['exchangeRatePolicy'], true); | |
| $val['currencyIsoCode'] = $val['currencyPolicy']['isoCode']; | |
| $val['exchangeRate'] = $val['exchangeRatePolicy']['exchangeRate' . $val['currencyPolicy']['isoCode']]; | |
| } | |
| // 주문상품 loop | |
| if (!empty($val['goods'])) { | |
| foreach ($val['goods'] as $aKey => $aVal) { | |
| $addGoodsCnt = gd_isset($aVal['addGoodsCnt'], 0); | |
| //상품혜택 사용시 해당 변수 재설정 | |
| $val['goods'][$aKey] = $goodsBenefit->goodsDataFrontReplaceCode($aVal, 'mypage'); | |
| // 리스트에서 각 모드별로 불필요한 row를 제거 | |
| switch ($statusMode) { | |
| case 'order': | |
| if (gd_in_array(substr($aVal['orderStatus'], 0, 1), $this->statusExcludeCd)) { | |
| $val['orderGoodsCnt'] -= 1; | |
| unset($val['goods'][$aKey]); | |
| } else { | |
| $val['orderAddGoodsCnt'] += $addGoodsCnt; | |
| } | |
| break; | |
| case 'cancel': | |
| $includeOrderGoods = false; | |
| if (gd_in_array(substr($aVal['orderStatus'], 0, 1), $statusExcludeCd)) { | |
| $includeOrderGoods = true; | |
| } | |
| if ((int)$aVal['handleSno'] > 0) { | |
| $includeOrderGoods = true; | |
| } | |
| if ($includeOrderGoods) { | |
| $val['orderAddGoodsCnt'] += $addGoodsCnt; | |
| $val['goods'][$aKey]['orderInfoRow'] = 1; | |
| } | |
| else { | |
| $val['orderGoodsCnt'] -= 1; | |
| unset($val['goods'][$aKey]); | |
| } | |
| break; | |
| case 'cancelRequest': | |
| if ($aVal['userHandleSno'] <= 0 || gd_in_array(substr($aVal['orderStatus'], 0, 1), $this->statusClaimCode['r']) || gd_in_array(substr($aVal['orderStatus'], 0, 1), $statusUserClaimRequestCode)) { | |
| $val['orderGoodsCnt'] -= 1; | |
| unset($val['goods'][$aKey]); | |
| } else { | |
| $val['orderAddGoodsCnt'] += $addGoodsCnt; | |
| $val['goods'][$aKey]['orderInfoRow'] = 1; | |
| } | |
| break; | |
| case 'refund': | |
| if (!gd_in_array(substr($aVal['orderStatus'], 0, 1), ['r'])) { | |
| $val['orderGoodsCnt'] -= 1; | |
| unset($val['goods'][$aKey]); | |
| } else { | |
| $val['orderAddGoodsCnt'] += $addGoodsCnt; | |
| $val['goods'][$aKey]['orderInfoRow'] = 1; | |
| } | |
| break; | |
| case 'refundRequest': | |
| if ($aVal['userHandleSno'] <= 0 || gd_in_array(substr($aVal['orderStatus'], 0, 1), ['r'])) { | |
| $val['orderGoodsCnt'] -= 1; | |
| unset($val['goods'][$aKey]); | |
| } else { | |
| $val['orderAddGoodsCnt'] += $addGoodsCnt; | |
| $val['goods'][$aKey]['orderInfoRow'] = 1; | |
| } | |
| break; | |
| } | |
| } | |
| } | |
| // 데이터 재가공 | |
| $data[$key] = $val; | |
| } | |
| } | |
| // 배열 인덱스 정리 | |
| foreach ($data as $key => $val) { | |
| $data[$key]['goods'] = gd_array_values($data[$key]['goods']); | |
| } | |
| return gd_htmlspecialchars_stripslashes($data); | |
| } | |
| } | |
변경 전PasswordException.php
| $message .= '<br/>[마이페이지 > 쇼핑몰관리]와 SMS 설정 페이지에서 SMS 인증번호 변경 후 다시 시도해주세요.'; | |
| break; | |
| case self::INVALID_PASSWORD: | |
| $message = 'SMS 인증번호가 일치하지 않습니다.<br/>[마이페이지 > 쇼핑몰관리]에서 SMS 인증번호를 확인해주세요.'; | |
| break; | |
| case self::LIMIT_PASSWORD: | |
| $message = '마이페이지와 쇼핑몰 관리자의 SMS 인증번호가 10회 이상 틀려, SMS를 발송할 수 없습니다.<br/>SMS 설정 페이지와 [마이페이지 > 쇼핑몰관리]에서 SMS 인증번호를 확인해주세요.'; | |
변경 후PasswordException.php
| $message .= '<br/>[마이페이지 > 쇼핑몰관리]와 SMS 설정 페이지에서 SMS 인증번호 변경 후 다시 시도해주세요.'; | |
| break; | |
| case self::INVALID_PASSWORD: | |
| $message = '메시지 인증번호가 일치하지 않습니다.<br/>[마이페이지 > 쇼핑몰관리]에서 메시지 인증번호를 확인해주세요.'; | |
| break; | |
| case self::LIMIT_PASSWORD: | |
| $message = '마이페이지와 쇼핑몰 관리자의 SMS 인증번호가 10회 이상 틀려, SMS를 발송할 수 없습니다.<br/>SMS 설정 페이지와 [마이페이지 > 쇼핑몰관리]에서 SMS 인증번호를 확인해주세요.'; | |
변경 전SmsSender.php
| if ($this->smsPoint < $this->getSendPoint() * $this->message->count()) { | |
| $logger = \App::getInstance('logger'); | |
| $logger->info(sprintf('current sms point[%d], send count[%d], message count[%d]', $this->smsPoint, $this->getSendPoint(), $this->message->count())); | |
| throw new SmsPointException(__('SMS 잔여 포인트가 부족 합니다. SMS 포인트 충전하기를 통해 충전 후 발송을 하시기 바랍니다.')); | |
| } | |
| } | |
변경 후SmsSender.php
| if ($this->smsPoint < $this->getSendPoint() * $this->message->count()) { | |
| $logger = \App::getInstance('logger'); | |
| $logger->info(sprintf('current sms point[%d], send count[%d], message count[%d]', $this->smsPoint, $this->getSendPoint(), $this->message->count())); | |
| throw new SmsPointException(__('메시지 잔여 포인트가 부족합니다. 메시지 포인트 충전 후 발송하시기 바랍니다.')); | |
| } | |
| } | |
변경 전BirthDay.php
| * | |
| * @return array|object | |
| */ | |
| public function getTodayBirthDayMember($birthEventFl = true) | |
| { | |
| // 2월29일이 생일인 사람은 4년마다 만! 생일자 검색이 된다(실 주민번호상 0229 존재). 4년마다 제공 | |
| $arrBind = []; | |
| } | |
| $this->db->strWhere .= ' AND sleepFl=\'n\''; | |
| $this->db->strField = "memNo, groupSno, birthDt, calendarFl, cellPhone, memNm, memId, smsFl"; | |
| $query = $this->db->query_complete(); | |
| $strSQL = 'SELECT ' . array_shift($query) . ' FROM ' . DB_MEMBER . gd_implode(' ', $query); | |
| $todayBirthDayMemberArr = $this->db->query_fetch($strSQL, $arrBind); | |
| unset($arrBind); | |
| * | |
| * @return array | |
| */ | |
| public function getMemberListForBirthDayCoupon() | |
| { | |
| $arrBind = []; | |
| // 생일 쿠폰 발급 기본 값 설정 (당일 발급) | |
| } | |
| $this->db->strWhere .= ' AND sleepFl=\'n\''; | |
| $this->db->strField = "memNo, groupSno, birthDt, calendarFl, cellPhone, memNm, memId, smsFl"; | |
| $query = $this->db->query_complete(); | |
| $strSQL = 'SELECT ' . array_shift($query) . ' FROM ' . DB_MEMBER . gd_implode(' ', $query); | |
| $memberList = $this->db->query_fetch($strSQL, $arrBind); | |
| unset($arrBind); | |
변경 후BirthDay.php
| * | |
| * @return array|object | |
| */ | |
| public function getTodayBirthDayMember($birthEventFl = true, int $lastMemNo = 0, int $limit = 0) | |
| { | |
| // 2월29일이 생일인 사람은 4년마다 만! 생일자 검색이 된다(실 주민번호상 0229 존재). 4년마다 제공 | |
| $arrBind = []; | |
| } | |
| $this->db->strWhere .= ' AND sleepFl=\'n\''; | |
| if ($lastMemNo > 0) { | |
| $this->db->strWhere .= ' AND memNo > ?'; | |
| $this->db->bind_param_push($arrBind, 'i', $lastMemNo); | |
| } | |
| $this->db->strField = "memNo, groupSno, birthDt, calendarFl, cellPhone, memNm, memId, smsFl"; | |
| $this->db->strOrder = "memNo ASC"; | |
| $query = $this->db->query_complete(); | |
| $strSQL = 'SELECT ' . array_shift($query) . ' FROM ' . DB_MEMBER . gd_implode(' ', $query); | |
| if ($limit > 0) { | |
| $strSQL .= ' LIMIT ' . intval($limit); | |
| } | |
| $todayBirthDayMemberArr = $this->db->query_fetch($strSQL, $arrBind); | |
| unset($arrBind); | |
| * | |
| * @return array | |
| */ | |
| public function getMemberListForBirthDayCoupon(int $lastMemNo = 0, int $limit = 0) | |
| { | |
| $arrBind = []; | |
| // 생일 쿠폰 발급 기본 값 설정 (당일 발급) | |
| } | |
| $this->db->strWhere .= ' AND sleepFl=\'n\''; | |
| if ($lastMemNo > 0) { | |
| $this->db->strWhere .= ' AND memNo > ?'; | |
| $this->db->bind_param_push($arrBind, 'i', $lastMemNo); | |
| } | |
| $this->db->strField = "memNo, groupSno, birthDt, calendarFl, cellPhone, memNm, memId, smsFl"; | |
| $this->db->strOrder = "memNo ASC"; | |
| $query = $this->db->query_complete(); | |
| $strSQL = 'SELECT ' . array_shift($query) . ' FROM ' . DB_MEMBER . gd_implode(' ', $query); | |
| if ($limit > 0) { | |
| $strSQL .= ' LIMIT ' . $limit; | |
| } | |
| $memberList = $this->db->query_fetch($strSQL, $arrBind); | |
| unset($arrBind); | |
변경 전IndexController.php
| $this->setData('isStandard', $globals->get('gLicense.ecCode') === 'rental_mxfree_season'); | |
| $this->setData('storageGuideUrl', ExternalUrl::GUIDE_MANAGE_STORAGE->getUrl()); | |
| // 개발서버인 경우 가이드 팝업 표시 여부 | |
| $this->setData('isDevShop', $globals->get('gLicense.isDevShop')); | |
| $this->getView()->setPageName('base/index.php'); | |
| } | |
| } | |
변경 후IndexController.php
| $this->setData('isStandard', $globals->get('gLicense.ecCode') === 'rental_mxfree_season'); | |
| $this->setData('storageGuideUrl', ExternalUrl::GUIDE_MANAGE_STORAGE->getUrl()); | |
| $this->getView()->setPageName('base/index.php'); | |
| } | |
| } | |
변경 전LayerScreenSecurityController.php
| $securitySelect[$type] = __('휴대폰'); | |
| break; | |
| case 'smsChangeEmailSend' : | |
| throw new LayerException(__('잔여 SMS포인트가 부족하여 이메일로 인증을 진행합니다.'), null, null, null, 1000, true); | |
| case 'emailSend': | |
| $emailArr = explode('@', $managerInfo['email']); | |
변경 후LayerScreenSecurityController.php
| $securitySelect[$type] = __('휴대폰'); | |
| break; | |
| case 'smsChangeEmailSend' : | |
| throw new LayerException(__('메시지 포인트가 소진되어 인증수단이 이메일로 자동 전환됩니다.'), null, null, null, 1000, true); | |
| case 'emailSend': | |
| $emailArr = explode('@', $managerInfo['email']); | |
변경 전LoginController.php
| namespace Bundle\Controller\Admin\Base; | |
| use Component\Member\Manager; | |
| use Origin\Enum\AutoSend\AutoSendSupport; | |
| use Origin\Service\Member\ManagerLoginService; | |
| use Origin\Service\Member\ManagerService; | |
| if (str_replace('/', '', strrchr(dirname(Request::getReferer()), '/')) && pathinfo(Request::getReferer())['filename'] != 'login_ps') { | |
| $adminMenu = \App::load('\\Component\\Admin\\AdminMenu'); | |
| if ($adminMenu->getAdminMenuUrl(pathinfo(Request::getReferer())['filename'].".php") || $adminMenu->getAdminMenuUrl(pathinfo(Request::getReferer())['basename'])) { | |
| $this->setData('returnUrl', Request::getReferer()); | |
| } | |
| } | |
변경 후LoginController.php
| namespace Bundle\Controller\Admin\Base; | |
| use Component\Member\Manager; | |
| use Framework\Utility\StringUtils; | |
| use Origin\Enum\AutoSend\AutoSendSupport; | |
| use Origin\Service\Member\ManagerLoginService; | |
| use Origin\Service\Member\ManagerService; | |
| if (str_replace('/', '', strrchr(dirname(Request::getReferer()), '/')) && pathinfo(Request::getReferer())['filename'] != 'login_ps') { | |
| $adminMenu = \App::load('\\Component\\Admin\\AdminMenu'); | |
| if ($adminMenu->getAdminMenuUrl(pathinfo(Request::getReferer())['filename'].".php") || $adminMenu->getAdminMenuUrl(pathinfo(Request::getReferer())['basename'])) { | |
| $this->setData('returnUrl', StringUtils::htmlSpecialChars(Request::getReferer() ?? '')); | |
| } | |
| } | |
변경 전LoginPsController.php
| }; | |
| if ($isValidAuth()) { | |
| $manager->afterManagerLogin($managerInfo); | |
| $funcLoginPostHandler(); | |
| // 공급사/본사 여부에 따른 페이지 이동 처리 | |
| if ($request->post()->has('returnUrl') && $request->post()->get('returnUrl')) { | |
| // 라이센스 갱신 필요하면 갱신되는 base/index.php 로 이동 | |
| /** @var LicenseRenewService $licenseRenewService */ | |
| $licenseRenewService = \App::getInstance(LicenseRenewService::class); | |
| $returnUrl = $licenseRenewService->needBasicLicenseRenew() ? URI_ADMIN . 'base/index.php' : $request->post()->get('returnUrl'); | |
| } elseif (Manager::isProvider()) { | |
| $returnUrl = URI_ADMIN . 'provider/index.php'; | |
| } else { | |
| $script .= ' else {parent.godo.layer.auth_login();}'; | |
| $this->js($script); | |
| } else { | |
| $manager->afterManagerLogin($managerInfo); | |
| $funcLoginPostHandler(); | |
| // 공급사/본사 여부에 따른 페이지 이동 처리 | |
| if ($request->post()->has('returnUrl') && $request->post()->get('returnUrl')) { | |
| // 라이센스 갱신 필요하면 갱신되는 base/index.php 로 이동 | |
| /** @var LicenseRenewService $licenseRenewService */ | |
| $licenseRenewService = \App::getInstance(LicenseRenewService::class); | |
| $returnUrl = $licenseRenewService->needBasicLicenseRenew() ? URI_ADMIN . 'base/index.php' : $request->post()->get('returnUrl'); | |
| } elseif (Manager::isProvider()) { | |
| $returnUrl = URI_ADMIN . 'provider/index.php'; | |
| } else { | |
| $managerLoginService->afterManagerLogin($tmpManager, $commerceTokenDTO); | |
| } else { | |
| // 보안 로그인 인증 완료 후, 관리자 일반 로그인 | |
| if (array_key_exists('csSno', $tmpManager)) { | |
| $manager = \App::load(ManagerCs::class); | |
| } else { | |
| // 공급사/본사 여부에 따른 페이지 이동 처리 | |
| if ($request->post()->has('returnUrl') && $request->post()->get('returnUrl')) { | |
| $returnUrl = $request->post()->get('returnUrl'); | |
| } elseif (Manager::isProvider()) { | |
| $returnUrl = URI_ADMIN . 'provider/index.php'; | |
| } else { | |
변경 후LoginPsController.php
| }; | |
| if ($isValidAuth()) { | |
| /** @var LicenseRenewService $licenseRenewService */ | |
| $licenseRenewService = \App::getInstance(LicenseRenewService::class); | |
| $licenseRenewService->renewStagingLicense(); | |
| $manager->afterManagerLogin($managerInfo); | |
| $funcLoginPostHandler(); | |
| // 공급사/본사 여부에 따른 페이지 이동 처리 | |
| if ($request->post()->has('returnUrl') && $request->post()->get('returnUrl')) { | |
| // 라이센스 갱신 필요하면 갱신되는 base/index.php 로 이동 | |
| $returnUrl = $licenseRenewService->needBasicLicenseRenew() ? URI_ADMIN . 'base/index.php' : StringUtils::xssClean($request->post()->get('returnUrl')); | |
| } elseif (Manager::isProvider()) { | |
| $returnUrl = URI_ADMIN . 'provider/index.php'; | |
| } else { | |
| $script .= ' else {parent.godo.layer.auth_login();}'; | |
| $this->js($script); | |
| } else { | |
| /** @var LicenseRenewService $licenseRenewService */ | |
| $licenseRenewService = \App::getInstance(LicenseRenewService::class); | |
| $licenseRenewService->renewStagingLicense(); | |
| $manager->afterManagerLogin($managerInfo); | |
| $funcLoginPostHandler(); | |
| // 공급사/본사 여부에 따른 페이지 이동 처리 | |
| if ($request->post()->has('returnUrl') && $request->post()->get('returnUrl')) { | |
| // 라이센스 갱신 필요하면 갱신되는 base/index.php 로 이동 | |
| $returnUrl = $licenseRenewService->needBasicLicenseRenew() ? URI_ADMIN . 'base/index.php' : StringUtils::xssClean($request->post()->get('returnUrl')); | |
| } elseif (Manager::isProvider()) { | |
| $returnUrl = URI_ADMIN . 'provider/index.php'; | |
| } else { | |
| $managerLoginService->afterManagerLogin($tmpManager, $commerceTokenDTO); | |
| } else { | |
| // 보안 로그인 인증 완료 후, 관리자 일반 로그인 | |
| /** @var LicenseRenewService $licenseRenewService */ | |
| $licenseRenewService = \App::getInstance(LicenseRenewService::class); | |
| $licenseRenewService->renewStagingLicense(); | |
| if (array_key_exists('csSno', $tmpManager)) { | |
| $manager = \App::load(ManagerCs::class); | |
| } else { | |
| // 공급사/본사 여부에 따른 페이지 이동 처리 | |
| if ($request->post()->has('returnUrl') && $request->post()->get('returnUrl')) { | |
| $returnUrl = StringUtils::xssClean($request->post()->get('returnUrl')); | |
| } elseif (Manager::isProvider()) { | |
| $returnUrl = URI_ADMIN . 'provider/index.php'; | |
| } else { | |
변경 전MessageConfigController.php
| use Framework\Utility\GodoUtils; | |
| use Origin\DTO\ApiClient\Commerce\Apps\MyappStatusResponseDTO; | |
| use Origin\Enum\Crm\Message\AutoSmsAlternativeSendType; | |
| use Origin\Enum\Crm\Message\FailedMessageSendType; | |
| use Origin\Enum\Crm\Message\KakaoAlimTalkSender; | |
| use Origin\Enum\Crm\Message\SmsAutoSendOverType; | |
| use Origin\Service\Crm\Message\KakaoAlimTalkSettingService; | |
| use Origin\Service\Crm\Message\KakaoFriendTalkSettingService; | |
| use Origin\Service\Crm\Message\MessagePointAlertSettingService; | |
| use Origin\Service\Crm\Message\MyappPushSettingService; | |
| use Origin\Service\Crm\Message\SmsSettingService; | |
| use Origin\Service\MyApp\MyappSettingService; | |
| $this->callMenu('crm', 'messageConfig', 'messageConfig'); | |
| $this->setMenuCode('crm', 'messageConfig', 'messageConfig'); | |
| /** @var MessagePointAlertSettingService $messagePointAlertSettingService */ | |
| $messagePointAlertSettingService = \App::getInstance(MessagePointAlertSettingService::class); | |
| $insufficMessagePointAlertConfig = $messagePointAlertSettingService->getInsufficMessagePointAlertConfig(); | |
| /** @var SmsSettingService $smsSettingService */ | |
| $smsSettingService = \App::getInstance(SmsSettingService::class); | |
| $isKakaoAlrimAvailable = !$this->isNewMall(); | |
| $isKakaoAlrimLunaInstalled = GodoUtils::isPlusShop(PLUSSHOP_CODE_KAKAOALRIMLUNA); | |
| $this->setData('insufficMessagePointAlertConfig', $insufficMessagePointAlertConfig); | |
| $this->setData('smsRejectPolicy', $smsRejectPolicy); | |
| $this->setData('smsAutoConfig', $smsAutoConfig); | |
| $this->setData('kakaoFriendTalkConfig', $kakaoFriendTalkConfig); | |
변경 후MessageConfigController.php
| use Framework\Utility\GodoUtils; | |
| use Origin\DTO\ApiClient\Commerce\Apps\MyappStatusResponseDTO; | |
| use Origin\DTO\ApiClient\Commerce\Notification\MessagePointConfigResponseDTO; | |
| use Origin\Enum\Crm\Message\AutoSmsAlternativeSendType; | |
| use Origin\Enum\Crm\Message\FailedMessageSendType; | |
| use Origin\Enum\Crm\Message\KakaoAlimTalkSender; | |
| use Origin\Enum\Crm\Message\SmsAutoSendOverType; | |
| use Origin\Service\Crm\Message\KakaoAlimTalkSettingService; | |
| use Origin\Service\Crm\Message\KakaoFriendTalkSettingService; | |
| use Origin\Service\Crm\Message\MessagePointConfigService; | |
| use Origin\Service\Crm\Message\MyappPushSettingService; | |
| use Origin\Service\Crm\Message\SmsSettingService; | |
| use Origin\Service\MyApp\MyappSettingService; | |
| $this->callMenu('crm', 'messageConfig', 'messageConfig'); | |
| $this->setMenuCode('crm', 'messageConfig', 'messageConfig'); | |
| try { | |
| /** @var MessagePointConfigService $messagePointConfigService */ | |
| $messagePointConfigService = \App::getInstance(MessagePointConfigService::class); | |
| $messagePointConfig = $messagePointConfigService->getMessagePointConfig(); | |
| } catch (\Throwable $e) { | |
| \Logger::channel('mobileMessage')->error($e->getMessage()); | |
| $messagePointConfig = new MessagePointConfigResponseDTO(null); | |
| } | |
| /** @var SmsSettingService $smsSettingService */ | |
| $smsSettingService = \App::getInstance(SmsSettingService::class); | |
| $isKakaoAlrimAvailable = !$this->isNewMall(); | |
| $isKakaoAlrimLunaInstalled = GodoUtils::isPlusShop(PLUSSHOP_CODE_KAKAOALRIMLUNA); | |
| $this->setData('messagePointConfig', $messagePointConfig); | |
| $this->setData('smsRejectPolicy', $smsRejectPolicy); | |
| $this->setData('smsAutoConfig', $smsAutoConfig); | |
| $this->setData('kakaoFriendTalkConfig', $kakaoFriendTalkConfig); | |
변경 전MessageConfigPsController.php
| use Origin\DTO\Crm\Message\InsufficMessagePointAlertConfigDTO; | |
| use Origin\DTO\Crm\Message\KakaoAlimTalkConfigDTO; | |
| use Origin\DTO\Crm\Message\KakaoFriendTalkConfigDTO; | |
| use Origin\DTO\Crm\Message\MyappPushConfigDTO; | |
| use Origin\DTO\Crm\Message\SmsAutoConfigDTO; | |
| use Origin\DTO\Crm\Message\SmsRejectConfigDTO; | |
| $postValue = $request->post()->toArray(); | |
| try { | |
| $insufficMessagePointAlertConfig = new InsufficMessagePointAlertConfigDTO($postValue['insufficMessagePointAlertConfig']); | |
| $smsAutoConfig = new SmsAutoConfigDTO($postValue['smsAutoConfig']); | |
| $smsRejectConfig = $postValue['smsRejectUse'] ? new SmsRejectConfigDTO(['use' => $postValue['smsRejectUse']]) : null; | |
| $kakaoFriendTalkConfig = new KakaoFriendTalkConfigDTO($postValue['kakaoFriendTalkConfig']); | |
| /** @var MessageConfigService $messageConfigService */ | |
| $messageConfigService = \App::getInstance(MessageConfigService::class); | |
| $messageConfigService->save( | |
| $insufficMessagePointAlertConfig, | |
| $smsAutoConfig, | |
| $smsRejectConfig, | |
| $kakaoFriendTalkConfig, | |
변경 후MessageConfigPsController.php
| use Origin\DTO\Crm\Message\InsufficMessagePointAlertConfigDTO; | |
| use Origin\DTO\Crm\Message\KakaoAlimTalkConfigDTO; | |
| use Origin\DTO\Crm\Message\KakaoFriendTalkConfigDTO; | |
| use Origin\DTO\Crm\Message\MessagePointConfigDTO; | |
| use Origin\DTO\Crm\Message\MyappPushConfigDTO; | |
| use Origin\DTO\Crm\Message\SmsAutoConfigDTO; | |
| use Origin\DTO\Crm\Message\SmsRejectConfigDTO; | |
| $postValue = $request->post()->toArray(); | |
| try { | |
| $messagePointConfig = new MessagePointConfigDTO($postValue['messagePointConfig']); | |
| $smsAutoConfig = new SmsAutoConfigDTO($postValue['smsAutoConfig']); | |
| $smsRejectConfig = $postValue['smsRejectUse'] ? new SmsRejectConfigDTO(['use' => $postValue['smsRejectUse']]) : null; | |
| $kakaoFriendTalkConfig = new KakaoFriendTalkConfigDTO($postValue['kakaoFriendTalkConfig']); | |
| /** @var MessageConfigService $messageConfigService */ | |
| $messageConfigService = \App::getInstance(MessageConfigService::class); | |
| $messageConfigService->save( | |
| $messagePointConfig, | |
| $smsAutoConfig, | |
| $smsRejectConfig, | |
| $kakaoFriendTalkConfig, | |
변경 전LayerMessageHistoryDetailController.php
| use Framework\Http\Request; | |
| use Origin\Enum\ApiClient\Notification\MessageResultType; | |
| class LayerMessageHistoryDetailController extends \Controller\Admin\Controller | |
| { | |
| $this->setData('sendGroupKey', $sendGroupKey); | |
| $this->setData('type', $type); | |
| $this->setData('messageResultTypes', MessageResultType::cases()); | |
| $this->getView()->setDefine('layout', 'layout_layer.php'); | |
| } | |
변경 후LayerMessageHistoryDetailController.php
| use Framework\Http\Request; | |
| use Origin\Enum\ApiClient\Notification\MessageResultType; | |
| use Origin\Enum\Crm\Message\SendMethod; | |
| class LayerMessageHistoryDetailController extends \Controller\Admin\Controller | |
| { | |
| $this->setData('sendGroupKey', $sendGroupKey); | |
| $this->setData('type', $type); | |
| if ($type === SendMethod::SMS->name) { | |
| $this->setData('messageResultTypes', MessageResultType::cases()); | |
| } else { | |
| $this->setData('messageResultTypes', MessageResultType::availableForSearch()); | |
| } | |
| $this->getView()->setDefine('layout', 'layout_layer.php'); | |
| } | |
변경 전LayerSmsHistoryResultPsController.php
변경 후LayerSmsHistoryResultPsController.php
| <?php | |
| /* | |
| * Copyright (C) 2026 NHN COMMERCE. - All Rights Reserved | |
| * | |
| * Unauthorized copying or redistribution of this file in source and binary forms via any medium | |
| * is strictly prohibited. | |
| */ | |
| namespace Bundle\Controller\Admin\Crm\MobileMessageHistory; | |
| use Framework\Http\Request; | |
| use Framework\Http\Response; | |
| use Origin\DTO\ApiClient\Commerce\Notification\RemoveReservedSmsSendRequestDTO; | |
| use Origin\Service\Crm\Message\SmsHistoryService; | |
| use Respect\Validation\Exceptions\ValidationException; | |
| use Respect\Validation\Validator; | |
| class LayerSmsHistoryResultPsController extends \Controller\Admin\Controller | |
| { | |
| public function index() | |
| { | |
| $this->callMenu('crm', 'messageHistory', 'mobileHistoryList'); | |
| $this->setMenuCode('crm', 'messageHistory', 'mobileHistoryList'); | |
| /** @var Request $request */ | |
| $request = \App::getInstance('request'); | |
| $postData = $request->post()->toArray(); | |
| $mode = $postData['mode']; | |
| switch ($mode) { | |
| case 'cancel': | |
| try { | |
| Validator::arrayVal() | |
| ->key('sendGroupKey', Validator::stringType()->notEmpty()) | |
| ->key('type', Validator::stringType()->notEmpty()) | |
| ->key('cancelMode', Validator::stringType()->notEmpty()) | |
| ->when( | |
| Validator::key('cancelMode', Validator::equals('SELECT')), | |
| Validator::key('ids', Validator::stringType()->notEmpty()), | |
| Validator::alwaysValid() | |
| ) | |
| ->assert($postData); | |
| $requestDTO = new RemoveReservedSmsSendRequestDTO($postData); | |
| /** @var SmsHistoryService $smsHistoryService */ | |
| $smsHistoryService = \App::getInstance(SmsHistoryService::class); | |
| $smsHistoryService->removeReservedSmsSend($postData['sendGroupKey'], $requestDTO); | |
| $this->json(['success' => true, 'message' => '예약 발송이 취소되었습니다.'], Response::HTTP_OK); | |
| } catch (ValidationException $e) { | |
| \Logger::channel('mobileMessage')->error("예약 취소 요청 파라미터가 잘못 되었습니다.", [$e->getMessage(), __METHOD__]); | |
| $this->json(['success' => false, 'message' => $e->getMessage(), 'data' => $postData], Response::HTTP_BAD_REQUEST); | |
| } catch (\Throwable $e) { | |
| \Logger::channel('mobileMessage')->error("예약 취소 요청에 실패 하였습니다.", [$e->getMessage(), __METHOD__]); | |
| $this->json(['success' => false, 'message' => $e->getMessage(), 'data' => $postData], Response::HTTP_INTERNAL_SERVER_ERROR); | |
| } | |
| break; | |
| default: | |
| $this->json(['success' => false, 'message' => '잘못된 접근입니다.'], Response::HTTP_BAD_REQUEST); | |
| } | |
| } | |
| } | |
변경 전DesignSkinListController.php
| $designCenterUrl = ExternalUrl::DESIGN_CENTER->getUrl('freeSkin?shopNo=' . \Globals::get('gLicense.godosno')); | |
| $this->setData('designCenterUrl', $designCenterUrl); | |
| // NCDS 스타일 적용을 위한 body 클래스 추가 | |
| $this->setData('adminBodySubClass', 'ncds'); | |
| $this->setData('designSkinListUrl', $designSkinListUrl); | |
| $this->setData('aggregatorUrl', $aggregatorUrl); | |
| $this->setData('skinTabData', $this->getSkinTabData($unusedSkinList, $usingSkinType)); | |
| // 튜토리얼 연계 모달 경로 조회 | |
| $helperPopupExposureAvailabilityService = \App::getInstance(HelperPopupExposureAvailabilityService::class); | |
변경 후DesignSkinListController.php
| $designCenterUrl = ExternalUrl::DESIGN_CENTER->getUrl('freeSkin?shopNo=' . \Globals::get('gLicense.godosno')); | |
| $this->setData('designCenterUrl', $designCenterUrl); | |
| // 반응형 무료스킨 다운로드 URL | |
| $godoWwwConfig = \App::getSystemConfig('internal')['godo-www']; | |
| $freeSkinUrl = $godoWwwConfig['url'] | |
| . $godoWwwConfig['path']['free-skin'] | |
| . '?skinNo=' . $godoWwwConfig['free-skin-no'] | |
| . '&shopNo=' . \Globals::get('gLicense.godosno'); | |
| $this->setData('freeSkinUrl', $freeSkinUrl); | |
| // NCDS 스타일 적용을 위한 body 클래스 추가 | |
| $this->setData('adminBodySubClass', 'ncds'); | |
| $this->setData('designSkinListUrl', $designSkinListUrl); | |
| $this->setData('aggregatorUrl', $aggregatorUrl); | |
| $this->setData('skinTabData', $this->getSkinTabData($unusedSkinList, $usingSkinType)); | |
| $this->setData('hasResponsiveSkin', $designEditorSkinService->hasResponsiveSkin()); | |
| // 튜토리얼 연계 모달 경로 조회 | |
| $helperPopupExposureAvailabilityService = \App::getInstance(HelperPopupExposureAvailabilityService::class); | |
변경 전LayerPopupDesignPageEditController.php
| // 작업 스킨 적용 | |
| if ($skinData[$skinWorkKey] != $skinCode) { | |
| $skinData[$skinWorkKey] = $skinCode; | |
| gd_set_policy('design.skin', $skinData); | |
| } | |
| \Globals::set('gSkin.' . $skinType . 'SkinWork', $skinCode); | |
변경 후LayerPopupDesignPageEditController.php
| // 작업 스킨 적용 | |
| if ($skinData[$skinWorkKey] != $skinCode) { | |
| $skinData[$skinWorkKey] = $skinCode; | |
| gd_set_policy('design.skin', $skinData, true, $mallSno); | |
| } | |
| \Globals::set('gSkin.' . $skinType . 'SkinWork', $skinCode); | |
변경 전IfdoConfigController.php
| <?php | |
| /** | |
| * This is commercial software, only users who have purchased a valid license | |
| * and accept to the terms of the License Agreement can install and use this | |
| * program. | |
| * | |
| * Do not edit or add to this file if you wish to upgrade Godomall5 to newer | |
| * versions in the future. | |
| * | |
| * @copyright ⓒ 2016, NHN godo: Corp. | |
| * @link http://www.godo.co.kr | |
| */ | |
| namespace Bundle\Controller\Admin\Service; | |
| /** | |
| * Class IfdoConfigController | |
| * @package Bundle\Controller\Admin\Service | |
| * @author choisueun <cseun555@godo.co.kr> | |
| */ | |
| class IfdoConfigController extends \Controller\Admin\Controller | |
| { | |
| /** | |
| * index | |
| * | |
| * @throws \Exception | |
| */ | |
| public function index() | |
| { | |
| // --- 메뉴 설정 | |
| $this->callMenu('service', 'serviceSetting', 'ifdoConfig'); | |
| // --- 페이지 데이터 | |
| try { | |
| $ifdoConfig = gd_policy('service.ifdo'); | |
| // --- 기본값 설정 | |
| gd_isset($ifdoConfig['ifdoUseType'],'n'); | |
| gd_isset($ifdoConfig['ifdoServiceCode']); | |
| $checked['ifdoUseType'][$ifdoConfig['ifdoUseType']] = 'checked="checked"'; | |
| } catch (\Exception $e) { | |
| throw new \Exception($e->getMessage()); | |
| } | |
| $this->setData('data', $ifdoConfig); | |
| $this->setData('checked', $checked); | |
| } | |
| } | |
변경 후IfdoConfigController.php
변경 전IfdoPsController.php
| <?php | |
| /** | |
| * This is commercial software, only users who have purchased a valid license | |
| * and accept to the terms of the License Agreement can install and use this | |
| * program. | |
| * | |
| * Do not edit or add to this file if you wish to upgrade Godomall5 to newer | |
| * versions in the future. | |
| * | |
| * @copyright ⓒ 2016, NHN godo: Corp. | |
| * @link http://www.godo.co.kr | |
| */ | |
| namespace Bundle\Controller\Admin\Service; | |
| use Exception; | |
| use Framework\Debug\Exception\LayerNotReloadException; | |
| use Request; | |
| /** | |
| * Class IfdoPsController | |
| * @package Bundle\Controller\Admin\Service | |
| * @author choisueun <cseun555@godo.co.kr> | |
| */ | |
| class IfdoPsController extends \Controller\Admin\Controller | |
| { | |
| public function index() | |
| { | |
| try { | |
| switch (Request::post()->get('mode')) { | |
| case 'config': | |
| $ifdoConfigArrData = [ | |
| 'ifdoUseType' => Request::post()->get('ifdoUseType'), | |
| 'ifdoServiceCode' => Request::post()->get('ifdoServiceCode'), | |
| ]; | |
| gd_set_policy('service.ifdo', $ifdoConfigArrData); | |
| $this->layer(__('저장이 완료되었습니다.'), 'top.location.href="ifdo_config.php";'); | |
| break; | |
| } | |
| } catch (Exception $e) { | |
| throw new LayerNotReloadException($e->getMessage()); //새로고침안됨 | |
| } | |
| } | |
| } | |
변경 후IfdoPsController.php
변경 전AdminPanelApiController.php
| $this->addKakaoAlrimNoticePanel($cosApi, 'kakaoAlrim'); | |
| } | |
| $panel = $this->adminPanel->getPanel(); | |
| // json data | |
| 'memberList' => $cosSectionCodeList['modalPopup']['memberList'], | |
| 'designSkinList' => $cosSectionCodeList['modalPopup']['designSkinList'], | |
| 'mobileDesignSkinList' => $cosSectionCodeList['modalPopup']['mobileDesignSkinList'], | |
| ]; | |
| } | |
| return $pageCode['menuCode'] === 'member' && $pageCode['menuFile'] === 'kakao_alrim_setting'; | |
| } | |
| /** | |
| * @param GodoPanelApi $cosApi | |
| * @return void | |
변경 후AdminPanelApiController.php
| $this->addKakaoAlrimNoticePanel($cosApi, 'kakaoAlrim'); | |
| } | |
| // 뱅크다 서비스 종료 안내 팝업 | |
| if ($this->isBankdaServicePanel($pageCode)) { | |
| $this->addPopupPanelByCos($cosApi, 'bankdaService'); | |
| } | |
| $panel = $this->adminPanel->getPanel(); | |
| // json data | |
| 'memberList' => $cosSectionCodeList['modalPopup']['memberList'], | |
| 'designSkinList' => $cosSectionCodeList['modalPopup']['designSkinList'], | |
| 'mobileDesignSkinList' => $cosSectionCodeList['modalPopup']['mobileDesignSkinList'], | |
| 'bankdaService' => $cosSectionCodeList['modalPopup']['bankdaService'], | |
| ]; | |
| } | |
| return $pageCode['menuCode'] === 'member' && $pageCode['menuFile'] === 'kakao_alrim_setting'; | |
| } | |
| /** | |
| * @param array $pageCode | |
| * @return bool | |
| */ | |
| private function isBankdaServicePanel(array $pageCode): bool | |
| { | |
| return $pageCode['menuCode'] === 'order' && $pageCode['menuFile'] === 'bankda_service'; | |
| } | |
| /** | |
| * @param GodoPanelApi $cosApi | |
| * @return void | |
변경 전EditorFileUploaderHtml5PsController.php
| if ($file->size > (MAX_UPLOAD_SIZE * 1024 * 1024)) { | |
| exit("ERRORMSG_" . ' `'.$headers['file_name'].'`파일의 업로드 용량이 ' . MAX_UPLOAD_SIZE . 'MByte(s) 를 초과했습니다.'); | |
| } | |
| $file->content = file_get_contents("php://input"); | |
| $_tmp = (array)explode('.', $file->name); | |
| $filename_ext = strtolower(array_pop($_tmp)); | |
변경 후EditorFileUploaderHtml5PsController.php
| if ($file->size > (MAX_UPLOAD_SIZE * 1024 * 1024)) { | |
| exit("ERRORMSG_" . ' `'.$headers['file_name'].'`파일의 업로드 용량이 ' . MAX_UPLOAD_SIZE . 'MByte(s) 를 초과했습니다.'); | |
| } | |
| $uploadedFile = Request::files()->get('uploadFile'); | |
| if (!empty($uploadedFile)) { | |
| switch ((int)$uploadedFile['error']) { | |
| case UPLOAD_ERR_OK: | |
| // 정상 처리 | |
| break; | |
| case UPLOAD_ERR_INI_SIZE: | |
| case UPLOAD_ERR_FORM_SIZE: | |
| exit("ERRORMSG_파일 크기가 제한을 초과했습니다."); | |
| case UPLOAD_ERR_NO_FILE: | |
| exit("ERRORMSG_업로드된 파일이 없습니다."); | |
| default: | |
| exit("ERRORMSG_파일 업로드 중 오류가 발생했습니다."); | |
| } | |
| if (!is_uploaded_file($uploadedFile['tmp_name'])) { | |
| exit("ERRORMSG_올바른 파일 업로드 방식이 아닙니다."); | |
| } | |
| // 실제 파일 크기와 헤더 크기 비교 | |
| if ($uploadedFile['size'] !== $file->size) { | |
| exit("ERRORMSG_파일 크기가 일치하지 않습니다. " . $uploadedFile['size'] . ' / ' . $file->size); | |
| } | |
| $file->content = file_get_contents($uploadedFile['tmp_name']); | |
| } else { | |
| exit("ERRORMSG_올바른 파일 업로드 방식이 아닙니다."); | |
| } | |
| $_tmp = (array)explode('.', $file->name); | |
| $filename_ext = strtolower(array_pop($_tmp)); | |
변경 전LayerSmsPasswordController.php
| $request = \App::getInstance('request'); | |
| $session = \App::getInstance('session'); | |
| $displayInfo = [ | |
| 'title' => 'SMS 인증번호', | |
| 'useCaptcha' => false, | |
| 'retry' => $session->get('captchaRetry', 1), | |
| ]; | |
변경 후LayerSmsPasswordController.php
| $request = \App::getInstance('request'); | |
| $session = \App::getInstance('session'); | |
| $displayInfo = [ | |
| 'title' => '메시지 인증번호', | |
| 'useCaptcha' => false, | |
| 'retry' => $session->get('captchaRetry', 1), | |
| ]; | |
변경 전HackOutPsController.php
| $regIp = $request->getRemoteAddress(); | |
| $hackOutService->userHackOutByParams($request->post()->all(), $memberSession['memNo'], $memberSession['memId'], $regIp); | |
| // IFDO 탈퇴 스크립트 | |
| $ifdoScript = \App::Load('\\Component\\Service\\IfdoScript'); | |
| $ifdoConfig = $ifdoScript->getIfdoConfig(); | |
| $ifdoScriptCommon = $ifdoScript->getIfdoCommonScript(); | |
| $ifdoScriptHackOut = $ifdoScript->getIfdoHackOutScript($memberSession['memNo']); | |
| // 에이스카운터 환경변수 스크립트(회원탈퇴) | |
| $aCounterScript = \App::load('\\Component\\Nhn\\ACounterScript'); | |
| $aCounterUseFl = $aCounterScript->getACounterUseCheck(); | |
| } else { | |
| $returnStr = ''; | |
| if($ifdoConfig) { | |
| if(empty($returnStr) == false){ | |
| $returnStr .= $ifdoScriptHackOut . $ifdoScriptCommon; | |
| }else{ | |
| $returnStr = $ifdoScriptHackOut . $ifdoScriptCommon; | |
| } | |
| } | |
| // 에이스카운터 환경변수 스크립트(회원탈퇴) | |
| if($aCounterUseFl){ | |
| if(empty($returnStr) === false){ | |
변경 후HackOutPsController.php
| $regIp = $request->getRemoteAddress(); | |
| $hackOutService->userHackOutByParams($request->post()->all(), $memberSession['memNo'], $memberSession['memId'], $regIp); | |
| // 에이스카운터 환경변수 스크립트(회원탈퇴) | |
| $aCounterScript = \App::load('\\Component\\Nhn\\ACounterScript'); | |
| $aCounterUseFl = $aCounterScript->getACounterUseCheck(); | |
| } else { | |
| $returnStr = ''; | |
| // 에이스카운터 환경변수 스크립트(회원탈퇴) | |
| if($aCounterUseFl){ | |
| if(empty($returnStr) === false){ | |
변경 전IndexController.php
| use Framework\Utility\GodoUtils; | |
| use Request; | |
| use Session; | |
| /** | |
| * Class MypageQnaController | |
| $this->setData('widgetTheme', $widgetTheme); //위젯에서 사용 | |
| } | |
| } | |
| } catch (Exception $e) { | |
| throw $e; | |
| } | |
변경 후IndexController.php
| use Framework\Utility\GodoUtils; | |
| use Request; | |
| use Session; | |
| use Component\Cart\ReorderCart; | |
| /** | |
| * Class MypageQnaController | |
| $this->setData('widgetTheme', $widgetTheme); //위젯에서 사용 | |
| } | |
| } | |
| // 재구매 상품 최대 개수 | |
| $this->setData('maxReorderGoodsCount', ReorderCart::MAX_REORDER_GOODS_COUNT); | |
| } catch (Exception $e) { | |
| throw $e; | |
| } | |
변경 전OrderListController.php
| use Globals; | |
| use Exception; | |
| use Request; | |
| /** | |
| * 마이페이지 > 주문배송/조회 | |
| throw new AlertBackException(__('1년이상 기간으로 검색하실 수 없습니다.')); | |
| } | |
| // 사용자 반품/교환/환불 신청 사용여부 | |
| if (gd_is_plus_shop(PLUSSHOP_CODE_USEREXCHANGE) === true) { | |
| $orderBasic = gd_policy('order.basic'); | |
| $this->setData('startDate', gd_isset($wDate[0])); | |
| $this->setData('endDate', gd_isset($wDate[1])); | |
| $this->setData('wDate', gd_isset($wDate)); | |
| $orderData = $order->getOrderList(10, $wDate); | |
| $board = new BoardWrite(['bdId'=>\Bundle\Component\Board\Board::BASIC_GOODS_REIVEW_ID]); | |
| $isPlusReview = false; | |
| if(GodoUtils::isPlusShop(PLUSSHOP_CODE_REVIEW)){ | |
| $this->setData('total', $page->recode['total']); | |
| $this->setData('goodsReviewId', Board::BASIC_GOODS_REIVEW_ID); | |
| $this->setData('mode', 'list'); | |
| } catch (AlertBackException $e) { | |
| throw new AlertBackException($e->getMessage()); | |
| } catch (Exception $e) { | |
변경 후OrderListController.php
| use Globals; | |
| use Exception; | |
| use Request; | |
| use Component\Cart\ReorderCart; | |
| /** | |
| * 마이페이지 > 주문배송/조회 | |
| throw new AlertBackException(__('1년이상 기간으로 검색하실 수 없습니다.')); | |
| } | |
| // 검색 키워드 | |
| $searchKey = StringUtils::xssClean(Request::get()->get('searchKey')); | |
| $searchKeyword = StringUtils::xssClean(Request::get()->get('searchKeyword')); | |
| // 사용자 반품/교환/환불 신청 사용여부 | |
| if (gd_is_plus_shop(PLUSSHOP_CODE_USEREXCHANGE) === true) { | |
| $orderBasic = gd_policy('order.basic'); | |
| $this->setData('startDate', gd_isset($wDate[0])); | |
| $this->setData('endDate', gd_isset($wDate[1])); | |
| $this->setData('wDate', gd_isset($wDate)); | |
| $this->setData('searchKey', $searchKey); | |
| $this->setData('searchKeyword', $searchKeyword); | |
| $orderData = $order->getOrderListBySearchKeyword(10, $wDate, null, $searchKey, $searchKeyword); | |
| $board = new BoardWrite(['bdId'=>\Bundle\Component\Board\Board::BASIC_GOODS_REIVEW_ID]); | |
| $isPlusReview = false; | |
| if(GodoUtils::isPlusShop(PLUSSHOP_CODE_REVIEW)){ | |
| $this->setData('total', $page->recode['total']); | |
| $this->setData('goodsReviewId', Board::BASIC_GOODS_REIVEW_ID); | |
| $this->setData('mode', 'list'); | |
| // 재구매 상품 최대 개수 | |
| $this->setData('maxReorderGoodsCount', ReorderCart::MAX_REORDER_GOODS_COUNT); | |
| } catch (AlertBackException $e) { | |
| throw new AlertBackException($e->getMessage()); | |
| } catch (Exception $e) { | |
변경 전OrderViewController.php
| use Session; | |
| use Request; | |
| use App; | |
| /** | |
| * 주문 상세 보기 페이지 | |
| * | |
| $pgEscrowConfirmCheck = App::getConfig('payment.pg')->getPgEscrowConf()[$orderData['pgName']]['confirm']; | |
| // 에스크로 구매확인 | |
| if ($pgEscrowConfirmCheck === 'y' && $orderData['orderStatus'] === 'd' && $orderData['settleGateway'] === 'e' && $orderData['escrowDeliveryFl'] === 'y' && empty($data['escrowConfirmFl']) === true) { | |
| $escrowConfirmFl = true; | |
| $escrowScript = ''; | |
| $pgConf = gd_pgs(); | |
| // 상품 옵션가 표시설정 config 불러오기 | |
| $optionPriceConf = gd_policy('goods.display'); | |
| $this->setData('optionPriceFl', gd_isset($optionPriceConf['optionPriceFl'], 'y')); // 상품 옵션가 표시설정 | |
| } catch (Exception $e) { | |
| throw new AlertBackException($e->getMessage()); | |
| } | |
변경 후OrderViewController.php
| use Session; | |
| use Request; | |
| use App; | |
| use Component\Cart\ReorderCart; | |
| /** | |
| * 주문 상세 보기 페이지 | |
| * | |
| $pgEscrowConfirmCheck = App::getConfig('payment.pg')->getPgEscrowConf()[$orderData['pgName']]['confirm']; | |
| // 에스크로 구매확인 | |
| if ($pgEscrowConfirmCheck === 'y' && $orderData['orderStatus'] === 'd' && $orderData['settleGateway'] === 'e' && $orderData['escrowDeliveryFl'] === 'y' && empty($orderData['escrowConfirmFl'])) { | |
| $escrowConfirmFl = true; | |
| $escrowScript = ''; | |
| $pgConf = gd_pgs(); | |
| // 상품 옵션가 표시설정 config 불러오기 | |
| $optionPriceConf = gd_policy('goods.display'); | |
| $this->setData('optionPriceFl', gd_isset($optionPriceConf['optionPriceFl'], 'y')); // 상품 옵션가 표시설정 | |
| // 재구매 상품 최대 개수 | |
| $this->setData('maxReorderGoodsCount', ReorderCart::MAX_REORDER_GOODS_COUNT); | |
| } catch (Exception $e) { | |
| throw new AlertBackException($e->getMessage()); | |
| } | |
변경 전OrderController.php
| if ($settle['general']['pt']['useFl'] === 'y') { | |
| $tossPolicy = gd_policy('pg.tosspay'); | |
| $tosspayConfig = new TosspayConfig($tossPolicy); | |
| if ($tosspayConfig->isExceptedGoods($cartInfo)) { | |
| unset($settle['general']['pt']); | |
| } | |
| } | |
변경 후OrderController.php
| if ($settle['general']['pt']['useFl'] === 'y') { | |
| $tossPolicy = gd_policy('pg.tosspay'); | |
| $tosspayConfig = new TosspayConfig($tossPolicy); | |
| if (empty($tosspayConfig->pgSetting) || $tosspayConfig->isExceptedGoods($cartInfo)) { | |
| unset($settle['general']['pt']); | |
| } | |
| } | |
변경 전OrderEndController.php
| } | |
| $fbExtensionV2->fbPixelDefault("Purchase", $requestUrl, $arrGoodNo, $orderInfo['settlePrice'], $fbScript['event_id'], $orderInfo['orderCellPhone']); | |
| } | |
| // IFDO order_end 페이지 수집 중 cateCd를 위해 추가됨 | |
| $goodsAdmin = \App::Load('\\Component\\Goods\\GoodsAdmin'); | |
| foreach($orderInfo['goods'] as $key => $val){ | |
| $categoryList = $goodsAdmin->getGoodsLinkCategory($val['goodsNo']); | |
변경 후OrderEndController.php
| } | |
| $fbExtensionV2->fbPixelDefault("Purchase", $requestUrl, $arrGoodNo, $orderInfo['settlePrice'], $fbScript['event_id'], $orderInfo['orderCellPhone']); | |
| } | |
| $goodsAdmin = \App::Load('\\Component\\Goods\\GoodsAdmin'); | |
| foreach($orderInfo['goods'] as $key => $val){ | |
| $categoryList = $goodsAdmin->getGoodsLinkCategory($val['goodsNo']); | |
변경 전ReorderPsController.php
변경 후ReorderPsController.php
| <?php | |
| /* | |
| * Copyright (C) 2025 NHN COMMERCE. - All Rights Reserved | |
| * | |
| * Unauthorized copying or redistribution of this file in source and binary forms via any medium | |
| * is strictly prohibited. | |
| */ | |
| namespace Bundle\Controller\Front\Order; | |
| use Component\Cart\Exception\ValidationException; | |
| use Component\Cart\Cart; | |
| use Component\Cart\ReorderCart; | |
| use Component\Validator\Validator; | |
| use Exception; | |
| use Framework\Http\Response; | |
| use Framework\Utility\StringUtils; | |
| use Request; | |
| /** | |
| * 재구매 처리 페이지 | |
| */ | |
| class ReorderPsController extends \Controller\Front\Controller | |
| { | |
| protected const CART_MODE_CART = ''; | |
| protected const CART_MODE_DIRECT = 'd'; | |
| public function index() | |
| { | |
| $cart = \App::load(Cart::class); | |
| $reorderCart = \App::getInstance(ReorderCart::class); | |
| $session = \App::getInstance('session'); | |
| $postValue = Request::post()->toArray(); | |
| // 모드별 처리 | |
| switch ($postValue['mode']) { | |
| case 'cartInMultiForReorder': | |
| try { | |
| \Logger::channel('reorder')->info(__METHOD__ . ' cartInMultiForReorder ', [$postValue]); | |
| $postValue = StringUtils::xssArrayClean($postValue); | |
| // 바로구매 관련 쿠키 세션 제거 | |
| \Cookie::del("NPAY_BUY_UNIQUE_KEY"); | |
| if($session->get('related_goods_order') == 'y') { | |
| $session->del('related_goods_order'); | |
| } | |
| $cart->setDeleteDirectCartCont(); | |
| // 재구매를 위한 장바구니 데이터 유효성 검사 및 변환 | |
| $cartMode = in_array($postValue['data']['cartMode'], [self::CART_MODE_CART, self::CART_MODE_DIRECT]) | |
| ? $postValue['data']['cartMode'] | |
| : self::CART_MODE_CART; // '' = 장바구니, 'd' = 바로구매 | |
| $reorderGoodsList = $postValue['data']['reorderGoodsList']; | |
| $this->validateReorderGoodsList($reorderGoodsList); | |
| $reorderCartDataList = $reorderCart->convertToReorderCartData($reorderGoodsList, $cartMode); | |
| $availableReorderCartDataList = $reorderCart->filterAvailableCartData($reorderCartDataList); | |
| // 바로구매 시 구매 제한 여부 확인 | |
| $memNo = (int) \Session::get('member.memNo'); | |
| $isPurchasable = $cartMode !== self::CART_MODE_DIRECT | |
| || $reorderCart->isPurchasable($availableReorderCartDataList, $memNo); | |
| // 장바구니 담기 | |
| $cartSnoList = $cart->saveMultipleInfoCart($availableReorderCartDataList); | |
| // 바로구매 모드에서 구매 불가 상품이 있으면 일반 장바구니로 변환 | |
| if ($cartMode == self::CART_MODE_DIRECT && !empty($cartSnoList) && (count($reorderCartDataList) !== count($availableReorderCartDataList) || !$isPurchasable)) { | |
| $reorderCart->moveDirectToNormalCart($cartSnoList); | |
| } | |
| $result = $this->handleReorderResult($cartMode, $reorderCartDataList, $availableReorderCartDataList, $isPurchasable); | |
| $this->json([ | |
| 'success' => $result['success'], | |
| 'message' => $result['message'], | |
| 'redirect' => $result['redirect'], | |
| ]); | |
| } catch (ValidationException $e) { | |
| \Logger::channel('reorder')->warning($e->getMessage(), [__METHOD__, $postValue]); | |
| $this->json([ | |
| 'success' => false, | |
| 'message' => $e->getMessage(), | |
| ], Response::HTTP_BAD_REQUEST); | |
| } catch (Exception $e) { | |
| \Logger::channel('reorder')->warning($e->getMessage(), [__METHOD__, $postValue]); | |
| $this->json([ | |
| 'success' => false, | |
| 'message' => $e->getMessage(), | |
| ], Response::HTTP_INTERNAL_SERVER_ERROR); | |
| } | |
| break; | |
| } | |
| exit(); | |
| } | |
| /** | |
| * 재구매 결과 처리 | |
| * | |
| * @param string $cartMode 장바구니 모드 | |
| * @param array $cartDataList 장바구니 데이터 목록 | |
| * @param array $availableCartDataList 장바구니에 담을 수 있는 데이터 목록 | |
| * @param bool $isPurchasable 구매수량 제한 통과 여부 | |
| * @return array 재구매 결과 | |
| */ | |
| protected function handleReorderResult(string $cartMode, array $cartDataList, array $availableCartDataList, bool $isPurchasable = true): array | |
| { | |
| $success = true; | |
| $message = ''; | |
| $redirect = ''; | |
| $existsUnavailableItems = (count($cartDataList) !== count($availableCartDataList)); | |
| $isAllItemsUnavailable = empty($availableCartDataList); | |
| if ($cartMode === self::CART_MODE_DIRECT) { | |
| if ($isAllItemsUnavailable || $existsUnavailableItems || !$isPurchasable) { | |
| $message = '구매 불가 상품이 포함되어 있으니 장바구니에서 확인 후 다시 주문해 주세요.'; | |
| $redirect = '../order/cart.php'; | |
| } else { | |
| $redirect = '../order/order.php'; | |
| } | |
| } else { | |
| if ($isAllItemsUnavailable) { | |
| $success = false; | |
| $message = '선택하신 상품이 현재 구매 불가하여 장바구니에 담을 수 없습니다.'; | |
| } elseif ($existsUnavailableItems) { | |
| $message = "구매 가능한 상품만 장바구니에 담겼습니다.\n장바구니로 이동하시겠습니까?"; | |
| $redirect = '../order/cart.php'; | |
| } else { | |
| $message = "선택하신 상품이 장바구니에 담겼습니다.\n장바구니로 이동하시겠습니까?"; | |
| $redirect = '../order/cart.php'; | |
| } | |
| } | |
| return [ | |
| 'success' => $success, | |
| 'message' => $message, | |
| 'redirect' => $redirect, | |
| ]; | |
| } | |
| /** | |
| * 재구매 상품 목록 유효성 검사 | |
| * | |
| * @param array $orderGoodsList 재구매 상품 목록 | |
| * @throws ValidationException | |
| * @return void | |
| */ | |
| protected function validateReorderGoodsList(array $orderGoodsList): void | |
| { | |
| if (empty($orderGoodsList)) { | |
| throw new ValidationException('선택하신 상품이 없습니다.'); | |
| } | |
| if (count($orderGoodsList) > ReorderCart::MAX_REORDER_GOODS_COUNT) { | |
| throw new ValidationException('선택하신 주문의 상품 수가 ' . ReorderCart::MAX_REORDER_GOODS_COUNT . '개를 초과하여 장바구니에 담을 수 없습니다.'); | |
| } | |
| // 개별 유효성 검사 | |
| foreach ($orderGoodsList as $orderGoods) { | |
| //상품 번호 체크 | |
| if (!Validator::required($orderGoods['goodsNo'] ?? null)) { | |
| throw new ValidationException('선택한 상품의 상품번호를 확인 할 수 없어 장바구니에 담을 수 없습니다.'); | |
| } | |
| // 옵션 번호 체크 | |
| if (!Validator::required(value: $orderGoods['optionSno'] ?? null)) { | |
| throw new ValidationException('선택한 상품의 옵션 번호를 확인할 수 없어 장바구니에 담을 수 없습니다.'); | |
| } | |
| // 상품 수량 체크 | |
| if (!Validator::number($orderGoods['goodsCnt'] ?? null, 1, null, true)) { | |
| throw new ValidationException('선택한 상품의 수량이 올바르지 않아 장바구니에 담을 수 없습니다.'); | |
| } | |
| } | |
| } | |
| } | |
변경 전FaqController.php
| namespace Bundle\Controller\Front\Service; | |
| use Component\Faq\Faq; | |
| use Request; | |
| class FaqController extends \Controller\Front\Controller | |
| $this->setData('faqCode',$faqCode); | |
| } | |
| catch(\Exception $e) { | |
| $this->alert($e->getMessage()); | |
| } | |
| } | |
| } | |
변경 후FaqController.php
| namespace Bundle\Controller\Front\Service; | |
| use Component\Faq\Faq; | |
| use Framework\Debug\Exception\DatabaseException; | |
| use Request; | |
| class FaqController extends \Controller\Front\Controller | |
| $this->setData('faqCode',$faqCode); | |
| } | |
| catch(\Exception $e) { | |
| $this->alert("잘못된 접근입니다."); | |
| } | |
| } | |
| } | |
변경 전OrderListController.php
| use Component\Board\BoardWrite; | |
| use Component\Board\Board; | |
| use Component\Order\Order; | |
| use Framework\Debug\Exception\AlertBackException; | |
| use Framework\Debug\Exception\AlertRedirectException; | |
| use App; | |
| ]; | |
| $this->setData('searchDate', $searchDate); | |
| if (\Component\Order\OrderMultiShipping::isUseMultiShipping() === true) { | |
| $this->setData('isUseMultiShipping', true); | |
| } | |
| $this->setData('wDate', $wDate); | |
| $this->setData('selectDate', $selectDate); | |
| // 주문 모드 값 체크 | |
| $mode = StringUtils::xssClean(Request::get()->get('mode')); | |
| switch ($mode) { | |
| $this->addScript(['plusReview/gd_plus_review.js?popup=no']); | |
| } | |
| $orderData = $order->getOrderList(10, $wDate, $mode); | |
| $board = new BoardWrite(['bdId'=>\Bundle\Component\Board\Board::BASIC_GOODS_REIVEW_ID]); | |
| $isPlusReview = false; | |
| if(GodoUtils::isPlusShop(PLUSSHOP_CODE_REVIEW)){ | |
| } | |
| $this->setData('ordersByRegisterDay', gd_isset($ordersByRegisterDay)); | |
| if (Request::get()->get('listMode') == 'data') { | |
| $this->getView()->setPageName('mypage/_order_goods_list'); | |
| } else if (Request::get()->get('listMode') == 'food_data') { | |
| // food_story 별도 파일 이용 | |
| $this->getView()->setPageName('mypage/_order_goods'); | |
| } | |
| $this->setData('gPageName', $gPageName); | |
| $this->setData('goodsReviewId',Board::BASIC_GOODS_REIVEW_ID); | |
| $this->setData('mode', $mode); | |
| } catch (Exception $e) { | |
| throw new AlertRedirectException($e->getMessage(), null, null, URI_HOME); | |
| } | |
변경 후OrderListController.php
| use Component\Board\BoardWrite; | |
| use Component\Board\Board; | |
| use Component\Order\Order; | |
| use Component\Cart\ReorderCart; | |
| use Framework\Debug\Exception\AlertBackException; | |
| use Framework\Debug\Exception\AlertRedirectException; | |
| use App; | |
| ]; | |
| $this->setData('searchDate', $searchDate); | |
| $searchKey = [ | |
| 'orderNo' => '주문번호', | |
| 'goodsNm' => '상품명', | |
| 'goodsNo' => '상품코드', | |
| ]; | |
| $this->setData('searchKey', $searchKey); | |
| if (\Component\Order\OrderMultiShipping::isUseMultiShipping() === true) { | |
| $this->setData('isUseMultiShipping', true); | |
| } | |
| $this->setData('wDate', $wDate); | |
| $this->setData('selectDate', $selectDate); | |
| $selectKey = StringUtils::xssClean(Request::get()->get('searchKey')) ?? 'orderNo'; | |
| $this->setData('selectKey', $selectKey); | |
| $searchKeyword = StringUtils::xssClean(Request::get()->get('searchKeyword')); | |
| $this->setData('searchKeyword', $searchKeyword); | |
| // 주문 모드 값 체크 | |
| $mode = StringUtils::xssClean(Request::get()->get('mode')); | |
| switch ($mode) { | |
| $this->addScript(['plusReview/gd_plus_review.js?popup=no']); | |
| } | |
| $orderData = $order->getOrderListBySearchKeyword(10, $wDate, $mode, $selectKey, $searchKeyword); | |
| $board = new BoardWrite(['bdId'=>\Bundle\Component\Board\Board::BASIC_GOODS_REIVEW_ID]); | |
| $isPlusReview = false; | |
| if(GodoUtils::isPlusShop(PLUSSHOP_CODE_REVIEW)){ | |
| } | |
| $this->setData('ordersByRegisterDay', gd_isset($ordersByRegisterDay)); | |
| if (Request::get()->get('listMode') == 'reorder_data') { | |
| $this->getView()->setPageName('mypage/_reorder_goods_list'); | |
| } elseif (Request::get()->get('listMode') == 'data') { | |
| $this->getView()->setPageName('mypage/_order_goods_list'); | |
| } elseif (Request::get()->get('listMode') == 'food_data') { | |
| // food_story 별도 파일 이용 | |
| $this->getView()->setPageName('mypage/_order_goods'); | |
| } | |
| $this->setData('gPageName', $gPageName); | |
| $this->setData('goodsReviewId',Board::BASIC_GOODS_REIVEW_ID); | |
| $this->setData('mode', $mode); | |
| // 재구매 상품 최대 개수 | |
| $this->setData('maxReorderGoodsCount', ReorderCart::MAX_REORDER_GOODS_COUNT); | |
| } catch (Exception $e) { | |
| throw new AlertRedirectException($e->getMessage(), null, null, URI_HOME); | |
| } | |
변경 전OrderViewController.php
| use Request; | |
| use App; | |
| use Session; | |
| /** | |
| * 주문 상세 보기 페이지 | |
| $this->setData('goodsReviewId', Board::BASIC_GOODS_REIVEW_ID); | |
| $this->setData('gPageName', $gPageName); | |
| $this->setData('pageName', 'view'); | |
| } catch (Exception $e) { | |
| throw new AlertBackException($e->getMessage()); | |
| } | |
변경 후OrderViewController.php
| use Request; | |
| use App; | |
| use Session; | |
| use Component\Cart\ReorderCart; | |
| /** | |
| * 주문 상세 보기 페이지 | |
| $this->setData('goodsReviewId', Board::BASIC_GOODS_REIVEW_ID); | |
| $this->setData('gPageName', $gPageName); | |
| $this->setData('pageName', 'view'); | |
| // 재구매 상품 최대 개수 | |
| $this->setData('maxReorderGoodsCount', ReorderCart::MAX_REORDER_GOODS_COUNT); | |
| } catch (Exception $e) { | |
| throw new AlertBackException($e->getMessage()); | |
| } | |
변경 전OrderController.php
| use Encryptor; | |
| use Exception; | |
| use Component\Present\Cart\PresentCart; | |
| /** | |
| * 주문서 작성 | |
| $settle = $tempSettle; | |
| } | |
| $this->setData('settle', gd_isset($settle)); | |
| //개별결제수단이 설정되어 있는데 모두 다른경우 결제 불가 | |
변경 후OrderController.php
| use Encryptor; | |
| use Exception; | |
| use Component\Present\Cart\PresentCart; | |
| use Component\Payment\Tosspay\TosspayConfig; | |
| /** | |
| * 주문서 작성 | |
| $settle = $tempSettle; | |
| } | |
| // 토스페이 설정에 예외상품에 등록된 상품이라면 미노출 | |
| if ($settle['general']['pt']['useFl'] === 'y') { | |
| $tossPolicy = gd_policy('pg.tosspay'); | |
| $tosspayConfig = new TosspayConfig($tossPolicy); | |
| if (empty($tosspayConfig->pgSetting) || $tosspayConfig->isExceptedGoods($cartInfo)) { | |
| unset($settle['general']['pt']); | |
| } | |
| } | |
| $this->setData('settle', gd_isset($settle)); | |
| //개별결제수단이 설정되어 있는데 모두 다른경우 결제 불가 | |
변경 전OrderEndController.php
| $fbExtensionV2->fbPixelDefault("Purchase", $requestUrl, $arrGoodNo, $orderInfo['settlePrice'], $fbScript['event_id'], $orderInfo['orderCellPhone']); | |
| } | |
| // IFDO order_end 페이지 수집 중 cateCd를 위해 추가됨 | |
| $goodsAdmin = \App::Load('\\Component\\Goods\\GoodsAdmin'); | |
| foreach($orderInfo['goods'] as $key => $val){ | |
| $categoryList = $goodsAdmin->getGoodsLinkCategory($val['goodsNo']); | |
변경 후OrderEndController.php
| $fbExtensionV2->fbPixelDefault("Purchase", $requestUrl, $arrGoodNo, $orderInfo['settlePrice'], $fbScript['event_id'], $orderInfo['orderCellPhone']); | |
| } | |
| $goodsAdmin = \App::Load('\\Component\\Goods\\GoodsAdmin'); | |
| foreach($orderInfo['goods'] as $key => $val){ | |
| $categoryList = $goodsAdmin->getGoodsLinkCategory($val['goodsNo']); | |
변경 전ReorderPsController.php
변경 후ReorderPsController.php
| <?php | |
| /* | |
| * Copyright (C) 2025 NHN COMMERCE. - All Rights Reserved | |
| * | |
| * Unauthorized copying or redistribution of this file in source and binary forms via any medium | |
| * is strictly prohibited. | |
| */ | |
| namespace Bundle\Controller\Mobile\Order; | |
| /** | |
| * 재구매 처리 페이지 | |
| */ | |
| class ReorderPsController extends \Controller\Front\Order\ReorderPsController | |
| { | |
| public function index() | |
| { | |
| parent::index(); | |
| } | |
| } | |
변경 전CartRequestDTO.php
변경 후CartRequestDTO.php
| <?php | |
| /* | |
| * Copyright (C) 2025 NHN COMMERCE. - All Rights Reserved | |
| * | |
| * Unauthorized copying or redistribution of this file in source and binary forms via any medium is strictly prohibited. | |
| */ | |
| namespace Bundle\DTO\Cart; | |
| use Origin\DTO\AbstractDTO; | |
| class CartRequestDTO extends AbstractDTO | |
| { | |
| protected const USE_BUNDLE_GOODS_DEFAULT = 1; | |
| /** @var int 공급사 번호 */ | |
| protected int $scmNo; | |
| /** @var array 상품번호 배열 */ | |
| protected array $goodsNo; | |
| /** @var array 옵션번호 배열 */ | |
| protected array $optionSno; | |
| /** @var array 상품수량 배열 */ | |
| protected array $goodsCnt; | |
| /** @var int|float 총 가격 */ | |
| protected int|float $setTotalPrice; | |
| /** @var string 배송비 선불/착불 */ | |
| protected string $deliveryCollectFl; | |
| /** @var string 배송방법 */ | |
| protected string $deliveryMethodFl; | |
| /** @var string 장바구니 모드 ('' = 장바구니, 'd' = 바로구매) */ | |
| protected string $cartMode; | |
| /** @var int 번들 상품 사용 여부 */ | |
| protected int $useBundleGoods; | |
| /** @var array|null 텍스트 옵션 배열 */ | |
| protected ?array $optionText; | |
| /** @var array|null 추가상품번호 배열 */ | |
| protected ?array $addGoodsNo; | |
| /** @var array|null 추가상품수량 배열 */ | |
| protected ?array $addGoodsCnt; | |
| public function __construct( | |
| int $scmNo, | |
| array $goodsNo, | |
| array $optionSno, | |
| array $goodsCnt, | |
| int|float $setTotalPrice, | |
| string $deliveryCollectFl, | |
| string $deliveryMethodFl, | |
| string $cartMode = '', | |
| int $useBundleGoods = self::USE_BUNDLE_GOODS_DEFAULT, | |
| ?array $optionText = null, | |
| ?array $addGoodsNo = null, | |
| ?array $addGoodsCnt = null | |
| ) { | |
| $this->scmNo = $scmNo; | |
| $this->goodsNo = $goodsNo; | |
| $this->optionSno = $optionSno; | |
| $this->goodsCnt = $goodsCnt; | |
| $this->setTotalPrice = $setTotalPrice; | |
| $this->deliveryCollectFl = $deliveryCollectFl; | |
| $this->deliveryMethodFl = $deliveryMethodFl; | |
| $this->cartMode = $cartMode; | |
| $this->useBundleGoods = $useBundleGoods; | |
| $this->optionText = $optionText; | |
| $this->addGoodsNo = $addGoodsNo; | |
| $this->addGoodsCnt = $addGoodsCnt; | |
| } | |
| /** | |
| * @return int | |
| */ | |
| public function getScmNo(): int | |
| { | |
| return $this->scmNo; | |
| } | |
| /** | |
| * @return array | |
| */ | |
| public function getGoodsNo(): array | |
| { | |
| return $this->goodsNo; | |
| } | |
| /** | |
| * @return array | |
| */ | |
| public function getOptionSno(): array | |
| { | |
| return $this->optionSno; | |
| } | |
| /** | |
| * @return array | |
| */ | |
| public function getGoodsCnt(): array | |
| { | |
| return $this->goodsCnt; | |
| } | |
| /** | |
| * @return int|float | |
| */ | |
| public function getSetTotalPrice(): int|float | |
| { | |
| return $this->setTotalPrice; | |
| } | |
| /** | |
| * @return string | |
| */ | |
| public function getDeliveryCollectFl(): string | |
| { | |
| return $this->deliveryCollectFl; | |
| } | |
| /** | |
| * @return string | |
| */ | |
| public function getDeliveryMethodFl(): string | |
| { | |
| return $this->deliveryMethodFl; | |
| } | |
| /** | |
| * @return string | |
| */ | |
| public function getCartMode(): string | |
| { | |
| return $this->cartMode; | |
| } | |
| /** | |
| * @return int | |
| */ | |
| public function getUseBundleGoods(): int | |
| { | |
| return $this->useBundleGoods; | |
| } | |
| /** | |
| * @return array|null | |
| */ | |
| public function getOptionText(): ?array | |
| { | |
| return $this->optionText; | |
| } | |
| /** | |
| * @return array|null | |
| */ | |
| public function getAddGoodsNo(): ?array | |
| { | |
| return $this->addGoodsNo; | |
| } | |
| /** | |
| * @return array|null | |
| */ | |
| public function getAddGoodsCnt(): ?array | |
| { | |
| return $this->addGoodsCnt; | |
| } | |
| /** | |
| * 배열로 변환 (set_total_price 키명 유지) | |
| * | |
| * @return array | |
| */ | |
| public function toArray(): array | |
| { | |
| $data = parent::toArray(); | |
| // setTotalPrice를 set_total_price로 변환 | |
| if (isset($data['setTotalPrice'])) { | |
| $data['set_total_price'] = $data['setTotalPrice']; | |
| unset($data['setTotalPrice']); | |
| } | |
| return $data; | |
| } | |
| } | |
변경 전CartRepository.php
| { | |
| /** | |
| * 특정 장바구니 항목에 대해 directCart 플래그 변경 | |
| * | |
| * Update es_cart SET directCart = ? WHERE sno IN (cartSnoList) | |
| * | |
| * @param array $cartSnoList 장바구니 항목들 | |
| * @param string $directCartFlag directCart 플래그 | |
| * @return bool 성공 여부 | |
| ->where('directCart', 'present') | |
| ->exists(); | |
| } | |
| } | |
변경 후CartRepository.php
| { | |
| /** | |
| * 특정 장바구니 항목에 대해 directCart 플래그 변경 | |
| * | |
| * Update es_cart SET directCart = ? WHERE sno IN (cartSnoList) | |
| * | |
| * @param array $cartSnoList 장바구니 항목들 | |
| * @param string $directCartFlag directCart 플래그 | |
| * @return bool 성공 여부 | |
| ->where('directCart', 'present') | |
| ->exists(); | |
| } | |
| public function updateDirectCartBySnoList(array $snoList): void | |
| { | |
| Cart::query() | |
| ->whereIn('sno', $snoList) | |
| ->update(['directCart' => 'n']); | |
| } | |
| } | |
변경 전AddGoodsRepository.php
| return $addGoods ? $addGoods->toArray() : []; | |
| } | |
| } | |
변경 후AddGoodsRepository.php
| return $addGoods ? $addGoods->toArray() : []; | |
| } | |
| } | |
변경 전GoodsOptionRepository.php
| return $results ? $results : []; | |
| } | |
| } | |
변경 후GoodsOptionRepository.php
| return $results ? $results : []; | |
| } | |
| /** | |
| * 옵션 번호 리스트로 옵션 가격 정보를 배치 조회 | |
| * | |
| * SELECT sno, optionPrice | |
| * FROM es_goodsOption | |
| * WHERE sno IN (...) | |
| * | |
| * @param array $optionSnoList 옵션 번호 리스트 | |
| * @return array | |
| */ | |
| public function findOptionPricesBySnoList(array $optionSnoList): array | |
| { | |
| return GoodsOption::query() | |
| ->whereIn('sno', $optionSnoList) | |
| ->select('sno', 'optionPrice') | |
| ->get() | |
| ->pluck('optionPrice', 'sno') | |
| ->toArray(); | |
| } | |
| } | |
변경 전GoodsOptionTextRepository.php
| ->get() | |
| ->toArray(); | |
| } | |
| } | |
변경 후GoodsOptionTextRepository.php
| ->get() | |
| ->toArray(); | |
| } | |
| /** | |
| * 텍스트 옵션 번호 리스트로 텍스트 옵션 가격 정보를 배치 조회 | |
| * | |
| * SELECT sno, addPrice | |
| * FROM es_goodsOptionText | |
| * WHERE sno IN (...) | |
| * | |
| * @param array $optionTextSnoList 텍스트 옵션 번호 리스트 | |
| * @return array | |
| */ | |
| public function findOptionTextPricesBySnoList(array $optionTextSnoList): array | |
| { | |
| return GoodsOptionText::query() | |
| ->whereIn('sno', $optionTextSnoList) | |
| ->select('sno', 'addPrice') | |
| ->get() | |
| ->pluck('addPrice', 'sno') | |
| ->toArray(); | |
| } | |
| } | |
변경 전GoodsRepository.php
| } | |
| return null; | |
| } | |
| } | |
변경 후GoodsRepository.php
| } | |
| return null; | |
| } | |
| /** | |
| * 상품 구매 제한 정보 조회 | |
| * | |
| * SELECT goodsNo, fixedSales, fixedOrderCnt, minOrderCnt, maxOrderCnt, salesUnit | |
| * FROM es_goods | |
| * WHERE goodsNo IN (...) | |
| * | |
| * @param array $goodsNoList 상품 번호 리스트 | |
| * @return array goodsNo를 키로 하는 판매 제한 정보 배열 | |
| */ | |
| public function findSalesInfoByGoodsNoList(array $goodsNoList): array | |
| { | |
| return Goods::query() | |
| ->whereIn('goodsNo', $goodsNoList) | |
| ->select(['goodsNo', 'fixedSales', 'fixedOrderCnt', 'minOrderCnt', 'maxOrderCnt', 'salesUnit']) | |
| ->get() | |
| ->keyBy('goodsNo') | |
| ->toArray(); | |
| } | |
| /** | |
| * 상품 번호 리스트로 상품 가격 정보를 배치 조회 | |
| * | |
| * SELECT goodsNo, goodsPrice | |
| * FROM es_goods | |
| * WHERE goodsNo IN (...) AND delFl = 'n' | |
| * | |
| * @param array $goodsNoList 상품 번호 리스트 | |
| * @return array | |
| */ | |
| public function findGoodsPricesByGoodsNoList(array $goodsNoList): array | |
| { | |
| return Goods::query() | |
| ->whereIn('goodsNo', $goodsNoList) | |
| ->where('delFl', 'n') | |
| ->select('goodsNo', 'goodsPrice') | |
| ->get() | |
| ->pluck('goodsPrice', 'goodsNo') | |
| ->toArray(); | |
| } | |
| /** | |
| * 존재하는 상품 번호 목록 조회 (delFl = 'n') | |
| * | |
| * SELECT goodsNo | |
| * FROM es_goods | |
| * WHERE goodsNo IN (...) AND delFl = 'n' | |
| * | |
| * @param array $goodsNoList 상품 번호 리스트 | |
| * @return array 존재하는 goodsNo 목록 | |
| */ | |
| public function findExistGoodsNoListByGoodsNoList(array $goodsNoList): array | |
| { | |
| return Goods::query() | |
| ->whereIn('goodsNo', $goodsNoList) | |
| ->where('delFl', 'n') | |
| ->pluck('goodsNo') | |
| ->toArray(); | |
| } | |
| } | |
변경 전MemberOrderGoodsCountRepository.php
변경 후MemberOrderGoodsCountRepository.php
| <?php | |
| /* | |
| * Copyright (C) 2026 NHN COMMERCE. - All Rights Reserved | |
| * | |
| * Unauthorized copying or redistribution of this file in source and binary forms via any medium | |
| * is strictly prohibited. | |
| */ | |
| namespace Bundle\Repository\Member; | |
| use Origin\Model\Member\MemberOrderGoodsCount; | |
| class MemberOrderGoodsCountRepository | |
| { | |
| /** | |
| * 회원의 상품별 누적 구매수량 조회 (ID 기준 구매수량 제한 체크용) | |
| * | |
| * SELECT goodsNo, orderCount | |
| * FROM es_memberOrderGoodsCount | |
| * WHERE memNo = ? | |
| * AND goodsNo IN (...) | |
| * | |
| * @param int $memNo 회원번호 | |
| * @param array $goodsNoList 상품번호 리스트 | |
| * @return array goodsNo를 키로 하는 누적 구매수량 배열 | |
| */ | |
| public function findOrderCountByGoodsNoList(int $memNo, array $goodsNoList): array | |
| { | |
| return MemberOrderGoodsCount::query() | |
| ->where('memNo', $memNo) | |
| ->whereIn('goodsNo', $goodsNoList) | |
| ->pluck('orderCount', 'goodsNo') | |
| ->toArray(); | |
| } | |
| } | |
변경 전button.css
| .btn_select_cancel:hover{border:1px solid #bbbbbb; color:#333333;} | |
| .btn_goods_restock{display:inline-block; width:34%; height:42px; padding:0 3px; margin:0 0 0 5px; color:#fff; background:#ab3e55; font-size:14px; border:1px solid #ab3e55; text-align:center; cursor:pointer; font-weight:bold;} | |
| .btn_goods_restock:hover{border:1px solid #9b344a; background:#9b344a;} | |
변경 후button.css
| .btn_select_cancel:hover{border:1px solid #bbbbbb; color:#333333;} | |
| .btn_goods_restock{display:inline-block; width:34%; height:42px; padding:0 3px; margin:0 0 0 5px; color:#fff; background:#ab3e55; font-size:14px; border:1px solid #ab3e55; text-align:center; cursor:pointer; font-weight:bold;} | |
| .btn_goods_restock:hover{border:1px solid #9b344a; background:#9b344a;} | |
| /* 재구매 버튼 */ | |
| .btn_reorder_to_cart, | |
| .btn_reorder_direct { | |
| display: inline-block; | |
| min-width: 100px; | |
| height: 30px; | |
| color: #ab3e55; | |
| font-weight: bold; | |
| border: 1px solid #ab3e55; | |
| background: #ffffff; | |
| text-align: center; | |
| } | |
| .btn_reorder_to_cart:hover, | |
| .btn_reorder_direct:hover { | |
| border: 1px solid #9b344a; | |
| color: #9b344a; | |
| } | |
변경 전mypage.css
| .date_check_list button.on{color:#ffffff; background:#aeaeae;} | |
| .date_check_calendar{position:relative; float:left; width:30.5%;} | |
| .date_check_calendar .anniversary{width:45%; background:url('../../img/member/icon_calendar.png') no-repeat right center;} | |
| /* 자주묻는 질문 검색 */ | |
| .date_faq_list{display:inline-block; width:70%;} | |
| .date_faq_list h2{padding:0 0 10px 0;} | |
| .delivery-method-layer .delivery-method-layer-table { margin: 0 17px 0 0; } | |
| .delivery-method-layer .delivery-method-layer-table table { border-top: 1px solid #dbdbdb !important; } | |
| .delivery-method-layer .delivery-method-layer-table table tr th { border-top: 0px; } | |
변경 후mypage.css
| .date_check_list button.on{color:#ffffff; background:#aeaeae;} | |
| .date_check_calendar{position:relative; float:left; width:30.5%;} | |
| .date_check_calendar .anniversary{width:45%; background:url('../../img/member/icon_calendar.png') no-repeat right center;} | |
| /* 검색어 영역 - 블록 처리 */ | |
| .search_section{clear:both; padding-top:10px;} | |
| .search_section h3{float:left; padding:6px 28px 0 0; color:#777777; font-size:13px;} | |
| .search_section .search_box{float:left;} | |
| .search_section + .btn_date_check{float:left; margin-left:10px;} | |
| .search_section .chosen-select{width:108px;} | |
| .search_section .keyword_input{width:371px;} | |
| /* 자주묻는 질문 검색 */ | |
| .date_faq_list{display:inline-block; width:70%;} | |
| .date_faq_list h2{padding:0 0 10px 0;} | |
| .delivery-method-layer .delivery-method-layer-table { margin: 0 17px 0 0; } | |
| .delivery-method-layer .delivery-method-layer-table table { border-top: 1px solid #dbdbdb !important; } | |
| .delivery-method-layer .delivery-method-layer-table table tr th { border-top: 0px; } | |
| /* 마이페이지 - 주문목록/배송조회 > 재구매 */ | |
| .reorder_form .mypage_table_type th { | |
| vertical-align: middle; | |
| } | |
| .reorder_form .mypage_table_type .td_chk { | |
| vertical-align: middle; | |
| border-right: 1px dotted #ededed; | |
| } | |
| .reorder_form .mypage_table_type th .form_element { | |
| text-align: center; | |
| line-height: 0; | |
| } | |
| .reorder_form .mypage_table_type .td_chk .form_element { | |
| text-align: center; | |
| line-height: 0; | |
| } | |
| .reorder_form .mypage_table_type .form_element label.check_s { | |
| padding: 0 11px 0 11px; | |
| min-width: 13px; | |
| display: inline-block; | |
| background-position: center center; | |
| } | |
| .reorder_form .list_header_box, | |
| .reorder_form .list_footer_box { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 10px 0 10px 0; | |
| } | |
| .reorder_form .list_header_box .list_left_content, | |
| .reorder_form .list_footer_box .list_left_content { | |
| text-align: left; | |
| } | |
| .reorder_form .list_header_box .list_right_content, | |
| .reorder_form .list_footer_box .list_right_content { | |
| text-align: right; | |
| } | |
| .btn_reorder_to_cart + .btn_reorder_direct { | |
| margin-left: 5px; | |
| } | |
변경 전_reorder_goods_list.html
변경 후_reorder_goods_list.html
| {*** 마이페이지 재구매용 주문상품리스트 | mypage/_reorder_goods_list.html ***} | |
| <div class="mypage_table_type"> | |
| <table> | |
| <colgroup> | |
| <col style="width:5%"> <!-- 주문 체크박스--> | |
| <col style="width:15%"> <!-- 날짜/주문번호 --> | |
| <col style="width:5%"> <!-- 재구매 체크박스--> | |
| <col> <!-- 상품명/옵션 --> | |
| <col style="width:15%"> <!-- 상품금액/수량 --> | |
| <col style="width:15%"> <!-- 주문상태 --> | |
| <col style="width:15%"> <!-- 확인/리뷰 --> | |
| </colgroup> | |
| <thead> | |
| <tr> | |
| <th> | |
| <div class="form_element"> | |
| <input type="checkbox" id="allCheck" /> | |
| <label for="allCheck" class="check_s"></label> | |
| </div> | |
| </th> | |
| <th>{=__('날짜/주문번호')}</th> | |
| <th></th> | |
| <th>{=__('상품명/옵션')}</th> | |
| <th>{=__('상품금액/수량')}</th> | |
| <th>{=__('주문상태')}</th> | |
| <th>{=__('확인/리뷰')}</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <!--{ ? orderData }--> | |
| <!--{ @ orderData }--> | |
| <!--{ @ .goods }--> | |
| <tr class="{ ? .orderGoodsCnt > 0 && (..index_ + 1 != .orderGoodsCnt || empty(..addGoods) === false) }row_line{ / }" data-order-no="{.orderNo}" data-order-goodsno="{..sno}" data-order-status="{..orderStatus}" data-order-userhandlesno="{..userHandleSno}" > | |
| <!--{ ? ..index_ == 0 }--> | |
| <td rowspan="{.orderGoodsCnt + .orderAddGoodsCnt}" class="td_chk"> | |
| <div class="form_element"> | |
| <input type="checkbox" name="reorderOrderNo[]" id="reorder_order_{.orderNo}" class="order_checkbox" data-order-no="{.orderNo}" /> | |
| <label for="reorder_order_{.orderNo}" class="check_s"></label> | |
| </div> | |
| </td> | |
| <td rowspan="{.orderGoodsCnt + .orderAddGoodsCnt}" class="order_day_num"> | |
| <em>{=gd_date_format('Y/m/d', .regDt)}</em> | |
| <a href="../mypage/order_view.php?orderNo={.orderNo}" <!--{ ? mode !== 'list' }-->target="_blank"<!--{ / }--> class="order_num_link"><span>{.orderNo}</span></a> | |
| <div class="btn_claim"> | |
| <!--{ ? .orderChannelFl != 'naverpay' }--> | |
| <!--{ ? mode !== 'backRegist' && mode !== 'refundRegist' && mode !== 'exchangeRegist' && .orderSettleButton === true }--> | |
| <span class="btn_gray_list"><a href="#orderSettleLayer" class="btn_gray_small btn_open_layer" data-order-no="{.orderNo}"><span>{=__('구매확정')}</span></a></span> | |
| <!--{ / }--> | |
| <!--{ ? substr(..orderStatus, 0, 1) == 'o'}--> | |
| <span class="btn_gray_list"><a href="#" class="btn_gray_small js_btn_order_cancel"><span>{=__('주문취소')}</span></a></span> | |
| <!--{ : }--> | |
| <!--{ ? .canRefund == true && gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && userHandleFl === true }--> | |
| <span class="btn_gray_list"><a href="../mypage/layer_order_refund_regist.php?mode=refundRegist&orderNo={.orderNo}" class="btn_gray_small"><span>{=__('환불신청')}</span></a></span> | |
| <!--{ / }--> | |
| <!--{ ? .canBack == true && gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && userHandleFl === true }--> | |
| <span class="btn_gray_list"><a href="../mypage/layer_order_back_regist.php?mode=backRegist&orderNo={.orderNo}" class="btn_gray_small"><span>{=__('반품신청')}</span></a></span> | |
| <!--{ / }--> | |
| <!--{ ? .canExchange == true && gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && userHandleFl === true }--> | |
| <span class="btn_gray_list"><a href="../mypage/layer_order_exchange_regist.php?mode=exchangeRegist&orderNo={.orderNo}" class="btn_gray_small"><span>{=__('교환신청')}</span></a></span> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| </div> | |
| </td> | |
| <!--{ / }--> | |
| <!--{ ? ..goodsType === 'goods' }--> | |
| <td class="td_chk"> | |
| <div class="form_element"> | |
| <input type="checkbox" name="reorderGoodsNo[]" id="reorder_goods_{..sno}" class="goods_checkbox" | |
| data-goods-type="{..goodsType}" | |
| data-order-no="{.orderNo}" | |
| data-goods-no="{..goodsNo}" | |
| data-option-sno="{..optionSno}" | |
| data-goods-cnt="{..goodsCnt}" | |
| data-scm-no="{..scmNo}" | |
| data-option-text-info='{=json_encode(..optionTextInfo)}' | |
| data-goods-price="{..goodsPrice}" | |
| data-delivery-method-fl="{..deliveryMethodFl}" | |
| data-delivery-collect-fl="{..goodsDeliveryCollectFl}" | |
| /> | |
| <label for="reorder_goods_{..sno}" class="check_s"></label> | |
| </div> | |
| </td> | |
| <!--{ : }--> | |
| <td class="td_chk"></td> | |
| <!--{ / }--> | |
| <td class="td_left"> | |
| <div class="pick_add_cont"> | |
| <!--{ ? ..goodsType === 'addGoods' }--> | |
| <span class="pick_add_plus">{=__('추가')}</span> | |
| <span class="pick_add_img"> | |
| {..goodsImage} | |
| </span> | |
| <!--{ : }--> | |
| <span class="pick_add_img"> | |
| <a href="../goods/goods_view.php?goodsNo={..goodsNo}">{..goodsImage}</a> | |
| </span> | |
| <!--{ / }--> | |
| <div class="pick_add_info"> | |
| <!--{ ? ..handleMode === 'z' }--> | |
| <div><span class="exchange_add_info">교환추가</span></div> | |
| <!--{ / }--> | |
| <!--{ ? ..goodsType === 'addGoods' }--> | |
| <a href="../goods/goods_view.php?goodsNo={..parentGoodsNo}"><em>{..goodsNm}</em></a> | |
| <!--{ : }--> | |
| <a href="../goods/goods_view.php?goodsNo={..goodsNo}"><em>{..goodsNm}</em></a> | |
| <!--{ / }--> | |
| <!--{ @ ..optionInfo }--> | |
| <span class="text_type_cont"> | |
| {...value_.optionName} : {...value_.optionValue} | |
| <!--{ ? ...value_.optionRealPrice != 0 && optionPriceFl == 'y' }--> | |
| (<!--{ ? ...value_.optionRealPrice > 0 }-->+<!--{ / }-->{=gd_global_order_currency_display(...value_.optionRealPrice, null, null)}) | |
| <!--{ / }--> | |
| <!--{ ? ...index_ == ...size_ - 1 }--> | |
| <!--{ ? empty(...value_.deliveryInfoStr) === false }--> [{...value_.deliveryInfoStr}]<!--{ / }--> | |
| <!--{ / }--> | |
| </span> | |
| <!--{ / }--> | |
| <!--{ ? ..optionTextInfo }--> | |
| <!--{ @ ..optionTextInfo }--> | |
| <span class="text_type_cont"> | |
| {...value_.optionName} : {...value_.optionValue} | |
| <!--{ ? ...value_.optionTextPrice != 0 && optionPriceFl == 'y' }--> | |
| (<!--{ ? ...value_.optionTextPrice > 0 }-->+<!--{ / }-->{=gd_global_order_currency_display(...value_.optionTextPrice, null, null)}) | |
| <!--{ / }--> | |
| </span> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| </div> | |
| </div> | |
| <!-- //pick_add_info --> | |
| </td> | |
| <td><strong>{=gd_global_order_currency_display(((..goodsPrice + ..optionPrice + ..optionTextPrice) * ..goodsCnt),.exchangeRate, .currencyPolicy)}</strong> / {..goodsCnt}{=__('개')}</td> | |
| <td> | |
| <!--{ ? ..userHandleSno > 0 && ..handleSno == 0 }--> | |
| <em> | |
| <!--{ ? ..userHandleFl == 'n' }--> | |
| <!--{ ? ..userHandleMode == 'b' }--> | |
| {=__('반품거절')} | |
| <!--{ : ..userHandleMode == 'r' }--> | |
| {=__('환불거절')} | |
| <!--{ : ..userHandleMode == 'e' }--> | |
| {=__('교환거절')} | |
| <!--{ / }--> | |
| <!--{ : ..userHandleFl == 'y' }--> | |
| <!--{ ? ..userHandleMode == 'b' }--> | |
| {=__('반품승인')} | |
| <!--{ : ..userHandleMode == 'r' }--> | |
| {=__('환불승인')} | |
| <!--{ : ..userHandleMode == 'e' }--> | |
| {=__('교환승인')} | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <!--{ ? ..userHandleMode == 'b' }--> | |
| {=__('반품신청')} | |
| <!--{ : ..userHandleMode == 'r' }--> | |
| {=__('환불신청')} | |
| <!--{ : ..userHandleMode == 'e' }--> | |
| {=__('교환신청')} | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| </em> | |
| <!--{ : }--> | |
| <em> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === false && (substr(..orderStatus, 0, 1) == 'c' || ..orderStatus == 'b4' || ..orderStatus == 'e5' || ..orderStatus == 'r3') && ..handleDetailReasonShowFl == 'y' }--> | |
| <a href="#lyReason" class="order_num_link btn_open_layer"> | |
| <!--{ / }--> | |
| <!--{ ? ..orderStatus == 'd2' }--> | |
| {eachOrderStatus.d2.name} | |
| <!--{ : ..orderStatus == 'b4' }--> | |
| {eachOrderStatus.b4.name} | |
| <!--{ : ..orderStatus == 'e5' }--> | |
| {eachOrderStatus.e5.name} | |
| <!--{ : ..orderStatus == 'r3' }--> | |
| {eachOrderStatus.r3.name} | |
| <!--{ : }--> | |
| {..orderStatusStr} | |
| <!--{ ? ..naverpayStatus.code == 'DelayProductOrder'}--> | |
| ({=..naverpayStatus.notice}) | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === false && (substr(..orderStatus, 0, 1) == 'c' || ..orderStatus == 'b4' || ..orderStatus == 'e5' || ..orderStatus == 'r3') && ..handleDetailReasonShowFl == 'y' }--> | |
| </a> | |
| <!--{ / }--> | |
| </em> | |
| <!--{ / }--> | |
| <div class="btn_gray_list"> | |
| <!--{ ? (substr(..orderStatus, 0, 1) == 'd' || substr(..orderStatus, 0, 1) == 's' || substr(..orderStatus, 0, 1) == 'z') && ..invoiceNo }--> | |
| <!--{ ? ..deliveryMethodFl == 'delivery' || ..deliveryMethodFl == 'packet' || !..deliveryMethodFl }--> | |
| ({=__(..deliveryMethodFlText)}) - <a href="#" class="btn_gray_small js_btn_delivery_trace" data-invoice-company-sno="{..invoiceCompanySno}" data-invoice-no="{..invoiceNo}"><span>{=__('배송추적')}</span></a> | |
| <!--{ : }--> | |
| <div style="margin-bottom: 7px;"> | |
| (<a href="#deliveryMethodLayer" class="style-none btn_open_layer">{..deliveryMethodFlText}</a>) | |
| </div> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <div>({=__(..deliveryMethodFlText)})</div> | |
| <!--{ / }--> | |
| <!--{ ? ..orderStatus == 'd1' }--> | |
| <a href="#" class="btn_gray_small js_btn_order_delivery"><span>{=__('수취확인')}</span></a> | |
| <!--{ / }--> | |
| </div> | |
| </td> | |
| <td> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && (..userHandleSno > 0 || (..handleSno > 0 && ..handleDetailReasonShowFl == 'y')) }--> | |
| <span class="btn_gray_list"> | |
| <a href="#lyReason" class="btn_gray_small btn_open_layer"> | |
| <span> | |
| <!--{ ? ..userHandleMode == 'b' || ..handleMode == 'b' }--> | |
| {=__('반품사유')} | |
| <!--{ : ..userHandleMode == 'r' || ..handleMode == 'r' }--> | |
| {=__('환불사유')} | |
| <!--{ : ..userHandleMode == 'e' || ..handleMode == 'e'}--> | |
| {=__('교환사유')} | |
| <!--{ : ..userHandleMode == 'c' || ..handleMode == 'c'}--> | |
| {=__('취소사유')} | |
| <!--{ / }--> | |
| </span> | |
| </a> | |
| </span> | |
| <!--{ : substr(..orderStatus, 0, 1) == 'd' }--> | |
| <a href="#;" class="btn_buy_ok js_btn_order_settle" data-goods-no="{..sno}"><span>{=__('구매확정')}</span></a> | |
| <!--{ / }--> | |
| <!--{ ? ..viewWriteGoodsReview }--> | |
| <div class="button"><a class="skinbtn point2 btn_review_write ogl_reviewrite btn_open_layer" data-id="{goodsReviewId}" data-goods-no="{..goodsNo}" data-sno="{..sno}" href="#writeReviewLayer"><em>{=__('리뷰쓰기')}</em></a></div> | |
| <!--{/}--> | |
| <!--{ ? ..viewWritePlusReview }--> | |
| <div class="button"><a class="skinbtn point2 btn_review_write" href="javascript:gd_popup_plus_review_write({=..sno}, '{=..goodsNo}')"><em>{=__('리뷰등록')}</em></a></div> | |
| <!--{/}--> | |
| <!--{ ? ..naverpayStatus.code == 'DelayProductOrder'}--> | |
| <a href="#orderDetailReasonLayer" class="btn_buy_ok btn_open_layer" data-goods-no="{..sno}"><span>{=__('지연사유')}</span></a> | |
| <!--{ / }--> | |
| </td> | |
| </tr> | |
| <!--{ ? empty(..addGoods) === false }--> | |
| <!--{ @ ..addGoods }--> | |
| <tr class="{ ? .orderAddGoodsCnt > 0 && (..index_ + ...index_) + 2 != (.orderGoodsCnt + .orderAddGoodsCnt) }row_line{ / }"> | |
| <td class="td_left"> | |
| <div class="pick_add_cont"> | |
| <span class="pick_add_plus">{=__('추가')}</span> | |
| <span class="pick_add_img"> | |
| <a href="../goods/goods_view.php?goodsNo={..goodsNo}">{...goodsImage}</a> | |
| </span> | |
| <div class="pick_add_info"> | |
| <em><a href="../goods/goods_view.php?goodsNo={..goodsNo}">{...goodsNm}</a></em> | |
| <span class="text_type_cont">{=__('옵션')} : </span> | |
| <span class="text_type_cont">{...optionNm}</span> | |
| </div> | |
| </div> | |
| <!-- //pick_add_info --> | |
| </td> | |
| <td><strong>{=gd_global_order_currency_display(...goodsPrice,.exchangeRate, .currencyPolicy)}</strong>원 / {...goodsCnt}{=__('개')}</td> | |
| <td></td> | |
| <td></td> | |
| </tr> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <tr> | |
| <td colspan="7"><p class="no_data">{=__('조회내역이 없습니다.')}</p></td> | |
| </tr> | |
| <!--{ / }--> | |
| </tbody> | |
| </table> | |
| </div> | |
| <!-- 사유 레이어 --> | |
| <div id="lyReason" class="layer_wrap reason_layer dn" data-remote="../mypage/layer_order_refund_reason.php"></div> | |
| <!--//사유 레이어 --> | |
| <div id="lyWritePop" class="layer_wrap board_write_layer dn"></div> | |
| <!-- 네이버페이 상세정보 레이어 --> | |
| <div id="orderDetailReasonLayer" class="layer_wrap reason_layer dn" data-remote="../mypage/layer_order_naverpay_reason.php"></div> | |
| <!--//네이버페이 상세정보 레이어 --> | |
| <!-- 배송방식 상태 확인 레이어(택배제외) --> | |
| <div id="deliveryMethodLayer" class="layer_wrap dn" data-remote="../mypage/layer_order_delivery_method.php"></div> | |
| <!-- 배송방식 상태 확인 레이어(택배제외) --> | |
| <!-- 구매확정 레이어 --> | |
| <div id="orderSettleLayer" class="layer_wrap settle_layer dn" data-remote="../mypage/layer_order_settle.php"></div> | |
| <!-- 구매확정 레이어 --> | |
| <script type="text/javascript"> | |
| // 페이지 진입 시 재구매 체크박스 초기화 | |
| window.addEventListener('pageshow', function() { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| $('#allCheck').prop('checked', false); | |
| }); | |
| $(function () { | |
| // 구매취소 | |
| $('.js_btn_order_cancel').click(function (e) { | |
| if (confirm("{=__('주문취소 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'cancelRegist', | |
| orderNo: $(this).closest('tr').data('order-no'), | |
| orderGoodsNo: $(this).closest('tr').data('order-goodsno'), | |
| orderStatus: $(this).closest('tr').data('order-status') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 구매확정 | |
| $('.js_btn_order_settle').click(function (e) { | |
| if (confirm("{=__('구매확정 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'settleRegist', | |
| orderNo: $(this).closest('tr').data('order-no'), | |
| orderGoodsNo: $(this).closest('tr').data('order-goodsno') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 수취확인 | |
| $('.js_btn_order_delivery').click(function (e) { | |
| if (confirm("{=__('수취확인 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'deliveryCompleteRegist', | |
| orderNo: $(this).closest('tr').data('order-no'), | |
| orderGoodsNo: $(this).closest('tr').data('order-goodsno') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 배송추적 | |
| $('.js_btn_delivery_trace').click(function (e) { | |
| win = gd_popup({ | |
| url: '../share/delivery_trace.php?invoiceCompanySno=' + $(this).data('invoice-company-sno') + '&invoiceNo=' + $(this).data('invoice-no'), | |
| target: 'trace', | |
| width: 650, | |
| height: 660, | |
| resizable: 'yes', | |
| scrollbars: 'yes' | |
| }); | |
| win.focus(); | |
| return win; | |
| }); | |
| // 레이어 오픈 바인딩 | |
| $('.btn_open_layer').bind('click', function (e) { | |
| e.preventDefault(); | |
| // 일반 레이어 호출 | |
| if ($(this).attr('href') == '#lyReason') { | |
| gd_call_layer_handler($(this)); | |
| // 리뷰쓰기 레이어 호출 | |
| } else if ($(this).attr('href') == '#writeReviewLayer') { | |
| var bdId = $(this).data('id'); | |
| var goodsNo = $(this).data('goods-no'); | |
| var sno = $(this).data('sno'); | |
| gd_open_write_layer(bdId, goodsNo, sno); | |
| } else if ($(this).attr('href') == '#orderSettleLayer') { | |
| var target = $(this).attr('href'); | |
| var url = $(target).data('remote'); | |
| var params = { | |
| orderNo: $(this).data('order-no') | |
| }; | |
| $(target).empty(); | |
| $.post(url, params, function (data) { | |
| $(target).empty().html(data); | |
| $(target).find('>div').center(); | |
| }); | |
| // 레이어 confirm 호출 | |
| } else if ($(this).attr('href') == '#orderDetailReasonLayer') { | |
| var orderGoodsNo = $(this).data('goods-no'); | |
| var target = $(this).attr('href'); | |
| var url = $(target).data('remote'); | |
| var params = { | |
| orderNo: $(this).closest('tr').data('order-no'), | |
| orderGoodsNo: orderGoodsNo | |
| }; | |
| $(target).empty(); | |
| $.post(url, params, function (data) { | |
| if (!_.isUndefined(data.code) && data.code == 0) { | |
| alert(data.message); | |
| gd_close_layer(); | |
| return false; | |
| } | |
| $(target).empty().html(data); | |
| $(target).find('>div').center(); | |
| }); | |
| // 레이어 confirm 호출 | |
| } else if($(this).attr('href') == "#deliveryMethodLayer"){ | |
| gd_call_layer_handler($(this)); | |
| } else if ($(this).attr('href') == '#visitAddressLayer') { | |
| var target = $(this).attr('href'); | |
| var url = $(target).data('remote'); | |
| var params = { | |
| orderNo: $(this).data('order-no'), | |
| goodsSno: $(this).data('goods-sno') | |
| }; | |
| $(target).empty(); | |
| $.get(url, params, function (data) { | |
| if (!_.isUndefined(data.code) && data.code == 0) { | |
| alert(data.message); | |
| gd_close_layer(); | |
| return false; | |
| } | |
| $(target).empty().html(data); | |
| $(target).find('>div').center(); | |
| }); | |
| } else { | |
| if (confirm($(this).text() + "{=__('처리를 하시겠습니까?')}")) { | |
| gd_call_layer_handler($(this)); | |
| } else { | |
| return false; | |
| } | |
| } | |
| }); | |
| function gd_call_layer_handler(obj) { | |
| var target = obj.attr('href'); | |
| var url = $(target).data('remote'); | |
| var params = { | |
| orderNo: obj.closest('tr').data('order-no'), | |
| orderGoodsNo: obj.closest('tr').data('order-goodsno'), | |
| orderStatus: obj.closest('tr').data('order-status'), | |
| userHandleSno: obj.closest('tr').data('order-userhandlesno') | |
| }; | |
| $(target).empty(); | |
| $.post(url, params, function (data) { | |
| if (!_.isUndefined(data.code) && data.code == 0) { | |
| alert(data.message); | |
| gd_close_layer(); | |
| return false; | |
| } | |
| $(target).empty().html(data); | |
| $(target).find('>div').center(); | |
| }); | |
| } | |
| // 체크박스 상태 + label on 클래스 동기화 | |
| function setChecked(checkboxes, checked) { | |
| checkboxes.prop('checked', checked).each(function() { | |
| $('label[for="' + $(this).attr('id') + '"]').toggleClass('on', checked); | |
| }); | |
| } | |
| // 전체선택 → 주문 + 상품 체크박스 모두 선택/해제 | |
| $('#allCheck').click(function () { | |
| let isChecked = $(this).is(':checked'); | |
| setChecked($('input[name="reorderOrderNo[]"]'), isChecked); | |
| setChecked($('input.goods_checkbox'), isChecked); | |
| }); | |
| // 주문 체크박스 클릭 → 해당 주문의 상품 전체 선택/해제 | |
| $('input:checkbox[name="reorderOrderNo[]"]').click(function () { | |
| let orderNo = $(this).data('orderNo'); | |
| let isChecked = $(this).is(':checked'); | |
| setChecked($('input.goods_checkbox[data-order-no="' + orderNo + '"]'), isChecked); | |
| updateAllCheckState(); | |
| }); | |
| // 상품 체크박스 클릭 → 주문 체크박스 상태 동기화 | |
| $('input.goods_checkbox').click(function () { | |
| let orderNo = $(this).data('orderNo'); | |
| let goodsInOrder = $('input.goods_checkbox[data-order-no="' + orderNo + '"]'); | |
| let isAllChecked = (goodsInOrder.length === goodsInOrder.filter(':checked').length); | |
| setChecked($('input.order_checkbox[data-order-no="' + orderNo + '"]'), isAllChecked); | |
| updateAllCheckState(); | |
| }); | |
| // 전체선택 체크박스 상태 갱신 | |
| function updateAllCheckState() { | |
| let orderCheckboxes = $('input[name="reorderOrderNo[]"]:checkbox'); | |
| let isAllChecked = (orderCheckboxes.length === orderCheckboxes.filter(':checked').length); | |
| setChecked($('#allCheck'), isAllChecked); | |
| } | |
| }); | |
| </script> | |
| <script type="text/javascript" src="\{=c.PATH_SKIN}js/gd_board_goods.js" charset="utf-8"></script> | |
변경 전index.html
| <!-- //mypage_order_info --> | |
| <div class="mypage_lately_info"> | |
| <div class="mypage_zone_tit"> | |
| <h3>{=__('최근 주문 정보')}<span>{=__('최근 30일 내에 주문하신 내역입니다.')}</span></h3> | |
| </div> | |
| <div class="mypage_lately_info_cont"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_order_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| <a href="../mypage/order_list.php" class="btn_board_more">+ {=__('더보기')}</a> | |
| </div> | |
| <!-- //mypage_lately_info --> | |
| </div> | |
| <!-- //content --> | |
| { # footer } | |
변경 후index.html
| <!-- //mypage_order_info --> | |
| <div class="mypage_lately_info"> | |
| <form method="post" class="reorder_form" name="frmOrderList" id="frmOrderList"> | |
| <div class="mypage_zone_tit"> | |
| <h3>{=__('최근 주문 정보')}<span>{=__('최근 30일 내에 주문하신 내역입니다.')}</span></h3> | |
| </div> | |
| <div class="mypage_lately_info_cont"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_reorder_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| <a href="../mypage/order_list.php" class="btn_board_more">+ {=__('더보기')}</a> | |
| <span class="list_footer_box"> | |
| <span class="list_left_content"></span> | |
| <span class="list_right_content"> | |
| <button type="button" class="btn_reorder_to_cart">장바구니 담기</button> | |
| <button type="button" class="btn_reorder_direct">바로 구매</button> | |
| </span> | |
| </span> | |
| </form> | |
| </div> | |
| <!-- //mypage_lately_info --> | |
| </div> | |
| <!-- //content --> | |
| <script type="text/javascript"> | |
| $(function(){ | |
| const maxReorderGoodsCount = parseInt('{=maxReorderGoodsCount}') || 0; | |
| // 재구매 관련 유효성 검사 | |
| function checkReorderGoodsCount(checkedCount) { | |
| if (checkedCount === 0) { | |
| alert('선택하신 상품이 없습니다.'); | |
| return false; | |
| } | |
| if (checkedCount > maxReorderGoodsCount) { | |
| alert('선택하신 주문의 상품 수가 ' + maxReorderGoodsCount + '개를 초과하여 장바구니에 담을 수 없습니다.'); | |
| return false; | |
| } | |
| return true; | |
| } | |
| // 재구매 - 장바구니 담기 | |
| $('.btn_reorder_to_cart').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 장바구니에 담으시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_to_cart').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: '', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| $('#allCheck').prop('checked', false); | |
| if (confirm(res.message)) { | |
| window.location.href = res.redirect; | |
| } else { | |
| location.reload(); | |
| } | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_to_cart').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| // 재구매 - 바로 구매 | |
| $('.btn_reorder_direct').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 주문하시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_direct').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: 'd', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| if (res.message) { | |
| alert(res.message); | |
| } | |
| window.location.href = res.redirect; | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_direct').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| }); | |
| </script> | |
| { # footer } | |
변경 전order_list.html
| <div class="date_check_box"> | |
| <form method="get" name="frmDateSearch"> | |
| <h3> {=__('조회기간')} </h3> | |
| <div class="date_check_list" data-target-name="wDate[]"> | |
| <button type="button" data-value="0">{=__('오늘')}</button> | |
| <button type="button" data-value="7">7{=__('일')}</button> | |
| <button type="button" data-value="15">15{=__('일')}</button> | |
| <button type="button" data-value="30">1{=__('개월')}</button> | |
| <button type="button" data-value="90">3{=__('개월')}</button> | |
| <button type="button" class="oneYear" data-value="365">1{=__('년')}</button> | |
| </div> | |
| <!-- //date_check_list --> | |
| <div class="date_check_calendar"> | |
| <input type="text" id="picker2" name="wDate[]" class="anniversary js_datepicker" value="{wDate[0]}"/> ~ <input type="text" name="wDate[]" class="anniversary js_datepicker" value="{wDate[1]}"/> | |
| </div> | |
| <!-- //date_check_calendar --> | |
| <button type="submit" class="btn_date_check"><em>{=__('조회')}</em></button> | |
| </form> | |
| </div> | |
| <!-- //date_check_box --> | |
| <div class="mypage_lately_info_cont"> | |
| <span class="pick_list_num"> | |
| <!--{ ? wData[0] && wDate[1] }--> | |
| <b><span>{=gd_date_format('Y.m.d', wDate[0])}</span> ~ <span>{=gd_date_format('Y.m.d', wDate[1])}</span></b> {=__('까지의')} | |
| <!--{ / }--> | |
| {=__('주문목록 / 배송조회 내역 총')} <strong>{=number_format(total)}</strong> {=__('건')} | |
| </span> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_order_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| </div> | |
| <script type="text/javascript"> | |
| $(function(){ | |
| // 인풋박스 선택 이벤트 | |
| if ($('.js_datepicker').length) { | |
| var today = new Date(); | |
| } else { | |
| $('.date_check_list').find('button[data-value="-1"]').trigger('click'); | |
| } | |
| } | |
| // 조회기간 검증 | |
| return false; | |
| } | |
| }); | |
| }); | |
| </script> | |
변경 후order_list.html
| <div class="date_check_box"> | |
| <form method="get" name="frmDateSearch"> | |
| <!-- 조회기간 영역 --> | |
| <div class="date_section"> | |
| <h3> {=__('조회기간')} </h3> | |
| <div class="date_check_list" data-target-name="wDate[]"> | |
| <button type="button" data-value="0">{=__('오늘')}</button> | |
| <button type="button" data-value="7">7{=__('일')}</button> | |
| <button type="button" data-value="15">15{=__('일')}</button> | |
| <button type="button" data-value="30">1{=__('개월')}</button> | |
| <button type="button" data-value="90">3{=__('개월')}</button> | |
| <button type="button" class="oneYear" data-value="365">1{=__('년')}</button> | |
| </div> | |
| <div class="date_check_calendar"> | |
| <input type="text" id="picker2" name="wDate[]" class="anniversary js_datepicker" | |
| value="{wDate[0]}" /> ~ <input type="text" name="wDate[]" | |
| class="anniversary js_datepicker" value="{wDate[1]}" /> | |
| </div> | |
| </div> | |
| <!-- //date_section --> | |
| <!-- 검색어 영역 --> | |
| <div class="search_section"> | |
| <h3> 검색어 </h3> | |
| <div class="search_box"> | |
| <select name="searchKey" class="chosen-select"> | |
| <option value="orderNo">주문번호</option> | |
| <option value="goodsNm">상품명</option>s | |
| <option value="goodsNo">상품코드</option> | |
| </select> | |
| <input type="text" name="searchKeyword" value="{=searchKeyword}" class="keyword_input" placeholder="검색어를 입력해주세요." /> | |
| </div> | |
| </div> | |
| <!-- //search_section --> | |
| <button type="submit" class="btn_date_check"><em>{=__('조회')}</em></button> | |
| </form> | |
| </div> | |
| <!-- //date_check_box --> | |
| <div class="mypage_lately_info_cont"> | |
| <form method="post" class="reorder_form" name="frmOrderList" id="frmOrderList"> | |
| <span class="pick_list_num list_header_box"> | |
| <span class="list_left_content"> | |
| <!--{ ? wData[0] && wDate[1] }--> | |
| <b><span>{=gd_date_format('Y.m.d', wDate[0])}</span> ~ <span>{=gd_date_format('Y.m.d', wDate[1])}</span></b> {=__('까지의')} | |
| <!--{ / }--> | |
| {=__('주문목록 / 배송조회 내역 총')} <strong>{=number_format(total)}</strong> {=__('건')} | |
| </span> | |
| <span class="list_right_content"> | |
| <button type="button" class="btn_reorder_to_cart">장바구니 담기</button> | |
| <button type="button" class="btn_reorder_direct">바로 구매</button> | |
| </span> | |
| </span> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_reorder_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| <span class="pick_list_num list_footer_box"> | |
| <span class="list_left_content"></span> | |
| <span class="list_right_content"> | |
| <button type="button" class="btn_reorder_to_cart">장바구니 담기</button> | |
| <button type="button" class="btn_reorder_direct">바로 구매</button> | |
| </span> | |
| </span> | |
| </form> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| </div> | |
| <script type="text/javascript"> | |
| $(function(){ | |
| const maxReorderGoodsCount = parseInt('{=maxReorderGoodsCount}') || 0; | |
| // 인풋박스 선택 이벤트 | |
| if ($('.js_datepicker').length) { | |
| var today = new Date(); | |
| } else { | |
| $('.date_check_list').find('button[data-value="-1"]').trigger('click'); | |
| } | |
| // 검색 키워드 적용 | |
| let searchKey = '{=searchKey}'; | |
| if (searchKey) { | |
| $('select[name="searchKey"]').val(searchKey).trigger('chosen:updated'); | |
| } | |
| } | |
| // 조회기간 검증 | |
| return false; | |
| } | |
| }); | |
| function checkReorderGoodsCount(checkedCount) { | |
| if (checkedCount === 0) { | |
| alert('선택하신 상품이 없습니다.'); | |
| return false; | |
| } | |
| if (checkedCount > maxReorderGoodsCount) { | |
| alert('선택하신 주문의 상품 수가 ' + maxReorderGoodsCount + '개를 초과하여 장바구니에 담을 수 없습니다.'); | |
| return false; | |
| } | |
| return true; | |
| } | |
| // 재구매 - 장바구니 담기 | |
| $('.btn_reorder_to_cart').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 장바구니에 담으시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_to_cart').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: '', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| $('#allCheck').prop('checked', false); | |
| if (confirm(res.message)) { | |
| window.location.href = res.redirect; | |
| } else { | |
| location.reload(); | |
| } | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_to_cart').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| // 재구매 - 바로 구매 | |
| $('.btn_reorder_direct').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 주문하시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_direct').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: 'd', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| if (res.message) { | |
| alert(res.message); | |
| } | |
| window.location.href = res.redirect; | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_direct').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| }); | |
| </script> | |
변경 전order_view.html
| <!-- 마이페이지 회원 요약정보 --> | |
| <div class="mypage_lately_info"> | |
| <div class="mypage_zone_tit"> | |
| <h3>{=__('주문/배송상세')} <strong class="order_num_view">({=__('주문번호')} : {orderInfo.orderNo} )</strong></h3> | |
| </div> | |
| <div class="mypage_lately_info_cont"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_order_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| </div> | |
| <!-- //mypage_lately_info --> | |
| <script type="text/javascript"> | |
| var taxInvoiceSubmitFlag = true; // 중복 클릭 방지용 | |
| $(document).ready(function () { | |
| $('input.number_only').on('keyup', function () { | |
| var value = $(this).val().replace(/[^0-9]/g, ''); | |
변경 후order_view.html
| <!-- 마이페이지 회원 요약정보 --> | |
| <div class="mypage_lately_info"> | |
| <form method="post" class="reorder_form" name="frmOrderList" id="frmOrderList"> | |
| <div class="mypage_zone_tit"> | |
| <h3>{=__('주문/배송상세')} <strong class="order_num_view">({=__('주문번호')} : {orderInfo.orderNo} )</strong></h3> | |
| </div> | |
| <div class="mypage_lately_info_cont"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_reorder_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| <span class="list_footer_box"> | |
| <span class="list_left_content"></span> | |
| <span class="list_right_content"> | |
| <button type="button" class="btn_reorder_to_cart">장바구니 담기</button> | |
| <button type="button" class="btn_reorder_direct">바로 구매</button> | |
| </span> | |
| </span> | |
| </form> | |
| </div> | |
| <!-- //mypage_lately_info --> | |
| <script type="text/javascript"> | |
| var taxInvoiceSubmitFlag = true; // 중복 클릭 방지용 | |
| $(document).ready(function () { | |
| const maxReorderGoodsCount = parseInt('{=maxReorderGoodsCount}') || 0; | |
| // 재구매 관련 유효성 검사 | |
| function checkReorderGoodsCount(checkedCount) { | |
| if (checkedCount === 0) { | |
| alert('선택하신 상품이 없습니다.'); | |
| return false; | |
| } | |
| if (checkedCount > maxReorderGoodsCount) { | |
| alert('선택하신 주문의 상품 수가 ' + maxReorderGoodsCount + '개를 초과하여 장바구니에 담을 수 없습니다.'); | |
| return false; | |
| } | |
| return true; | |
| } | |
| // 재구매 - 장바구니 담기 | |
| $('.btn_reorder_to_cart').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 장바구니에 담으시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_to_cart').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: '', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| $('#allCheck').prop('checked', false); | |
| if (confirm(res.message)) { | |
| window.location.href = res.redirect; | |
| } else { | |
| location.reload(); | |
| } | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_to_cart').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| // 재구매 - 바로 구매 | |
| $('.btn_reorder_direct').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 주문하시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_direct').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: 'd', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| if (res.message) { | |
| alert(res.message); | |
| } | |
| window.location.href = res.redirect; | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_direct').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| $('input.number_only').on('keyup', function () { | |
| var value = $(this).val().replace(/[^0-9]/g, ''); | |
변경 전order.html
| </div> | |
| <!-- //order_info --> | |
| <!--{ ? isPresentCartGoods === false}--> | |
| <div class="delivery_info"> | |
| <div class="order_zone_tit"> | |
| <h4>{=__('배송정보')}</h4> | |
변경 후order.html
| </div> | |
| <!-- //order_info --> | |
| <!--{ ? !isPresentCartGoods }--> | |
| <div class="delivery_info"> | |
| <div class="order_zone_tit"> | |
| <h4>{=__('배송정보')}</h4> | |
변경 전button.css
| .btn_select_cancel:hover{border:1px solid #bbbbbb; color:#333333;} | |
| .btn_goods_restock{display:inline-block; width:34%; height:42px; padding:0 3px; margin:0 0 0 5px; color:#fff; background:var(--primary-default); font-size:14px; border:1px solid var(--primary-default); text-align:center; cursor:pointer; font-weight:bold;} | |
| .btn_goods_restock:hover{border:1px solid var(--primary-hover); background:var(--primary-hover);} | |
변경 후button.css
| .btn_select_cancel:hover{border:1px solid #bbbbbb; color:#333333;} | |
| .btn_goods_restock{display:inline-block; width:34%; height:42px; padding:0 3px; margin:0 0 0 5px; color:#fff; background:var(--primary-default); font-size:14px; border:1px solid var(--primary-default); text-align:center; cursor:pointer; font-weight:bold;} | |
| .btn_goods_restock:hover{border:1px solid var(--primary-hover); background:var(--primary-hover);} | |
| /* 재구매 버튼 */ | |
| .btn_reorder_to_cart, | |
| .btn_reorder_direct { | |
| display: inline-block; | |
| min-width: 100px; | |
| height: 30px; | |
| color: var(--primary-default); | |
| font-weight: bold; | |
| border: 1px solid var(--primary-default); | |
| background: #ffffff; | |
| text-align: center; | |
| } | |
| .btn_reorder_to_cart:hover, | |
| .btn_reorder_direct:hover { | |
| border: 1px solid var(--primary-hover); | |
| color: var(--primary-hover); | |
| } | |
변경 전mypage.css
| width: 150px; | |
| } | |
| /* ------------- 최근 본 상품 ------------- */ | |
| .mypage_lately_goods{margin:50px 0 0 0;} | |
| .delivery-method-layer .delivery-method-layer-table { margin: 0 17px 0 0; } | |
| .delivery-method-layer .delivery-method-layer-table table { border-top: 1px solid #dbdbdb !important; } | |
| .delivery-method-layer .delivery-method-layer-table table tr th { border-top: 0px; } | |
변경 후mypage.css
| width: 150px; | |
| } | |
| .mypage_lately_info .date_check_box > form:has(.date_section, .search_section) { | |
| justify-content: center; | |
| flex-wrap: wrap; | |
| align-items: center; | |
| } | |
| .mypage_lately_info .date_check_box > form .date_section { | |
| flex-basis: 100%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| } | |
| .mypage_lately_info .date_check_box > form .search_section { | |
| flex-basis: auto; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| margin-top: 10px; | |
| flex-wrap: nowrap; | |
| } | |
| .mypage_lately_info .date_check_box > form .date_section h3, | |
| .mypage_lately_info .date_check_box > form .search_section h3 { | |
| width: 60px; | |
| text-align: left; | |
| } | |
| .mypage_lately_info .date_check_box > form .search_section .search_box { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| flex-wrap: nowrap; | |
| } | |
| .mypage_lately_info .date_check_box > form .search_section .search_box select { | |
| width: 108px; | |
| flex-shrink: 0; | |
| } | |
| .mypage_lately_info .date_check_box > form .search_section .search_box input.keyword_input { | |
| width: 420px; | |
| flex-shrink: 0; | |
| } | |
| .mypage_lately_info .date_check_box > form:has(.date_section, .search_section) > .btn_date_check { | |
| margin: 10px 10px 0 10px; | |
| flex-shrink: 0; | |
| white-space: nowrap; | |
| } | |
| /* ------------- 최근 본 상품 ------------- */ | |
| .mypage_lately_goods{margin:50px 0 0 0;} | |
| .delivery-method-layer .delivery-method-layer-table { margin: 0 17px 0 0; } | |
| .delivery-method-layer .delivery-method-layer-table table { border-top: 1px solid #dbdbdb !important; } | |
| .delivery-method-layer .delivery-method-layer-table table tr th { border-top: 0px; } | |
| /* 마이페이지 - 주문목록/배송조회 > 재구매 */ | |
| .reorder_form .mypage_table_type th { | |
| vertical-align: middle; | |
| } | |
| .reorder_form .mypage_table_type .td_chk { | |
| vertical-align: middle; | |
| } | |
| .reorder_form .mypage_table_type th .form_element { | |
| text-align: center; | |
| line-height: 0; | |
| } | |
| .reorder_form .mypage_table_type .td_chk .form_element { | |
| text-align: center; | |
| line-height: 0; | |
| } | |
| .reorder_form .mypage_table_type .form_element label.check_s { | |
| padding: 0 11px 0 11px; | |
| min-width: 13px; | |
| display: inline-block; | |
| background-position: center center; | |
| } | |
| .reorder_form .list_header_box, | |
| .reorder_form .list_footer_box { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 10px 0 10px 0; | |
| } | |
| .reorder_form .list_header_box .list_left_content, | |
| .reorder_form .list_footer_box .list_left_content { | |
| text-align: left; | |
| } | |
| .reorder_form .list_header_box .list_right_content, | |
| .reorder_form .list_footer_box .list_right_content { | |
| text-align: right; | |
| } | |
| .btn_reorder_to_cart + .btn_reorder_direct { | |
| margin-left: 5px; | |
| } | |
| /* 주문목록/배송조회 검색어 셀렉트 폰트 색상 */ | |
| #wrap .date_check_box .search_section .chosen-single { | |
| color: #717171; | |
| } | |
변경 전_reorder_goods_list.html
변경 후_reorder_goods_list.html
| {*** 마이페이지 재구매용 주문상품리스트 | mypage/_reorder_goods_list.html ***} | |
| <div class="mypage_table_type"> | |
| <table> | |
| <colgroup> | |
| <col style="width:5%"> <!-- 주문 체크박스--> | |
| <col style="width:15%"> <!-- 날짜/주문번호 --> | |
| <col style="width:5%"> <!-- 재구매 체크박스--> | |
| <col> <!-- 상품명/옵션 --> | |
| <col style="width:15%"> <!-- 상품금액/수량 --> | |
| <col style="width:15%"> <!-- 주문상태 --> | |
| <col style="width:15%"> <!-- 확인/리뷰 --> | |
| </colgroup> | |
| <thead> | |
| <tr> | |
| <th> | |
| <div class="form_element"> | |
| <input type="checkbox" id="allCheck" /> | |
| <label for="allCheck" class="check_s"></label> | |
| </div> | |
| </th> | |
| <th>{=__('날짜/주문번호')}</th> | |
| <th></th> | |
| <th>{=__('상품명/옵션')}</th> | |
| <th>{=__('상품금액/수량')}</th> | |
| <th>{=__('주문상태')}</th> | |
| <th>{=__('확인/리뷰')}</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <!--{ ? orderData }--> | |
| <!--{ @ orderData }--> | |
| <!--{ @ .goods }--> | |
| <tr class="{ ? .orderGoodsCnt > 0 && (..index_ + 1 != .orderGoodsCnt || empty(..addGoods) === false) }row_line{ / }" data-order-no="{.orderNo}" data-order-goodsno="{..sno}" data-order-status="{..orderStatus}" data-order-userhandlesno="{..userHandleSno}" > | |
| <!--{ ? ..index_ == 0 }--> | |
| <td rowspan="{.orderGoodsCnt + .orderAddGoodsCnt}" class="td_chk"> | |
| <div class="form_element"> | |
| <input type="checkbox" name="reorderOrderNo[]" id="reorder_order_{.orderNo}" class="order_checkbox" data-order-no="{.orderNo}" /> | |
| <label for="reorder_order_{.orderNo}" class="check_s"></label> | |
| </div> | |
| </td> | |
| <td rowspan="{.orderGoodsCnt + .orderAddGoodsCnt}" class="order_day_num"> | |
| <em>{=gd_date_format('Y/m/d', .regDt)}</em> | |
| <a href="../mypage/order_view.php?orderNo={.orderNo}" <!--{ ? mode !== 'list' }-->target="_blank"<!--{ / }--> class="order_num_link"><span>{.orderNo}</span></a> | |
| <div class="btn_claim"> | |
| <!--{ ? .orderChannelFl != 'naverpay' }--> | |
| <!--{ ? mode !== 'backRegist' && mode !== 'refundRegist' && mode !== 'exchangeRegist' && .orderSettleButton === true }--> | |
| <span class="btn_gray_list"><a href="#orderSettleLayer" class="btn_gray_small btn_open_layer" data-order-no="{.orderNo}"><span>{=__('구매확정')}</span></a></span> | |
| <!--{ / }--> | |
| <!--{ ? substr(..orderStatus, 0, 1) == 'o'}--> | |
| <span class="btn_gray_list"><a href="#" class="btn_gray_small js_btn_order_cancel"><span>{=__('주문취소')}</span></a></span> | |
| <!--{ : }--> | |
| <!--{ ? .canRefund == true && gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && userHandleFl === true }--> | |
| <span class="btn_gray_list"><a href="../mypage/layer_order_refund_regist.php?mode=refundRegist&orderNo={.orderNo}" class="btn_gray_small"><span>{=__('환불신청')}</span></a></span> | |
| <!--{ / }--> | |
| <!--{ ? .canBack == true && gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && userHandleFl === true }--> | |
| <span class="btn_gray_list"><a href="../mypage/layer_order_back_regist.php?mode=backRegist&orderNo={.orderNo}" class="btn_gray_small"><span>{=__('반품신청')}</span></a></span> | |
| <!--{ / }--> | |
| <!--{ ? .canExchange == true && gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && userHandleFl === true }--> | |
| <span class="btn_gray_list"><a href="../mypage/layer_order_exchange_regist.php?mode=exchangeRegist&orderNo={.orderNo}" class="btn_gray_small"><span>{=__('교환신청')}</span></a></span> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| </div> | |
| </td> | |
| <!--{ / }--> | |
| <!--{ ? ..goodsType === 'goods' }--> | |
| <td class="td_chk"> | |
| <div class="form_element"> | |
| <input type="checkbox" name="reorderGoodsNo[]" id="reorder_goods_{..sno}" class="goods_checkbox" | |
| data-goods-type="{..goodsType}" | |
| data-order-no="{.orderNo}" | |
| data-goods-no="{..goodsNo}" | |
| data-option-sno="{..optionSno}" | |
| data-goods-cnt="{..goodsCnt}" | |
| data-scm-no="{..scmNo}" | |
| data-option-text-info='{=json_encode(..optionTextInfo)}' | |
| data-goods-price="{..goodsPrice}" | |
| data-delivery-method-fl="{..deliveryMethodFl}" | |
| data-delivery-collect-fl="{..goodsDeliveryCollectFl}" | |
| /> | |
| <label for="reorder_goods_{..sno}" class="check_s"></label> | |
| </div> | |
| </td> | |
| <!--{ : }--> | |
| <td class="td_chk"></td> | |
| <!--{ / }--> | |
| <td class="td_left"> | |
| <div class="pick_add_cont"> | |
| <!--{ ? ..goodsType === 'addGoods' }--> | |
| <span class="pick_add_plus">{=__('추가')}</span> | |
| <span class="pick_add_img"> | |
| {..goodsImage} | |
| </span> | |
| <!--{ : }--> | |
| <span class="pick_add_img"> | |
| <a href="../goods/goods_view.php?goodsNo={..goodsNo}">{..goodsImage}</a> | |
| </span> | |
| <!--{ / }--> | |
| <div class="pick_add_info"> | |
| <!--{ ? ..handleMode === 'z' }--> | |
| <div><span class="exchange_add_info">교환추가</span></div> | |
| <!--{ / }--> | |
| <!--{ ? ..goodsType === 'addGoods' }--> | |
| <a href="../goods/goods_view.php?goodsNo={..parentGoodsNo}"><em>{..goodsNm}</em></a> | |
| <!--{ : }--> | |
| <a href="../goods/goods_view.php?goodsNo={..goodsNo}"><em>{..goodsNm}</em></a> | |
| <!--{ / }--> | |
| <!--{ @ ..optionInfo }--> | |
| <span class="text_type_cont"> | |
| {...value_.optionName} : {...value_.optionValue} | |
| <!--{ ? ...value_.optionRealPrice != 0 && optionPriceFl == 'y' }--> | |
| (<!--{ ? ...value_.optionRealPrice > 0 }-->+<!--{ / }-->{=gd_global_order_currency_display(...value_.optionRealPrice, null, null)}) | |
| <!--{ / }--> | |
| <!--{ ? ...index_ == ...size_ - 1 }--> | |
| <!--{ ? empty(...value_.deliveryInfoStr) === false }--> [{...value_.deliveryInfoStr}]<!--{ / }--> | |
| <!--{ / }--> | |
| </span> | |
| <!--{ / }--> | |
| <!--{ ? ..optionTextInfo }--> | |
| <!--{ @ ..optionTextInfo }--> | |
| <span class="text_type_cont"> | |
| {...value_.optionName} : {...value_.optionValue} | |
| <!--{ ? ...value_.optionTextPrice != 0 && optionPriceFl == 'y' }--> | |
| (<!--{ ? ...value_.optionTextPrice > 0 }-->+<!--{ / }-->{=gd_global_order_currency_display(...value_.optionTextPrice, null, null)}) | |
| <!--{ / }--> | |
| </span> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| </div> | |
| </div> | |
| <!-- //pick_add_info --> | |
| </td> | |
| <td><strong>{=gd_global_order_currency_display(((..goodsPrice + ..optionPrice + ..optionTextPrice) * ..goodsCnt),.exchangeRate, .currencyPolicy)}</strong> / {..goodsCnt}{=__('개')}</td> | |
| <td> | |
| <!--{ ? ..userHandleSno > 0 && ..handleSno == 0 }--> | |
| <em> | |
| <!--{ ? ..userHandleFl == 'n' }--> | |
| <!--{ ? ..userHandleMode == 'b' }--> | |
| {=__('반품거절')} | |
| <!--{ : ..userHandleMode == 'r' }--> | |
| {=__('환불거절')} | |
| <!--{ : ..userHandleMode == 'e' }--> | |
| {=__('교환거절')} | |
| <!--{ / }--> | |
| <!--{ : ..userHandleFl == 'y' }--> | |
| <!--{ ? ..userHandleMode == 'b' }--> | |
| {=__('반품승인')} | |
| <!--{ : ..userHandleMode == 'r' }--> | |
| {=__('환불승인')} | |
| <!--{ : ..userHandleMode == 'e' }--> | |
| {=__('교환승인')} | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <!--{ ? ..userHandleMode == 'b' }--> | |
| {=__('반품신청')} | |
| <!--{ : ..userHandleMode == 'r' }--> | |
| {=__('환불신청')} | |
| <!--{ : ..userHandleMode == 'e' }--> | |
| {=__('교환신청')} | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| </em> | |
| <!--{ : }--> | |
| <em> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === false && (substr(..orderStatus, 0, 1) == 'c' || ..orderStatus == 'b4' || ..orderStatus == 'e5' || ..orderStatus == 'r3') && ..handleDetailReasonShowFl == 'y' }--> | |
| <a href="#lyReason" class="order_num_link btn_open_layer"> | |
| <!--{ / }--> | |
| <!--{ ? ..orderStatus == 'd2' }--> | |
| {eachOrderStatus.d2.name} | |
| <!--{ : ..orderStatus == 'b4' }--> | |
| {eachOrderStatus.b4.name} | |
| <!--{ : ..orderStatus == 'e5' }--> | |
| {eachOrderStatus.e5.name} | |
| <!--{ : ..orderStatus == 'r3' }--> | |
| {eachOrderStatus.r3.name} | |
| <!--{ : }--> | |
| {..orderStatusStr} | |
| <!--{ ? ..naverpayStatus.code == 'DelayProductOrder'}--> | |
| ({=..naverpayStatus.notice}) | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === false && (substr(..orderStatus, 0, 1) == 'c' || ..orderStatus == 'b4' || ..orderStatus == 'e5' || ..orderStatus == 'r3') && ..handleDetailReasonShowFl == 'y' }--> | |
| </a> | |
| <!--{ / }--> | |
| </em> | |
| <!--{ / }--> | |
| <div class="btn_gray_list"> | |
| <!--{ ? (substr(..orderStatus, 0, 1) == 'd' || substr(..orderStatus, 0, 1) == 's' || substr(..orderStatus, 0, 1) == 'z') && ..invoiceNo }--> | |
| <!--{ ? ..deliveryMethodFl == 'delivery' || ..deliveryMethodFl == 'packet' || !..deliveryMethodFl }--> | |
| ({=__(..deliveryMethodFlText)}) - <a href="#" class="btn_gray_small js_btn_delivery_trace" data-invoice-company-sno="{..invoiceCompanySno}" data-invoice-no="{..invoiceNo}"><span>{=__('배송추적')}</span></a> | |
| <!--{ : }--> | |
| <div style="margin-bottom: 7px;"> | |
| (<a href="#deliveryMethodLayer" class="style-none btn_open_layer">{..deliveryMethodFlText}</a>) | |
| </div> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <div>({=__(..deliveryMethodFlText)})</div> | |
| <!--{ / }--> | |
| <!--{ ? ..orderStatus == 'd1' }--> | |
| <a href="#" class="btn_gray_small js_btn_order_delivery"><span>{=__('수취확인')}</span></a> | |
| <!--{ / }--> | |
| </div> | |
| </td> | |
| <td> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && (..userHandleSno > 0 || (..handleSno > 0 && ..handleDetailReasonShowFl == 'y')) }--> | |
| <span class="btn_gray_list"> | |
| <a href="#lyReason" class="btn_gray_small btn_refund_state btn_open_layer"> | |
| <span> | |
| <!--{ ? ..userHandleMode == 'b' || ..handleMode == 'b' }--> | |
| {=__('반품사유')} | |
| <!--{ : ..userHandleMode == 'r' || ..handleMode == 'r' }--> | |
| {=__('환불사유')} | |
| <!--{ : ..userHandleMode == 'e' || ..handleMode == 'e'}--> | |
| {=__('교환사유')} | |
| <!--{ : ..userHandleMode == 'c' || ..handleMode == 'c'}--> | |
| {=__('취소사유')} | |
| <!--{ / }--> | |
| </span> | |
| </a> | |
| </span> | |
| <!--{ : substr(..orderStatus, 0, 1) == 'd' }--> | |
| <a href="#;" class="btn_buy_ok js_btn_order_settle" data-goods-no="{..sno}"><span>{=__('구매확정')}</span></a> | |
| <!--{ / }--> | |
| <!--{ ? ..viewWriteGoodsReview }--> | |
| <div class="button"><a class="skinbtn point2 btn_review_write ogl_reviewrite btn_open_layer" data-id="{goodsReviewId}" data-goods-no="{..goodsNo}" data-sno="{..sno}" href="#writeReviewLayer"><em>{=__('리뷰쓰기')}</em></a></div> | |
| <!--{/}--> | |
| <!--{ ? ..viewWritePlusReview }--> | |
| <div class="button"><a class="skinbtn point2 btn_review_write" href="javascript:gd_popup_plus_review_write({=..sno}, '{=..goodsNo}')"><em>{=__('리뷰등록')}</em></a></div> | |
| <!--{/}--> | |
| <!--{ ? ..naverpayStatus.code == 'DelayProductOrder'}--> | |
| <a href="#orderDetailReasonLayer" class="btn_buy_ok btn_open_layer" data-goods-no="{..sno}"><span>{=__('지연사유')}</span></a> | |
| <!--{ / }--> | |
| </td> | |
| </tr> | |
| <!--{ ? empty(..addGoods) === false }--> | |
| <!--{ @ ..addGoods }--> | |
| <tr class="{ ? .orderAddGoodsCnt > 0 && (..index_ + ...index_) + 2 != (.orderGoodsCnt + .orderAddGoodsCnt) }row_line{ / }"> | |
| <td class="td_left"> | |
| <div class="pick_add_cont"> | |
| <span class="pick_add_plus">{=__('추가')}</span> | |
| <span class="pick_add_img"> | |
| <a href="../goods/goods_view.php?goodsNo={..goodsNo}">{...goodsImage}</a> | |
| </span> | |
| <div class="pick_add_info"> | |
| <em><a href="../goods/goods_view.php?goodsNo={..goodsNo}">{...goodsNm}</a></em> | |
| <span class="text_type_cont">{=__('옵션')} : </span> | |
| <span class="text_type_cont">{...optionNm}</span> | |
| </div> | |
| </div> | |
| <!-- //pick_add_info --> | |
| </td> | |
| <td><strong>{=gd_global_order_currency_display(...goodsPrice,.exchangeRate, .currencyPolicy)}</strong>원 / {...goodsCnt}{=__('개')}</td> | |
| <td></td> | |
| <td></td> | |
| </tr> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <tr> | |
| <td colspan="7"><p class="no_data">{=__('조회내역이 없습니다.')}</p></td> | |
| </tr> | |
| <!--{ / }--> | |
| </tbody> | |
| </table> | |
| </div> | |
| <!-- 사유 레이어 --> | |
| <div id="lyReason" class="layer_wrap reason_layer dn" data-remote="../mypage/layer_order_refund_reason.php"></div> | |
| <!--//사유 레이어 --> | |
| <div id="lyWritePop" class="layer_wrap board_write_layer dn"></div> | |
| <!-- 네이버페이 상세정보 레이어 --> | |
| <div id="orderDetailReasonLayer" class="layer_wrap reason_layer dn" data-remote="../mypage/layer_order_naverpay_reason.php"></div> | |
| <!--//네이버페이 상세정보 레이어 --> | |
| <!-- 배송방식 상태 확인 레이어(택배제외) --> | |
| <div id="deliveryMethodLayer" class="layer_wrap dn" data-remote="../mypage/layer_order_delivery_method.php"></div> | |
| <!-- 배송방식 상태 확인 레이어(택배제외) --> | |
| <!-- 구매확정 레이어 --> | |
| <div id="orderSettleLayer" class="layer_wrap settle_layer dn" data-remote="../mypage/layer_order_settle.php"></div> | |
| <!-- 구매확정 레이어 --> | |
| <script type="text/javascript"> | |
| // 페이지 진입 시 재구매 체크박스 초기화 | |
| window.addEventListener('pageshow', function() { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| $('#allCheck').prop('checked', false); | |
| }); | |
| $(function () { | |
| // 구매취소 | |
| $('.js_btn_order_cancel').click(function (e) { | |
| if (confirm("{=__('주문취소 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'cancelRegist', | |
| orderNo: $(this).closest('tr').data('order-no'), | |
| orderGoodsNo: $(this).closest('tr').data('order-goodsno'), | |
| orderStatus: $(this).closest('tr').data('order-status') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 구매확정 | |
| $('.js_btn_order_settle').click(function (e) { | |
| if (confirm("{=__('구매확정 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'settleRegist', | |
| orderNo: $(this).closest('tr').data('order-no'), | |
| orderGoodsNo: $(this).closest('tr').data('order-goodsno') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 수취확인 | |
| $('.js_btn_order_delivery').click(function (e) { | |
| if (confirm("{=__('수취확인 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'deliveryCompleteRegist', | |
| orderNo: $(this).closest('tr').data('order-no'), | |
| orderGoodsNo: $(this).closest('tr').data('order-goodsno') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 배송추적 | |
| $('.js_btn_delivery_trace').click(function (e) { | |
| win = gd_popup({ | |
| url: '../share/delivery_trace.php?invoiceCompanySno=' + $(this).data('invoice-company-sno') + '&invoiceNo=' + $(this).data('invoice-no'), | |
| target: 'trace', | |
| width: 650, | |
| height: 660, | |
| resizable: 'yes', | |
| scrollbars: 'yes' | |
| }); | |
| win.focus(); | |
| return win; | |
| }); | |
| // 레이어 오픈 바인딩 | |
| $('.btn_open_layer').bind('click', function (e) { | |
| e.preventDefault(); | |
| // 일반 레이어 호출 | |
| if ($(this).attr('href') == '#lyReason') { | |
| gd_call_layer_handler($(this)); | |
| // 리뷰쓰기 레이어 호출 | |
| } else if ($(this).attr('href') == '#writeReviewLayer') { | |
| var bdId = $(this).data('id'); | |
| var goodsNo = $(this).data('goods-no'); | |
| var sno = $(this).data('sno'); | |
| gd_open_write_layer(bdId, goodsNo,sno); | |
| //구매확정 레이어 호출 | |
| } else if ($(this).attr('href') == '#orderSettleLayer') { | |
| var target = $(this).attr('href'); | |
| var url = $(target).data('remote'); | |
| var params = { | |
| orderNo: $(this).data('order-no') | |
| }; | |
| $(target).empty(); | |
| $.post(url, params, function (data) { | |
| $(target).empty().html(data); | |
| $(target).find('>div').center(); | |
| }); | |
| // 레이어 confirm 호출 | |
| } else if ($(this).attr('href') == '#orderDetailReasonLayer') { | |
| var orderGoodsNo = $(this).data('goods-no'); | |
| var target = $(this).attr('href'); | |
| var url = $(target).data('remote'); | |
| var params = { | |
| orderNo: $(this).closest('tr').data('order-no'), | |
| orderGoodsNo: orderGoodsNo | |
| }; | |
| $(target).empty(); | |
| $.post(url, params, function (data) { | |
| if (!_.isUndefined(data.code) && data.code == 0) { | |
| alert(data.message); | |
| gd_close_layer(); | |
| return false; | |
| } | |
| $(target).empty().html(data); | |
| $(target).find('>div').center(); | |
| }); | |
| // 레이어 confirm 호출 | |
| } else if ($(this).attr('href') == '#deliveryMethodLayer') { | |
| gd_call_layer_handler($(this)); | |
| } else if ($(this).attr('href') == '#visitAddressLayer') { | |
| var target = $(this).attr('href'); | |
| var url = $(target).data('remote'); | |
| var params = { | |
| orderNo: $(this).data('order-no'), | |
| goodsSno: $(this).data('goods-sno') | |
| }; | |
| $(target).empty(); | |
| $.get(url, params, function (data) { | |
| if (!_.isUndefined(data.code) && data.code == 0) { | |
| alert(data.message); | |
| gd_close_layer(); | |
| return false; | |
| } | |
| $(target).empty().html(data); | |
| $(target).find('>div').center(); | |
| }); | |
| } else { | |
| if (confirm($(this).text() + "{=__('처리를 하시겠습니까?')}")) { | |
| gd_call_layer_handler($(this)); | |
| } else { | |
| return false; | |
| } | |
| } | |
| }); | |
| function gd_call_layer_handler(obj) { | |
| var target = obj.attr('href'); | |
| var url = $(target).data('remote'); | |
| var params = { | |
| orderNo: obj.closest('tr').data('order-no'), | |
| orderGoodsNo: obj.closest('tr').data('order-goodsno'), | |
| orderStatus: obj.closest('tr').data('order-status'), | |
| userHandleSno: obj.closest('tr').data('order-userhandlesno') | |
| }; | |
| $(target).empty(); | |
| $.post(url, params, function (data) { | |
| if (!_.isUndefined(data.code) && data.code == 0) { | |
| alert(data.message); | |
| gd_close_layer(); | |
| return false; | |
| } | |
| $(target).empty().html(data); | |
| $(target).find('>div').center(); | |
| }); | |
| } | |
| // 체크박스 상태 + label on 클래스 동기화 | |
| function setChecked(checkboxes, checked) { | |
| checkboxes.prop('checked', checked).each(function() { | |
| $('label[for="' + $(this).attr('id') + '"]').toggleClass('on', checked); | |
| }); | |
| } | |
| // 전체선택 → 주문 + 상품 체크박스 모두 선택/해제 | |
| $('#allCheck').click(function () { | |
| let isChecked = $(this).is(':checked'); | |
| setChecked($('input[name="reorderOrderNo[]"]'), isChecked); | |
| setChecked($('input.goods_checkbox'), isChecked); | |
| }); | |
| // 주문 체크박스 클릭 → 해당 주문의 상품 전체 선택/해제 | |
| $('input:checkbox[name="reorderOrderNo[]"]').click(function () { | |
| let orderNo = $(this).data('orderNo'); | |
| let isChecked = $(this).is(':checked'); | |
| setChecked($('input.goods_checkbox[data-order-no="' + orderNo + '"]'), isChecked); | |
| updateAllCheckState(); | |
| }); | |
| // 상품 체크박스 클릭 → 주문 체크박스 상태 동기화 | |
| $('input.goods_checkbox').click(function () { | |
| let orderNo = $(this).data('orderNo'); | |
| let goodsInOrder = $('input.goods_checkbox[data-order-no="' + orderNo + '"]'); | |
| let isAllChecked = (goodsInOrder.length === goodsInOrder.filter(':checked').length); | |
| setChecked($('input.order_checkbox[data-order-no="' + orderNo + '"]'), isAllChecked); | |
| updateAllCheckState(); | |
| }); | |
| // 전체선택 체크박스 상태 갱신 | |
| function updateAllCheckState() { | |
| let orderCheckboxes = $('input[name="reorderOrderNo[]"]:checkbox'); | |
| let isAllChecked = (orderCheckboxes.length === orderCheckboxes.filter(':checked').length); | |
| setChecked($('#allCheck'), isAllChecked); | |
| } | |
| }); | |
| </script> | |
| <script type="text/javascript" src="\{=c.PATH_SKIN}js/gd_board_goods.js" charset="utf-8"></script> | |
변경 전index.html
| <!-- //mypage_order_info --> | |
| <div class="mypage_lately_info"> | |
| <div class="mypage_zone_tit"> | |
| <h3>{=__('최근 주문 정보')}<span>{=__('최근 30일 내에 주문하신 내역입니다.')}</span></h3> | |
| </div> | |
| <div class="mypage_lately_info_cont"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_order_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| <a href="../mypage/order_list.php" class="btn_board_more">+ {=__('더보기')}</a> | |
| </div> | |
| <!-- //mypage_lately_info --> | |
| </div> | |
| <!-- //content --> | |
| { # footer } | |
변경 후index.html
| <!-- //mypage_order_info --> | |
| <div class="mypage_lately_info"> | |
| <form method="post" class="reorder_form" name="frmOrderList" id="frmOrderList"> | |
| <div class="mypage_zone_tit"> | |
| <h3>{=__('최근 주문 정보')}<span>{=__('최근 30일 내에 주문하신 내역입니다.')}</span></h3> | |
| </div> | |
| <div class="mypage_lately_info_cont"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_reorder_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| <a href="../mypage/order_list.php" class="btn_board_more">+ {=__('더보기')}</a> | |
| <span class="list_footer_box"> | |
| <span class="list_left_content"></span> | |
| <span class="list_right_content"> | |
| <button type="button" class="btn_reorder_to_cart">장바구니 담기</button> | |
| <button type="button" class="btn_reorder_direct">바로 구매</button> | |
| </span> | |
| </span> | |
| </form> | |
| </div> | |
| <!-- //mypage_lately_info --> | |
| </div> | |
| <!-- //content --> | |
| <script type="text/javascript"> | |
| $(function(){ | |
| const maxReorderGoodsCount = parseInt('{=maxReorderGoodsCount}') || 0; | |
| // 재구매 관련 유효성 검사 | |
| function checkReorderGoodsCount(checkedCount) { | |
| if (checkedCount === 0) { | |
| alert('선택하신 상품이 없습니다.'); | |
| return false; | |
| } | |
| if (checkedCount > maxReorderGoodsCount) { | |
| alert('선택하신 주문의 상품 수가 ' + maxReorderGoodsCount + '개를 초과하여 장바구니에 담을 수 없습니다.'); | |
| return false; | |
| } | |
| return true; | |
| } | |
| // 재구매 - 장바구니 담기 | |
| $('.btn_reorder_to_cart').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 장바구니에 담으시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_to_cart').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: '', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| $('#allCheck').prop('checked', false); | |
| if (confirm(res.message)) { | |
| window.location.href = res.redirect; | |
| } else { | |
| location.reload(); | |
| } | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_to_cart').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| // 재구매 - 바로 구매 | |
| $('.btn_reorder_direct').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 주문하시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_direct').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: 'd', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| if (res.message) { | |
| alert(res.message); | |
| } | |
| window.location.href = res.redirect; | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_direct').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| }); | |
| </script> | |
| { # footer } | |
변경 전order_list.html
| <div class="date_check_box"> | |
| <form method="get" name="frmDateSearch"> | |
| <h3> {=__('조회기간')} </h3> | |
| <div class="date_check_list" data-target-name="wDate[]"> | |
| <button type="button" data-value="0">{=__('오늘')}</button> | |
| <button type="button" data-value="7">7{=__('일')}</button> | |
| <button type="button" data-value="15">15{=__('일')}</button> | |
| <button type="button" data-value="30">1{=__('개월')}</button> | |
| <button type="button" data-value="90">3{=__('개월')}</button> | |
| <button type="button" class="oneYear" data-value="365">1{=__('년')}</button> | |
| </div> | |
| <!-- //date_check_list --> | |
| <div class="date_check_calendar"> | |
| <input type="text" id="picker2" name="wDate[]" class="anniversary js_datepicker" value="{wDate[0]}"/> ~ <input type="text" name="wDate[]" class="anniversary js_datepicker" value="{wDate[1]}"/> | |
| </div> | |
| <!-- //date_check_calendar --> | |
| <button type="submit" class="btn_date_check"><em>{=__('조회')}</em></button> | |
| </form> | |
| </div> | |
| <!-- //date_check_box --> | |
| <div class="mypage_lately_info_cont"> | |
| <span class="pick_list_num"> | |
| <!--{ ? wData[0] && wDate[1] }--> | |
| <b><span>{=gd_date_format('Y.m.d', wDate[0])}</span> ~ <span>{=gd_date_format('Y.m.d', wDate[1])}</span></b> {=__('까지의')} | |
| <!--{ / }--> | |
| {=__('주문목록 / 배송조회 내역 총')} <strong>{=number_format(total)}</strong> {=__('건')} | |
| </span> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_order_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| </div> | |
| <script type="text/javascript"> | |
| $(function(){ | |
| // 인풋박스 선택 이벤트 | |
| if ($('.js_datepicker').length) { | |
| var today = new Date(); | |
| } else { | |
| $('.date_check_list').find('button[data-value="-1"]').trigger('click'); | |
| } | |
| } | |
| // 조회기간 검증 | |
| return false; | |
| } | |
| }); | |
| }); | |
| </script> | |
변경 후order_list.html
| <div class="date_check_box"> | |
| <form method="get" name="frmDateSearch"> | |
| <!-- 조회기간 영역 --> | |
| <div class="date_section"> | |
| <h3> {=__('조회기간')} </h3> | |
| <div class="date_check_list" data-target-name="wDate[]"> | |
| <button type="button" data-value="0">{=__('오늘')}</button> | |
| <button type="button" data-value="7">7{=__('일')}</button> | |
| <button type="button" data-value="15">15{=__('일')}</button> | |
| <button type="button" data-value="30">1{=__('개월')}</button> | |
| <button type="button" data-value="90">3{=__('개월')}</button> | |
| <button type="button" class="oneYear" data-value="365">1{=__('년')}</button> | |
| </div> | |
| <div class="date_check_calendar"> | |
| <input type="text" id="picker2" name="wDate[]" class="anniversary js_datepicker" | |
| value="{wDate[0]}" /> ~ <input type="text" name="wDate[]" | |
| class="anniversary js_datepicker" value="{wDate[1]}" /> | |
| </div> | |
| </div> | |
| <!-- //date_section --> | |
| <!-- 검색어 영역 --> | |
| <div class="search_section"> | |
| <h3> 검색어 </h3> | |
| <div class="search_box"> | |
| <select name="searchKey" class="chosen-select"> | |
| <option value="orderNo">주문번호</option> | |
| <option value="goodsNm">상품명</option> | |
| <option value="goodsNo">상품코드</option> | |
| </select> | |
| <input type="text" name="searchKeyword" value="{=searchKeyword}" class="keyword_input" placeholder="검색어를 입력해주세요." /> | |
| </div> | |
| </div> | |
| <!-- //search_section --> | |
| <button type="submit" class="btn_date_check"><em>{=__('조회')}</em></button> | |
| </form> | |
| </div> | |
| <!-- //date_check_box --> | |
| <div class="mypage_lately_info_cont"> | |
| <form method="post" class="reorder_form" name="frmOrderList" id="frmOrderList"> | |
| <span class="pick_list_num list_header_box"> | |
| <span class="list_left_content"> | |
| <!--{ ? wData[0] && wDate[1] }--> | |
| <b><span>{=gd_date_format('Y.m.d', wDate[0])}</span> ~ <span>{=gd_date_format('Y.m.d', wDate[1])}</span></b> {=__('까지의')} | |
| <!--{ / }--> | |
| {=__('주문목록 / 배송조회 내역 총')} <strong>{=number_format(total)}</strong> {=__('건')} | |
| </span> | |
| <span class="list_right_content"> | |
| <button type="button" class="btn_reorder_to_cart">장바구니 담기</button> | |
| <button type="button" class="btn_reorder_direct">바로 구매</button> | |
| </span> | |
| </span> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_reorder_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| <span class="pick_list_num list_footer_box"> | |
| <span class="list_left_content"></span> | |
| <span class="list_right_content"> | |
| <button type="button" class="btn_reorder_to_cart">장바구니 담기</button> | |
| <button type="button" class="btn_reorder_direct">바로 구매</button> | |
| </span> | |
| </span> | |
| </form> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| </div> | |
| <script type="text/javascript"> | |
| $(function(){ | |
| const maxReorderGoodsCount = parseInt('{=maxReorderGoodsCount}') || 0; | |
| // 인풋박스 선택 이벤트 | |
| if ($('.js_datepicker').length) { | |
| var today = new Date(); | |
| } else { | |
| $('.date_check_list').find('button[data-value="-1"]').trigger('click'); | |
| } | |
| // 검색 키워드 적용 | |
| let searchKey = '{=searchKey}'; | |
| if (searchKey) { | |
| $('select[name="searchKey"]').val(searchKey).trigger('chosen:updated'); | |
| } | |
| } | |
| // 조회기간 검증 | |
| return false; | |
| } | |
| }); | |
| // 재구매 관련 유효성 검사 | |
| function checkReorderGoodsCount(checkedCount) { | |
| if (checkedCount === 0) { | |
| alert('선택하신 상품이 없습니다.'); | |
| return false; | |
| } | |
| if (checkedCount > maxReorderGoodsCount) { | |
| alert('선택하신 주문의 상품 수가 ' + maxReorderGoodsCount + '개를 초과하여 장바구니에 담을 수 없습니다.'); | |
| return false; | |
| } | |
| return true; | |
| } | |
| // 재구매 - 장바구니 담기 | |
| $('.btn_reorder_to_cart').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 장바구니에 담으시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_to_cart').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: '', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| $('#allCheck').prop('checked', false); | |
| if (confirm(res.message)) { | |
| window.location.href = res.redirect; | |
| } else { | |
| location.reload(); | |
| } | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_to_cart').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| // 재구매 - 바로 구매 | |
| $('.btn_reorder_direct').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 주문하시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_direct').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: 'd', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| if (res.message) { | |
| alert(res.message); | |
| } | |
| window.location.href = res.redirect; | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_direct').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| }); | |
| </script> | |
변경 전order_view.html
| <!-- 마이페이지 회원 요약정보 --> | |
| <div class="mypage_lately_info"> | |
| <div class="mypage_zone_tit"> | |
| <h3>{=__('주문/배송상세')} <strong class="order_num_view">({=__('주문번호')} : {orderInfo.orderNo} )</strong></h3> | |
| </div> | |
| <div class="mypage_lately_info_cont"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_order_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| </div> | |
| <!-- //mypage_lately_info --> | |
| <script type="text/javascript"> | |
| var taxInvoiceSubmitFlag = true; // 중복 클릭 방지용 | |
| $(document).ready(function () { | |
| $('input.number_only').on('keyup', function () { | |
| var value = $(this).val().replace(/[^0-9]/g, ''); | |
| $(this).val(value); | |
변경 후order_view.html
| <!-- 마이페이지 회원 요약정보 --> | |
| <div class="mypage_lately_info"> | |
| <form method="post" class="reorder_form" name="frmOrderList" id="frmOrderList"> | |
| <div class="mypage_zone_tit"> | |
| <h3>{=__('주문/배송상세')} <strong class="order_num_view">({=__('주문번호')} : {orderInfo.orderNo} )</strong></h3> | |
| </div> | |
| <div class="mypage_lately_info_cont"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_reorder_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| </div> | |
| <!-- //mypage_lately_info_cont --> | |
| <span class="list_footer_box"> | |
| <span class="list_left_content"></span> | |
| <span class="list_right_content"> | |
| <button type="button" class="btn_reorder_to_cart">장바구니 담기</button> | |
| <button type="button" class="btn_reorder_direct">바로 구매</button> | |
| </span> | |
| </span> | |
| </form> | |
| </div> | |
| <!-- //mypage_lately_info --> | |
| <script type="text/javascript"> | |
| var taxInvoiceSubmitFlag = true; // 중복 클릭 방지용 | |
| $(document).ready(function () { | |
| const maxReorderGoodsCount = parseInt('{=maxReorderGoodsCount}') || 0; | |
| // 재구매 관련 유효성 검사 | |
| function checkReorderGoodsCount(checkedCount) { | |
| if (checkedCount === 0) { | |
| alert('선택하신 상품이 없습니다.'); | |
| return false; | |
| } | |
| if (checkedCount > maxReorderGoodsCount) { | |
| alert('선택하신 주문의 상품 수가 ' + maxReorderGoodsCount + '개를 초과하여 장바구니에 담을 수 없습니다.'); | |
| return false; | |
| } | |
| return true; | |
| } | |
| // 재구매 - 장바구니 담기 | |
| $('.btn_reorder_to_cart').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 장바구니에 담으시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_to_cart').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: '', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| $('#allCheck').prop('checked', false); | |
| if (confirm(res.message)) { | |
| window.location.href = res.redirect; | |
| } else { | |
| location.reload(); | |
| } | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_to_cart').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| // 재구매 - 바로 구매 | |
| $('.btn_reorder_direct').click(function(e){ | |
| let $allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked'); | |
| if (checkReorderGoodsCount($allChecked.length) && confirm('선택하신 상품을 주문하시겠습니까?')) { | |
| e.preventDefault(); | |
| $('.btn_reorder_direct').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: 'd', | |
| reorderGoodsList: $allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| if (res.message) { | |
| alert(res.message); | |
| } | |
| window.location.href = res.redirect; | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_direct').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| $('input.number_only').on('keyup', function () { | |
| var value = $(this).val().replace(/[^0-9]/g, ''); | |
| $(this).val(value); | |
변경 전order.html
| </div> | |
| <!-- //order_info --> | |
| <!--{ ? isPresentCartGoods === false}--> | |
| <div class="delivery_info"> | |
| <div class="order_zone_tit"> | |
| <h4>{=__('배송정보')}</h4> | |
변경 후order.html
| </div> | |
| <!-- //order_info --> | |
| <!--{ ? !isPresentCartGoods }--> | |
| <div class="delivery_info"> | |
| <div class="order_zone_tit"> | |
| <h4>{=__('배송정보')}</h4> | |
변경 전datetimepicker.css
| margin-left: 2px; | |
| } | |
| .date_check_calendar{ position:relative; margin:0 10px 0 10px; padding-bottom: 10px} | |
| .date_check_calendar .anniversary{ | |
| background: #fff url('../../img/member/icon_calendar.png') no-repeat right center; | |
| .datepicker-range-start, | |
| .datepicker-range-end{ | |
| height: 85%; | |
| width: 40%; | |
| font-size: 13px; | |
| color: #333; | |
| border: 1px solid #c3c3c3; | |
| align-content: center; | |
| text-align: center; | |
| white-space: nowrap; | |
| } | |
변경 후datetimepicker.css
| margin-left: 2px; | |
| } | |
| .date_check_calendar{ position:relative; margin:0 10px 0 10px; padding-bottom: 5px} | |
| .date_check_calendar .anniversary{ | |
| background: #fff url('../../img/member/icon_calendar.png') no-repeat right center; | |
| .datepicker-range-start, | |
| .datepicker-range-end{ | |
| height: 85%; | |
| width: 50%; | |
| font-size: 13px; | |
| color: #333; | |
| border: 1px solid #c3c3c3; | |
| align-content: center; | |
| text-align: center; | |
| white-space: nowrap; | |
| } | |
변경 전mypage.css
| .order_list .btn {padding:10px 10px 10px 10px;} | |
| .order_list .no {padding:20px 0 20px 0; text-align:center; font-size:14px; } | |
| /*** 주문내역 상세보기 | mypage/order_view.html ***/ | |
| .order_view {} | |
| .order_view h3 {text-indent:10px; line-height:32px; border-top:1px solid #cccccc; border-bottom:1px solid #cccccc; background:#f2f3f3; font-size:14px; font-weight:bold;} | |
| .order_view .view_box dl dt {display:table-cell;width:120px;font-size:13px;font-weight:bold;color:#111;vertical-align: top;padding: 10px 10px 10px 10px; border-right:1px solid #e8e8e8;} | |
| .order_view .view_box dl dd {display:table-cell; font-size:13px; color:#555;padding: 10px 10px 10px 10px;} | |
| .order_view .view_box dl dd ul li{margin: 0 0 5px 0;} | |
변경 후mypage.css
| .order_list .btn {padding:10px 10px 10px 10px;} | |
| .order_list .no {padding:20px 0 20px 0; text-align:center; font-size:14px; } | |
| .order_list .form_box fieldset .order_search_period .inp_sel {padding:10px 10px 5px 10px;} | |
| .order_list .form_box fieldset .order_search_keyword {position:relative; display:table; width:100%;} | |
| .order_list .form_box fieldset .order_search_keyword .inp_sel {display:table-cell; width:128px; padding:0 5px 5px 10px; vertical-align:middle;} | |
| .order_list .form_box fieldset .order_search_keyword .search_keyword {display:table-cell; padding:0 10px 5px 0; vertical-align:middle;} | |
| .order_list .form_box fieldset .order_search_keyword input {width:100%; height:31px; border:1px solid #c3c3c3; font-size:13px; color:#5e5e5e; padding:0 6px 0 6px;} | |
| .order_list .form_box fieldset .btn_box {padding:0 10px 10px 10px;} | |
| .order_list .form_box fieldset .btn_box .search_btn {display:block; width:100%; height:40px; border:1px solid #ab3e55; font-size:14px; background:#ab3e55; text-align:center; color:#ffffff; font-weight:bold;} | |
| /*** 주문내역 상세보기 | mypage/order_view.html ***/ | |
| .order_view {} | |
| .order_view h3 {text-indent:10px; line-height:32px; border-top:1px solid #cccccc; border-bottom:1px solid #cccccc; background:#f2f3f3; font-size:14px; font-weight:bold;} | |
| .order_view .view_box dl dt {display:table-cell;width:120px;font-size:13px;font-weight:bold;color:#111;vertical-align: top;padding: 10px 10px 10px 10px; border-right:1px solid #e8e8e8;} | |
| .order_view .view_box dl dd {display:table-cell; font-size:13px; color:#555;padding: 10px 10px 10px 10px;} | |
| .order_view .view_box dl dd ul li{margin: 0 0 5px 0;} | |
| .reorder_form .my_goods .info > a { | |
| display: table; | |
| } | |
| .reorder_form .my_goods .info .itemhead { | |
| display: flex; | |
| align-items: flex-center; | |
| width: auto; | |
| } | |
| .reorder_form .my_goods .info .itemhead .inp_chk { | |
| flex-shrink: 0; | |
| margin-top: 2px; | |
| width: 25px; | |
| } | |
변경 전_reorder_goods_list.html
변경 후_reorder_goods_list.html
| {*** 마이페이지 재구매용 주문상품리스트 | mypage/_reorder_goods_list.html ***} | |
| <div class="order_goods_list"> | |
| <!-- | |
| { ? ordersByRegisterDay } | |
| { @ ordersByRegisterDay } | |
| --> | |
| <!--{ @ .value_ }--> | |
| <form class="reorder_form" id="reorder_form_{..orderNo}" data-order-no="{..orderNo}"> | |
| <!--{ ? pageName == 'list' }--> | |
| <!--{ ? ..goods }--> | |
| <!--{ ? ..orderGoodsCnt > 0 }--> | |
| <p class="order_top_date">{=.key_} ({=__('총 %s건', '<strong>' + ..orderGoodsCnt + '</strong>')})</p> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <div class="orderlist_wrap"> | |
| <!--{ @ ..goods }--> | |
| <!--{ ? ...index_ == 0 }--> | |
| <div class="order_number_box"> | |
| <div class="order_number"> | |
| <div class="order_number_left"> | |
| <span class="inp_chk"> | |
| <input type="checkbox" name="reorderOrderNo[]" id="reorder_order_{..orderNo}" class="order_checkbox" data-order-no="{..orderNo}" /> | |
| <label for="reorder_order_{..orderNo}"></label> | |
| </span> | |
| {=__('주문번호')} | |
| {..orderNo} | |
| </div> | |
| <!--{ ? pageName == 'view' }--><div class="order_number_right"><span class="order_date">{=.key_}</span></div><!--{ / }--> | |
| </div> | |
| <ul> | |
| <!--{ ? substr(...orderStatus, 0, 1) == 'o' }--> | |
| <!--{ ? ..orderChannelFl != 'naverpay' }--> | |
| <li><a href="#" order-no="{..orderNo}" class="order_btn btn_order_cancel">{=__('주문취소')}</a></li> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <!--{ ? ..orderSettleButton == true }--> | |
| <li><a href="../mypage/layer_order_settle.php?orderNo={..orderNo}" data-toggle="modal" data-target="#popupSettle" data-type="post" data-cache="false" class="order_btn">{=__('구매확정')}</a></li> | |
| <!--{ / }--> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && userHandleFl === true && ..orderChannelFl != 'naverpay'}--> | |
| <!--{ ? ..canRefund == true || ..canBack == true || ..canExchange == true }--> | |
| <!--{ ? ..canRefund == true }--> | |
| <li><a href="../mypage/layer_order_refund_regist.php?mode=refundRegist&orderNo={..orderNo}&orderGoodsNo={...sno}&orderStatus={...orderStatus}" data-toggle="modal" data-target="#popupRefund" data-type="post" data-cache="false" class="order_btn">{=__('환불신청')}</a></li> | |
| <!--{ / }--> | |
| <!--{ ? ..canBack == true }--> | |
| <li><a href="../mypage/layer_order_back_regist.php?mode=backRegist&orderNo={..orderNo}&orderGoodsNo={...sno}&orderStatus={...orderStatus}" data-toggle="modal" data-target="#popupBack" data-type="post" data-cache="false" class="order_btn">{=__('반품신청')}</a></li> | |
| <!--{ / }--> | |
| <!--{ ? ..canExchange == true }--> | |
| <li><a href="../mypage/layer_order_exchange_regist.php?mode=exchangeRegist&orderNo={..orderNo}&orderGoodsNo={...sno}&orderStatus={...orderStatus}" data-toggle="modal" data-target="#popupExchange" data-type="post" data-cache="false" class="order_btn">{=__('교환신청')}</a></li> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <li><a href="#" class="order_btn btn_reorder_to_cart" data-order-no="{..orderNo}">장바구니</a></li> | |
| <li><a href="#" class="order_btn btn_reorder_direct" data-order-no="{..orderNo}">바로구매</a></li> | |
| </ul> | |
| </div> | |
| <!--{ / }--> | |
| <!--{ ? ...orderInfoRow }--> | |
| <h3 style="padding:10px 0 0 10px;"><!--{ ? ...orderInfoCd == 1 }-->{=__('메인 배송지')}<!--{ : }-->{=__('추가 배송지')}{=...orderInfoCd - 1}<!--{ / }--></h3> | |
| <!--{ / }--> | |
| <ul class="my_goods" data-order-no="{..orderNo}" data-order-goodsno="{..sno}" data-order-status="{...orderStatus}"> | |
| <li> | |
| <div class="info"> | |
| <a href="<!--{ ? pageName == 'list' }-->../mypage/order_view.php?orderNo={..orderNo}<!--{ : }-->../goods/goods_view.php?goodsNo=<!--{ ? ...goodsType === 'addGoods' }-->{...parentGoodsNo}<!--{ : }-->{...goodsNo}<!--{ / }--><!--{ / }-->"> | |
| <div class="itemhead"> | |
| <!--{ ? ...goodsType === 'goods' }--> | |
| <div class="inp_chk goods"> | |
| <input type="checkbox" name="reorderGoodsNo[]" id="reorder_goods_{...sno}" class="goods_checkbox" | |
| data-goods-type="{...goodsType}" | |
| data-order-no="{..orderNo}" | |
| data-goods-no="{...goodsNo}" | |
| data-option-sno="{...optionSno}" | |
| data-goods-cnt="{...goodsCnt}" | |
| data-scm-no="{...scmNo}" | |
| data-option-text-info='{=json_encode(...optionTextInfo)}' | |
| data-goods-price="{...goodsPrice}" | |
| data-delivery-method-fl="{...deliveryMethodFl}" | |
| data-delivery-collect-fl="{...goodsDeliveryCollectFl}" | |
| /> | |
| <label for="reorder_goods_{...sno}" class=""></label> | |
| </div> | |
| <!--{ : }--> | |
| <div class="inp_chk"></div> | |
| <!--{ / }--> | |
| <div class="img">{...goodsImage}</div> | |
| </div> | |
| <div class="itembody"> | |
| <!--{ ? ...handleMode === 'z' }--> | |
| <div class="exchange_add_info"><span>교환추가</span></div> | |
| <!--{ / }--> | |
| <dl> | |
| <dt class="prd_name">{...goodsNm}</dt> | |
| <!-- | |
| { ? ...optionInfo } | |
| { @ ...optionInfo } | |
| --> | |
| <dd class="prd_option"> | |
| {....value_.optionName} : {....value_.optionValue} | |
| <!--{ ? ....value_.optionRealPrice != 0 && optionPriceFl == 'y' }--> | |
| (<!--{ ? ....value_.optionRealPrice > 0 }-->+<!--{ / }-->{=gd_global_order_currency_display(....value_.optionRealPrice, null, null)}) | |
| <!--{ / }--> | |
| <!--{ ? ....index_ == ....size_ - 1 && ....value_.deliveryInfoStr != "" }--> | |
| <!--{ ? empty(....value_.deliveryInfoStr) === false }-->[{....value_.deliveryInfoStr}]<!--{ / }--> | |
| <!--{ / }--> | |
| </dd> | |
| <!-- | |
| { / } | |
| { / } | |
| { ? ...optionTextInfo } | |
| { @ ...optionTextInfo } | |
| --> | |
| <dd class="prd_option"> | |
| {....value_.optionName} : {....value_.optionValue} | |
| <!--{ ? ....value_.optionTextPrice != 0 && optionPriceFl == 'y' }--> | |
| (<!--{ ? ....value_.optionTextPrice > 0 }-->+<!--{ / }-->{=gd_global_order_currency_display(....value_.optionTextPrice, null, null)}) | |
| <!--{ / }--> | |
| </dd> | |
| <!-- | |
| { / } | |
| { / } | |
| --> | |
| </dl> | |
| </div> | |
| </a> | |
| <!--{ ? empty(...addGoods) === false }--> | |
| <div class="add_goods_box"> | |
| <em class="add_title">{=__('추가상품')}</em> | |
| <ul class="add_goods_list"> | |
| <!--{ @ ...addGoods }--> | |
| <li> | |
| <div class="add_goods_img">{....goodsImage}</div> | |
| <div class="add_goods_content"> | |
| <span class="title">{....goodsNm}</span> | |
| <div class="add_goods_text"> | |
| <span class="goods_number">{=__('주문수량')} : <em>{....goodsCnt}</em></span> | |
| <span class="goods_price"><em>{=gd_global_order_currency_display(....goodsPrice, ..exchangeRate, ..currencyPolicy)}</em></span> | |
| </div> | |
| </div> | |
| </li> | |
| <!--{ / }--> | |
| </ul> | |
| </div> | |
| <!--{ / }--> | |
| <div class="order_info"> | |
| <div class="info_box"> | |
| <div class="info2"> | |
| {=__('수량')} : {...goodsCnt} | {=gd_global_order_currency_display((...goodsPrice + ...optionPrice + ...optionTextPrice) * ...goodsCnt, ..exchangeRate, ..currencyPolicy)} | |
| </div> | |
| <div class="ing_chk"> | |
| <!--{ ? ...userHandleSno > 0 && ...handleSno == 0 }--> | |
| <!--{ ? ...userHandleFl == 'n' }--> | |
| <!--{ ? ...userHandleMode == 'b' }--> | |
| <strong class="order_ing_btn">반품거절</strong> | |
| <!--{ : ...userHandleMode == 'r' }--> | |
| <strong class="order_ing_btn">환불거절</strong> | |
| <!--{ : ...userHandleMode == 'e' }--> | |
| <strong class="order_ing_btn">교환거절</strong> | |
| <!--{ / }--> | |
| <!--{ : ...userHandleFl == 'y' }--> | |
| <!--{ ? ...userHandleMode == 'b' }--> | |
| <strong class="order_ing_btn">반품승인</strong> | |
| <!--{ : ...userHandleMode == 'r' }--> | |
| <strong class="order_ing_btn">환불승인</strong> | |
| <!--{ : ...userHandleMode == 'e' }--> | |
| <strong class="order_ing_btn">교환승인</strong> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <!--{ ? ...userHandleMode == 'b' }--> | |
| <strong class="order_ing_btn">반품신청</strong> | |
| <!--{ : ...userHandleMode == 'r' }--> | |
| <strong class="order_ing_btn">환불신청</strong> | |
| <!--{ : ...userHandleMode == 'e' }--> | |
| <strong class="order_ing_btn">교환신청</strong> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === false && (substr(...orderStatus, 0, 1) == 'c' || ...orderStatus == 'b4' || ...orderStatus == 'e5' || ...orderStatus == 'r3') && ...handleDetailReasonShowFl == 'y' }--> | |
| <a class="refund_comp_btn" href="../mypage/layer_order_refund_reason.php?orderNo={..orderNo}&orderGoodsNo={...sno}&userHandleSno={...userHandleSno}&orderStatus={...orderStatus}" data-toggle="modal" data-target="#popupReason" data-type="post" data-cache="false"> | |
| <!--{ ? ...orderStatus == 'd2' }--> | |
| <strong class="order_finish_btn">{...orderStatusStr}</strong> | |
| <!--{ : }--> | |
| <strong class="order_ing_btn">{...orderStatusStr}</strong> | |
| <!--{ / }--> | |
| <span class="ico_blue_arrow"></span> | |
| </a> | |
| <!--{ : }--> | |
| <!--{ ? ...orderStatus == 'd2' }--> | |
| <strong class="order_finish_btn">{...orderStatusStr}</strong> | |
| <!--{ : }--> | |
| <strong class="order_ing_btn">{...orderStatusStr}</strong> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| </div> | |
| </div> | |
| <!--{ ? ...naverpayStatus.code == 'DelayProductOrder'}--> | |
| <p class="d_causation"> | |
| ({=...naverpayStatus.notice}, <a href="../mypage/layer_order_naverpay_reason.php?orderNo={..orderNo}&orderGoodsNo={...sno}" data-toggle="modal" data-target="#popupReason" data-type="post" data-cache="false"><u>{=__('지연사유')}</u></a>) | |
| </p> | |
| <!--{/}--> | |
| </div> | |
| <ul class="btn_bx"> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && (...userHandleSno > 0 || (...handleSno > 0 && ...handleDetailReasonShowFl == 'y') ) }--> | |
| <li> | |
| <a href="../mypage/layer_order_refund_reason.php?orderNo={..orderNo}&orderGoodsNo={...sno}&userHandleSno={...userHandleSno}&orderStatus={...orderStatus}" data-toggle="modal" data-target="#popupReason" data-type="post" data-cache="false" class="order_etc_btn"> | |
| <!--{ ? ...userHandleMode == 'b' || ...handleMode == 'b' }--> | |
| {=__('반품사유')} | |
| <!--{ : ...userHandleMode == 'r' || ...handleMode == 'r' }--> | |
| {=__('환불사유')} | |
| <!--{ : ...userHandleMode == 'e' || ...handleMode == 'e' }--> | |
| {=__('교환사유')} | |
| <!--{ : ...userHandleMode == 'c' || ...handleMode == 'c'}--> | |
| {=__('취소사유')} | |
| <!--{ / }--> | |
| </a> | |
| </li> | |
| <!--{ : }--> | |
| <!--{ ? substr(...orderStatus, 0, 1) == 'd' }--> | |
| <li> | |
| <a href="#" class="order_ok_btn btn_order_settle" order-no="{..orderNo}" order-goodsno="{...sno}">{=__('구매확정')}</a> | |
| </li> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ ? (substr(...orderStatus, 0, 1) == 'd' || substr(...orderStatus, 0, 1) == 's' || substr(...orderStatus, 0, 1) == 'z') && ...invoiceNo }--> | |
| <!--{ ? ...deliveryMethodFl == 'delivery' || ...deliveryMethodFl == 'packet' || !...deliveryMethodFl }--> | |
| <!--{ ? ...deliveryMethodFl != 'delivery' }--> | |
| <li> | |
| <a class="delivery_trace_btn" style="max-width:100px; overflow:hidden;">{...deliveryMethodFlText}</a> | |
| </li> | |
| <!--{ / }--> | |
| <li><a href="../share/delivery_trace.php?invoiceCompanySno={...invoiceCompanySno}&invoiceNo={...invoiceNo}" class="delivery_trace_btn" data-invoice-company-sno="{...invoiceCompanySno}" data-invoice-no="{...invoiceNo}" target="_blank">{=__('배송추적')}</a></li> | |
| <!--{ : }--> | |
| <li> | |
| <a href="../mypage/layer_order_delivery_method.php?orderNo={..orderNo}&orderGoodsNo={...sno}" data-toggle="modal" data-target="#popupDeliveryMethod" data-type="post" data-cache="false" class="delivery_trace_btn" style="max-width:100px; overflow:hidden;">{...deliveryMethodFlText}</a> | |
| </li> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <li> | |
| <a class="delivery_trace_btn" style="max-width:100px; overflow:hidden;">{...deliveryMethodFlText}</a> | |
| </li> | |
| <!--{ / }--> | |
| <!--{ ? ...orderStatus == 'd1' }--> | |
| <li><a href="#" class="delivery_order_btn btn_order_delivery" order-no="{..orderNo}" order-goodsno="{...sno}">{=__('수취확인')}</a></li> | |
| <!--{ / }--> | |
| <!--{ ? ...viewWriteGoodsReview }--> | |
| <li><a href="../board/write.php?bdId={goodsReviewId}&gboard=r&orderGoodsNo={...sno}&goodsNo={...goodsNo}<!--{ ? guest == 'y' }-->&guest=y<!--{ / }-->" class="btn btn_y ogl_reviewrite btn_open_layer" data-toggle="modal" data-cache="false" data-target="#popupBoard">{=__('리뷰쓰기')}</a></li> | |
| <!--{ / }--> | |
| <!--{ ? ...viewWritePlusReview }--> | |
| <li><a href="javascript:gd_popup_plus_review_write('{=..orderNo}', {=...sno}, '{=...goodsNo}')" class="btn btn_y ogl_reviewrite">{=__('리뷰등록')}</a></li> | |
| <!--{/}--> | |
| </ul> | |
| </div> | |
| </li> | |
| </ul> | |
| <!--{ / }--> | |
| <!--{ / // end goods loop }--> | |
| </div> | |
| </form> | |
| <!-- | |
| { / } | |
| { : // else if ordersByRegisterDay } | |
| --> | |
| <div class="my_goods no"> | |
| <p>{=__('최근 주문 내역이 없습니다.')}</p> | |
| </div> | |
| <!-- | |
| { / // end if ordersByRegisterDay } | |
| --> | |
| </div> | |
| <script type="text/javascript"> | |
| // 페이지 진입 시 재구매 체크박스 초기화 | |
| window.addEventListener('pageshow', function() { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| }); | |
| $(function () { | |
| const maxReorderGoodsCount = parseInt('{=maxReorderGoodsCount}') || 0; | |
| // 구매취소 | |
| $(document).off('click.orderCancel').on('click.orderCancel', '.btn_order_cancel', function (e) { | |
| e.preventDefault(); | |
| if (confirm("{=__('주문취소 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'cancelRegist', | |
| orderNo: $(this).attr('order-no') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 수취확인 | |
| $(document).off('click.orderDelivery').on('click.orderDelivery', '.btn_order_delivery', function (e) { | |
| e.preventDefault(); | |
| if (confirm("{=__('수취확인 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'deliveryCompleteRegist', | |
| orderNo: $(this).attr('order-no'), | |
| orderGoodsNo: $(this).attr('order-goodsno') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 구매확정 | |
| $(document).off('click.orderSettle').on('click.orderSettle', '.btn_order_settle', function (e) { | |
| e.preventDefault(); | |
| if (confirm("{=__('구매확정 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'settleRegist', | |
| orderNo: $(this).attr('order-no'), | |
| orderGoodsNo: $(this).attr('order-goodsno') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 재구매 관련 유효성 검사 | |
| function checkReorderGoodsCount(checkedCount) { | |
| if (checkedCount === 0) { | |
| alert('선택하신 상품이 없습니다.'); | |
| return false; | |
| } | |
| if (checkedCount > maxReorderGoodsCount) { | |
| alert('선택하신 주문의 상품 수가 ' + maxReorderGoodsCount + '개를 초과하여 장바구니에 담을 수 없습니다.'); | |
| return false; | |
| } | |
| return true; | |
| } | |
| // 체크박스 상태 + label on 클래스 동기화 | |
| function setChecked(checkboxes, checked) { | |
| checkboxes.prop('checked', checked).each(function() { | |
| $('label[for="' + $(this).attr('id') + '"]').toggleClass('on', checked); | |
| }); | |
| } | |
| // 주문 체크박스 클릭 → 해당 주문의 상품 전체 선택/해제 | |
| $(document).off('click.orderCheck').on('click.orderCheck', 'input:checkbox[name="reorderOrderNo[]"]', function () { | |
| let orderNo = $(this).data('orderNo'); | |
| let isChecked = $(this).is(':checked'); | |
| setChecked($('input.goods_checkbox[data-order-no="' + orderNo + '"]'), isChecked); | |
| }); | |
| // 상품 체크박스 클릭 → 주문 체크박스 상태 동기화 | |
| $(document).off('click.goodsCheck').on('click.goodsCheck', 'input.goods_checkbox', function () { | |
| let orderNo = $(this).data('orderNo'); | |
| let goodsInOrder = $('input.goods_checkbox[data-order-no="' + orderNo + '"]'); | |
| let isAllChecked = (goodsInOrder.length === goodsInOrder.filter(':checked').length); | |
| setChecked($('input.order_checkbox[data-order-no="' + orderNo + '"]'), isAllChecked); | |
| }); | |
| // 재구매 - 장바구니 담기 | |
| $(document).off('click.reorderCart').on('click.reorderCart', '.btn_reorder_to_cart', function(e){ | |
| e.preventDefault(); | |
| let orderNo = $(this).data('order-no'); | |
| let allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked').filter(function(){ | |
| return $(this).data('order-no') === orderNo; | |
| }); | |
| if (checkReorderGoodsCount(allChecked.length) && confirm('선택하신 상품을 장바구니에 담으시겠습니까?')) { | |
| $('.btn_reorder_to_cart').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: '', | |
| reorderGoodsList: allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| if (confirm(res.message)) { | |
| window.location.href = res.redirect; | |
| } else { | |
| location.reload(); | |
| } | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_to_cart').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| // 재구매 - 바로 구매 | |
| $(document).off('click.reorderDirect').on('click.reorderDirect', '.btn_reorder_direct', function(e){ | |
| e.preventDefault(); | |
| let orderNo = $(this).data('order-no'); | |
| let allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked').filter(function(){ | |
| return $(this).data('order-no') === orderNo; | |
| }); | |
| if (checkReorderGoodsCount(allChecked.length) && confirm('선택하신 상품을 주문하시겠습니까?')) { | |
| $('.btn_reorder_direct').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: 'd', | |
| reorderGoodsList: allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| if (res.message) { | |
| alert(res.message); | |
| } | |
| window.location.href = res.redirect; | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_direct').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| }); | |
| </script> | |
| <script type="text/javascript" src="\{=c.PATH_SKIN}js/gd_board_goods.js" charset="utf-8"></script> | |
변경 전order_list.html
| <input type="hidden" name="mode" value="{mode}"/> | |
| <fieldset> | |
| <legend>{=__('주문목록/배송조회 날짜 검색')}</legend> | |
| <div class="sel_box"> | |
| <div class="inp_sel"> | |
| <select class="check_option_inner" name="searchPeriod" id="searchPeriod" selected-search-period="{=selectDate}"></select> | |
| </div> | |
| <div id="layer" class="layer"></div> | |
| </div> | |
| </fieldset> | |
| <div class="date_check_calendar" style="display:none;"> | |
| <div class="datepicker-wrapper"> | |
| <input type="text" name="wDate[]" class="anniversary js_datepicker datepicker-range-start" value="{wDate[0]}"/> | |
| <span class="datepicker-tilde">~</span> | |
| <input type="text" name="wDate[]" class="anniversary js_datepicker datepicker-range-end" value="{wDate[1]}"/> | |
| <button type="submit" class="datepicker-submit"><em>{=__('조회')} <img alt="" src="../img/etc/search.png" /></em></button> | |
| </div> | |
| </div> | |
| </form> | |
| </div> | |
| <div id="mypageOrderlist"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_order_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| <div id="orderlist_more"></div> | |
| </div> | |
| $('.more_btn_box button').click(function(){ | |
| var page = parseInt($(this).data('page')) + 1; | |
| var mode = $(this).data("mode"); | |
| var searchPeriod = $('.check_option_inner').val(); | |
| const wDate = isRangeMode() ? getRangeDates().toArray().map(dateElement => dateElement.value) : ""; | |
| $.get('./order_list.php', {'listMode' : 'data', 'page' : page, 'mode' : mode, 'searchPeriod' : searchPeriod, 'wDate' : wDate }, function (data) { | |
| if ($(data).find("div.my_goods.no").length) { | |
| alert("{=__('더이상 주문내역이 없습니다.')}"); | |
| } else { | |
| }); | |
| }) | |
| const option = $('.check_option_inner'); | |
| // 검색기간 선택 | |
| if (option.length) { | |
| option.change(function (e) { | |
| } | |
| function initializeDateTimePicker() { | |
| const option = $('.check_option_inner'); | |
| const calendar = $('.date_check_calendar'); | |
| const toggleDateRange = () => calendar.toggle(option.val() === 'range'); | |
| toggleDateRange(); | |
| } | |
| function isRangeMode() { | |
| return $('.check_option_inner').val() === 'range'; | |
| } | |
| function getRangeDates() { | |
변경 후order_list.html
| <input type="hidden" name="mode" value="{mode}"/> | |
| <fieldset> | |
| <legend>{=__('주문목록/배송조회 날짜 검색')}</legend> | |
| <div class="sel_box order_search_period"> | |
| <div class="inp_sel"> | |
| <select class="check_option_inner" name="searchPeriod" id="searchPeriod" selected-search-period="{=selectDate}"></select> | |
| </div> | |
| <div id="layer" class="layer"></div> | |
| </div> | |
| <div class="date_check_calendar" style="display:none;"> | |
| <div class="datepicker-wrapper"> | |
| <input type="text" name="wDate[]" class="anniversary js_datepicker datepicker-range-start" value="{wDate[0]}"/> | |
| <span class="datepicker-tilde">~</span> | |
| <input type="text" name="wDate[]" class="anniversary js_datepicker datepicker-range-end" value="{wDate[1]}"/> | |
| </div> | |
| </div> | |
| <div class="sel_box order_search_keyword"> | |
| <div class="inp_sel">{=gd_select_box(null, 'searchKey', searchKey, null, selectKey, null, null, 'check_option_inner')}</div> | |
| <div class="search_keyword"><input type="search" name="searchKeyword" value="{=searchKeyword}" placeholder="검색어를 입력해주세요."></div> | |
| </div> | |
| <div class="btn_box"> | |
| <button type="submit" class="search_btn">{=__('검색')}</button> | |
| </div> | |
| </fieldset> | |
| </form> | |
| </div> | |
| <div id="mypageOrderlist"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_reorder_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| <div id="orderlist_more"></div> | |
| </div> | |
| $('.more_btn_box button').click(function(){ | |
| var page = parseInt($(this).data('page')) + 1; | |
| var mode = $(this).data("mode"); | |
| var listMode = (!mode || mode === 'list') ? 'reorder_data' : 'data'; | |
| var searchPeriod = $('.order_search_period .check_option_inner').val(); | |
| const wDate = isRangeMode() ? getRangeDates().toArray().map(dateElement => dateElement.value) : ""; | |
| let searchKey = $('select[name="searchKey"]').val(); | |
| let searchKeyword = $('input[name="searchKeyword"]').val(); | |
| $.get('./order_list.php', { | |
| 'listMode': listMode, | |
| 'page': page, | |
| 'mode': mode, | |
| 'searchPeriod': searchPeriod, | |
| 'wDate': wDate, | |
| 'searchKey': searchKey, | |
| 'searchKeyword': searchKeyword | |
| }, function (data) { | |
| if ($(data).find("div.my_goods.no").length) { | |
| alert("{=__('더이상 주문내역이 없습니다.')}"); | |
| } else { | |
| }); | |
| }) | |
| const option = $('.order_search_period .check_option_inner'); | |
| // 검색기간 선택 | |
| if (option.length) { | |
| option.change(function (e) { | |
| } | |
| function initializeDateTimePicker() { | |
| const option = $('.order_search_period .check_option_inner'); | |
| const calendar = $('.date_check_calendar'); | |
| const toggleDateRange = () => calendar.toggle(option.val() === 'range'); | |
| toggleDateRange(); | |
| } | |
| function isRangeMode() { | |
| return $('.order_search_period .check_option_inner').val() === 'range'; | |
| } | |
| function getRangeDates() { | |
변경 전order_view.html
| {*** 마이페이지 > 주문상세 | mypage/order_view.php ***} | |
| { # header } | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_order_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| <div class="order_view"> | |
| <!--{ ? orderInfo.gift }--> | |
변경 후order_view.html
| {*** 마이페이지 > 주문상세 | mypage/order_view.php ***} | |
| { # header } | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_reorder_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| <div class="order_view"> | |
| <!--{ ? orderInfo.gift }--> | |
변경 전order.html
| <div class="shipping_info_area"> | |
| <div class="shipping_info_table"> | |
| <!-- 02 배송지정보 --> | |
| <!--{ ? isPresentCartGoods === false}--> | |
| <div class="order_box"> | |
| <h2 class="order_tit"> | |
| <b>{=__('배송정보')}</b> | |
변경 후order.html
| <div class="shipping_info_area"> | |
| <div class="shipping_info_table"> | |
| <!-- 02 배송지정보 --> | |
| <!--{ ? !isPresentCartGoods }--> | |
| <div class="order_box"> | |
| <h2 class="order_tit"> | |
| <b>{=__('배송정보')}</b> | |
변경 전datetimepicker.css
| margin-left: 2px; | |
| } | |
| .date_check_calendar{ position:relative; margin:0 10px 0 10px; padding-bottom: 10px} | |
| .date_check_calendar .anniversary{ | |
| background: #fff url('../../img/member/icon_calendar.png') no-repeat right center; | |
| .datepicker-range-start, | |
| .datepicker-range-end{ | |
| height: 100%; | |
| width: 40%; | |
| font-size: 13px; | |
| color: #333; | |
| border: 1px solid #c3c3c3; | |
| align-content: center; | |
| text-align: center; | |
| white-space: nowrap; | |
| } | |
변경 후datetimepicker.css
| margin-left: 2px; | |
| } | |
| .date_check_calendar{ position:relative; margin:0 10px 0 10px; padding-bottom: 5px} | |
| .date_check_calendar .anniversary{ | |
| background: #fff url('../../img/member/icon_calendar.png') no-repeat right center; | |
| .datepicker-range-start, | |
| .datepicker-range-end{ | |
| height: 100%; | |
| width: 50%; | |
| font-size: 13px; | |
| color: #333; | |
| border: 1px solid #c3c3c3; | |
| align-content: center; | |
| text-align: center; | |
| white-space: nowrap; | |
| } | |
변경 전mypage.css
| font-size: 14px; | |
| } | |
| /*** 주문내역 상세보기 | mypage/order_view.html ***/ | |
| .order_view { | |
| } | |
| .order_view .view_box dl dd ul li { | |
| margin: 0 0 5px 0; | |
| } | |
변경 후mypage.css
| font-size: 14px; | |
| } | |
| .order_list .form_box fieldset .order_search_period .inp_sel { | |
| padding:10px 10px 5px 10px; | |
| } | |
| .order_list .form_box fieldset .order_search_keyword { | |
| position:relative; | |
| display:table; | |
| width:100%; | |
| } | |
| .order_list .form_box fieldset .order_search_keyword .inp_sel { | |
| display:table-cell; | |
| width:128px; | |
| padding:0 5px 5px 10px; | |
| vertical-align:middle; | |
| } | |
| .order_list .form_box fieldset .order_search_keyword .search_keyword { | |
| display:table-cell; | |
| padding:0 10px 5px 0; | |
| vertical-align:middle; | |
| } | |
| .order_list .form_box fieldset .order_search_keyword input { | |
| width:100%; | |
| height:31px; | |
| border:1px solid #c3c3c3; | |
| font-size:13px; | |
| color:#5e5e5e; | |
| padding:0 6px 0 6px; | |
| } | |
| .order_list .form_box fieldset .btn_box { | |
| padding:0 10px 10px 10px; | |
| } | |
| .order_list .form_box fieldset .btn_box .search_btn { | |
| display:block; | |
| width:100%; | |
| height:40px; | |
| border: 1px solid var(--primary-default); | |
| font-size:14px; | |
| background: var(--primary-default); | |
| text-align:center; | |
| color:#ffffff; | |
| font-weight:bold; | |
| } | |
| /*** 주문내역 상세보기 | mypage/order_view.html ***/ | |
| .order_view { | |
| } | |
| .order_view .view_box dl dd ul li { | |
| margin: 0 0 5px 0; | |
| } | |
| .reorder_form .my_goods .info > a { | |
| display: table; | |
| } | |
| .reorder_form .my_goods .info .itemhead { | |
| display: flex; | |
| align-items: flex-center; | |
| width: auto; | |
| } | |
| .reorder_form .my_goods .info .itemhead .inp_chk { | |
| flex-shrink: 0; | |
| width: 20px; | |
| } | |
변경 전_reorder_goods_list.html
변경 후_reorder_goods_list.html
| {*** 마이페이지 재구매용 주문상품리스트 | mypage/_reorder_goods_list.html ***} | |
| <div class="order_goods_list"> | |
| <!-- | |
| { ? ordersByRegisterDay } | |
| { @ ordersByRegisterDay } | |
| --> | |
| <!--{ @ .value_ }--> | |
| <form class="reorder_form" id="reorder_form_{..orderNo}" data-order-no="{..orderNo}"> | |
| <!--{ ? pageName == 'list' }--> | |
| <!--{ ? ..goods }--> | |
| <!--{ ? ..orderGoodsCnt > 0 }--> | |
| <p class="order_top_date">{=.key_} ({=__('총 %s건', '<strong>' + ..orderGoodsCnt + '</strong>')})</p> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <div class="orderlist_wrap"> | |
| <!--{ @ ..goods }--> | |
| <!--{ ? ...index_ == 0 }--> | |
| <div class="order_number_box"> | |
| <div class="order_number"> | |
| <div class="order_number_left"> | |
| <span class="inp_chk"> | |
| <input type="checkbox" name="reorderOrderNo[]" id="reorder_order_{..orderNo}" class="order_checkbox" data-order-no="{..orderNo}" /> | |
| <label for="reorder_order_{..orderNo}"></label> | |
| </span> | |
| {=__('주문번호')} | |
| {..orderNo} | |
| </div> | |
| <!--{ ? pageName == 'view' }--><div class="order_number_right"><span class="order_date">{=.key_}</span></div><!--{ / }--> | |
| </div> | |
| <ul> | |
| <!--{ ? substr(...orderStatus, 0, 1) == 'o' }--> | |
| <!--{ ? ..orderChannelFl != 'naverpay' }--> | |
| <li><a href="#" order-no="{..orderNo}" class="order_btn btn_order_cancel">{=__('주문취소')}</a></li> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <!--{ ? ..orderSettleButton == true }--> | |
| <li><a href="../mypage/layer_order_settle.php?orderNo={..orderNo}" data-toggle="modal" data-target="#popupSettle" data-type="post" data-cache="false" class="order_btn">{=__('구매확정')}</a></li> | |
| <!--{ / }--> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && userHandleFl === true && ..orderChannelFl != 'naverpay'}--> | |
| <!--{ ? ..canRefund == true || ..canBack == true || ..canExchange == true }--> | |
| <!--{ ? ..canRefund == true }--> | |
| <li><a href="../mypage/layer_order_refund_regist.php?mode=refundRegist&orderNo={..orderNo}&orderGoodsNo={...sno}&orderStatus={...orderStatus}" data-toggle="modal" data-target="#popupRefund" data-type="post" data-cache="false" class="order_btn">{=__('환불신청')}</a></li> | |
| <!--{ / }--> | |
| <!--{ ? ..canBack == true }--> | |
| <li><a href="../mypage/layer_order_back_regist.php?mode=backRegist&orderNo={..orderNo}&orderGoodsNo={...sno}&orderStatus={...orderStatus}" data-toggle="modal" data-target="#popupBack" data-type="post" data-cache="false" class="order_btn">{=__('반품신청')}</a></li> | |
| <!--{ / }--> | |
| <!--{ ? ..canExchange == true }--> | |
| <li><a href="../mypage/layer_order_exchange_regist.php?mode=exchangeRegist&orderNo={..orderNo}&orderGoodsNo={...sno}&orderStatus={...orderStatus}" data-toggle="modal" data-target="#popupExchange" data-type="post" data-cache="false" class="order_btn">{=__('교환신청')}</a></li> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <li><a href="#" class="order_btn btn_reorder_to_cart" data-order-no="{..orderNo}">장바구니</a></li> | |
| <li><a href="#" class="order_btn btn_reorder_direct" data-order-no="{..orderNo}">바로구매</a></li> | |
| </ul> | |
| </div> | |
| <!--{ / }--> | |
| <!--{ ? ...orderInfoRow }--> | |
| <h3 style="padding:10px 0 0 10px;"><!--{ ? ...orderInfoCd == 1 }-->{=__('메인 배송지')}<!--{ : }-->{=__('추가 배송지')}{=...orderInfoCd - 1}<!--{ / }--></h3> | |
| <!--{ / }--> | |
| <ul class="my_goods" data-order-no="{..orderNo}" data-order-goodsno="{..sno}" data-order-status="{...orderStatus}"> | |
| <li> | |
| <div class="info"> | |
| <a href="<!--{ ? pageName == 'list' }-->../mypage/order_view.php?orderNo={..orderNo}<!--{ : }-->../goods/goods_view.php?goodsNo=<!--{ ? ...goodsType === 'addGoods' }-->{...parentGoodsNo}<!--{ : }-->{...goodsNo}<!--{ / }--><!--{ / }-->"> | |
| <div class="itemhead"> | |
| <!--{ ? ...goodsType === 'goods' }--> | |
| <div class="inp_chk goods"> | |
| <input type="checkbox" name="reorderGoodsNo[]" id="reorder_goods_{...sno}" class="goods_checkbox" | |
| data-goods-type="{...goodsType}" | |
| data-order-no="{..orderNo}" | |
| data-goods-no="{...goodsNo}" | |
| data-option-sno="{...optionSno}" | |
| data-goods-cnt="{...goodsCnt}" | |
| data-scm-no="{...scmNo}" | |
| data-option-text-info='{=json_encode(...optionTextInfo)}' | |
| data-goods-price="{...goodsPrice}" | |
| data-delivery-method-fl="{...deliveryMethodFl}" | |
| data-delivery-collect-fl="{...goodsDeliveryCollectFl}" | |
| /> | |
| <label for="reorder_goods_{...sno}" class=""></label> | |
| </div> | |
| <!--{ : }--> | |
| <div class="inp_chk"></div> | |
| <!--{ / }--> | |
| <div class="img">{...goodsImage}</div> | |
| </div> | |
| <div class="itembody"> | |
| <!--{ ? ...handleMode === 'z' }--> | |
| <div class="exchange_add_info"><span>교환추가</span></div> | |
| <!--{ / }--> | |
| <dl> | |
| <dt class="prd_name">{...goodsNm}</dt> | |
| <!-- | |
| { ? ...optionInfo } | |
| { @ ...optionInfo } | |
| --> | |
| <dd class="prd_option"> | |
| {....value_.optionName} : {....value_.optionValue} | |
| <!--{ ? ....value_.optionRealPrice != 0 && optionPriceFl == 'y' }--> | |
| (<!--{ ? ....value_.optionRealPrice > 0 }-->+<!--{ / }-->{=gd_global_order_currency_display(....value_.optionRealPrice, null, null)}) | |
| <!--{ / }--> | |
| <!--{ ? ....index_ == ....size_ - 1 && ....value_.deliveryInfoStr != "" }--> | |
| <!--{ ? empty(....value_.deliveryInfoStr) === false }-->[{....value_.deliveryInfoStr}]<!--{ / }--> | |
| <!--{ / }--> | |
| </dd> | |
| <!-- | |
| { / } | |
| { / } | |
| { ? ...optionTextInfo } | |
| { @ ...optionTextInfo } | |
| --> | |
| <dd class="prd_option"> | |
| {....value_.optionName} : {....value_.optionValue} | |
| <!--{ ? ....value_.optionTextPrice != 0 && optionPriceFl == 'y' }--> | |
| (<!--{ ? ....value_.optionTextPrice > 0 }-->+<!--{ / }-->{=gd_global_order_currency_display(....value_.optionTextPrice, null, null)}) | |
| <!--{ / }--> | |
| </dd> | |
| <!-- | |
| { / } | |
| { / } | |
| --> | |
| </dl> | |
| </div> | |
| </a> | |
| <!--{ ? empty(...addGoods) === false }--> | |
| <div class="add_goods_box"> | |
| <em class="add_title">{=__('추가상품')}</em> | |
| <ul class="add_goods_list"> | |
| <!--{ @ ...addGoods }--> | |
| <li> | |
| <div class="add_goods_img">{....goodsImage}</div> | |
| <div class="add_goods_content"> | |
| <span class="title">{....goodsNm}</span> | |
| <div class="add_goods_text"> | |
| <span class="goods_number">{=__('주문수량')} : <em>{....goodsCnt}</em></span> | |
| <span class="goods_price"><em>{=gd_global_order_currency_display(....goodsPrice, ..exchangeRate, ..currencyPolicy)}</em></span> | |
| </div> | |
| </div> | |
| </li> | |
| <!--{ / }--> | |
| </ul> | |
| </div> | |
| <!--{ / }--> | |
| <div class="order_info"> | |
| <div class="info_box"> | |
| <div class="info2"> | |
| {=__('수량')} : {...goodsCnt} | {=gd_global_order_currency_display((...goodsPrice + ...optionPrice + ...optionTextPrice) * ...goodsCnt, ..exchangeRate, ..currencyPolicy)} | |
| </div> | |
| <div class="ing_chk"> | |
| <!--{ ? ...userHandleSno > 0 && ...handleSno == 0 }--> | |
| <!--{ ? ...userHandleFl == 'n' }--> | |
| <!--{ ? ...userHandleMode == 'b' }--> | |
| <strong class="order_ing_btn">반품거절</strong> | |
| <!--{ : ...userHandleMode == 'r' }--> | |
| <strong class="order_ing_btn">환불거절</strong> | |
| <!--{ : ...userHandleMode == 'e' }--> | |
| <strong class="order_ing_btn">교환거절</strong> | |
| <!--{ / }--> | |
| <!--{ : ...userHandleFl == 'y' }--> | |
| <!--{ ? ...userHandleMode == 'b' }--> | |
| <strong class="order_ing_btn">반품승인</strong> | |
| <!--{ : ...userHandleMode == 'r' }--> | |
| <strong class="order_ing_btn">환불승인</strong> | |
| <!--{ : ...userHandleMode == 'e' }--> | |
| <strong class="order_ing_btn">교환승인</strong> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <!--{ ? ...userHandleMode == 'b' }--> | |
| <strong class="order_ing_btn">반품신청</strong> | |
| <!--{ : ...userHandleMode == 'r' }--> | |
| <strong class="order_ing_btn">환불신청</strong> | |
| <!--{ : ...userHandleMode == 'e' }--> | |
| <strong class="order_ing_btn">교환신청</strong> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === false && (substr(...orderStatus, 0, 1) == 'c' || ...orderStatus == 'b4' || ...orderStatus == 'e5' || ...orderStatus == 'r3') && ...handleDetailReasonShowFl == 'y' }--> | |
| <a class="refund_comp_btn" href="../mypage/layer_order_refund_reason.php?orderNo={..orderNo}&orderGoodsNo={...sno}&userHandleSno={...userHandleSno}&orderStatus={...orderStatus}" data-toggle="modal" data-target="#popupReason" data-type="post" data-cache="false"> | |
| <!--{ ? ...orderStatus == 'd2' }--> | |
| <strong class="order_finish_btn">{...orderStatusStr}</strong> | |
| <!--{ : }--> | |
| <strong class="order_ing_btn">{...orderStatusStr}</strong> | |
| <!--{ / }--> | |
| <span class="ico_blue_arrow"></span> | |
| </a> | |
| <!--{ : }--> | |
| <!--{ ? ...orderStatus == 'd2' }--> | |
| <strong class="order_finish_btn">{...orderStatusStr}</strong> | |
| <!--{ : }--> | |
| <strong class="order_ing_btn">{...orderStatusStr}</strong> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| </div> | |
| </div> | |
| <!--{ ? ...naverpayStatus.code == 'DelayProductOrder'}--> | |
| <p class="d_causation"> | |
| ({=...naverpayStatus.notice}, <a href="../mypage/layer_order_naverpay_reason.php?orderNo={..orderNo}&orderGoodsNo={...sno}" data-toggle="modal" data-target="#popupReason" data-type="post" data-cache="false"><u>{=__('지연사유')}</u></a>) | |
| </p> | |
| <!--{/}--> | |
| </div> | |
| <ul class="btn_bx"> | |
| <!--{ ? gd_is_plus_shop(c.PLUSSHOP_CODE_USEREXCHANGE) === true && (...userHandleSno > 0 || (...handleSno > 0 && ...handleDetailReasonShowFl == 'y') ) }--> | |
| <li> | |
| <a href="../mypage/layer_order_refund_reason.php?orderNo={..orderNo}&orderGoodsNo={...sno}&userHandleSno={...userHandleSno}&orderStatus={...orderStatus}" data-toggle="modal" data-target="#popupReason" data-type="post" data-cache="false" class="order_etc_btn"> | |
| <!--{ ? ...userHandleMode == 'b' || ...handleMode == 'b' }--> | |
| {=__('반품사유')} | |
| <!--{ : ...userHandleMode == 'r' || ...handleMode == 'r' }--> | |
| {=__('환불사유')} | |
| <!--{ : ...userHandleMode == 'e' || ...handleMode == 'e' }--> | |
| {=__('교환사유')} | |
| <!--{ : ...userHandleMode == 'c' || ...handleMode == 'c'}--> | |
| {=__('취소사유')} | |
| <!--{ / }--> | |
| </a> | |
| </li> | |
| <!--{ : }--> | |
| <!--{ ? substr(...orderStatus, 0, 1) == 'd' }--> | |
| <li> | |
| <a href="#" class="order_ok_btn btn_order_settle" order-no="{..orderNo}" order-goodsno="{...sno}">{=__('구매확정')}</a> | |
| </li> | |
| <!--{ / }--> | |
| <!--{ / }--> | |
| <!--{ ? (substr(...orderStatus, 0, 1) == 'd' || substr(...orderStatus, 0, 1) == 's' || substr(...orderStatus, 0, 1) == 'z') && ...invoiceNo }--> | |
| <!--{ ? ...deliveryMethodFl == 'delivery' || ...deliveryMethodFl == 'packet' || !...deliveryMethodFl }--> | |
| <!--{ ? ...deliveryMethodFl != 'delivery' }--> | |
| <li> | |
| <a class="delivery_trace_btn" style="max-width:100px; overflow:hidden;">{...deliveryMethodFlText}</a> | |
| </li> | |
| <!--{ / }--> | |
| <li><a href="../share/delivery_trace.php?invoiceCompanySno={...invoiceCompanySno}&invoiceNo={...invoiceNo}" class="delivery_trace_btn" data-invoice-company-sno="{...invoiceCompanySno}" data-invoice-no="{...invoiceNo}" target="_blank">{=__('배송추적')}</a></li> | |
| <!--{ : }--> | |
| <li> | |
| <a href="../mypage/layer_order_delivery_method.php?orderNo={..orderNo}&orderGoodsNo={...sno}" data-toggle="modal" data-target="#popupDeliveryMethod" data-type="post" data-cache="false" class="delivery_trace_btn" style="max-width:100px; overflow:hidden;">{...deliveryMethodFlText}</a> | |
| </li> | |
| <!--{ / }--> | |
| <!--{ : }--> | |
| <li> | |
| <a class="delivery_trace_btn" style="max-width:100px; overflow:hidden;">{...deliveryMethodFlText}</a> | |
| </li> | |
| <!--{ / }--> | |
| <!--{ ? ...orderStatus == 'd1' }--> | |
| <li><a href="#" class="delivery_order_btn btn_order_delivery" order-no="{..orderNo}" order-goodsno="{...sno}">{=__('수취확인')}</a></li> | |
| <!--{ / }--> | |
| <!--{ ? ...viewWriteGoodsReview }--> | |
| <li><a href="../board/write.php?bdId={goodsReviewId}&gboard=r&orderGoodsNo={...sno}&goodsNo={...goodsNo}<!--{ ? guest == 'y' }-->&guest=y<!--{ / }-->" class="btn btn_y ogl_reviewrite btn_open_layer" data-toggle="modal" data-cache="false" data-target="#popupBoard">{=__('리뷰쓰기')}</a></li> | |
| <!--{ / }--> | |
| <!--{ ? ...viewWritePlusReview }--> | |
| <li><a href="javascript:gd_popup_plus_review_write('{=..orderNo}', {=...sno}, '{=...goodsNo}')" class="btn btn_y ogl_reviewrite">{=__('리뷰등록')}</a></li> | |
| <!--{/}--> | |
| </ul> | |
| </div> | |
| </li> | |
| </ul> | |
| <!--{ / }--> | |
| <!--{ / // end goods loop }--> | |
| </div> | |
| </form> | |
| <!-- | |
| { / } | |
| { : // else if ordersByRegisterDay } | |
| --> | |
| <div class="my_goods no"> | |
| <p>{=__('최근 주문 내역이 없습니다.')}</p> | |
| </div> | |
| <!-- | |
| { / // end if ordersByRegisterDay } | |
| --> | |
| </div> | |
| <script type="text/javascript"> | |
| // 페이지 진입 시 재구매 체크박스 초기화 | |
| window.addEventListener('pageshow', function() { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| }); | |
| $(function () { | |
| const maxReorderGoodsCount = parseInt('{=maxReorderGoodsCount}') || 0; | |
| // 구매취소 | |
| $(document).off('click.orderCancel').on('click.orderCancel', '.btn_order_cancel', function (e) { | |
| e.preventDefault(); | |
| if (confirm("{=__('주문취소 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'cancelRegist', | |
| orderNo: $(this).attr('order-no') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 수취확인 | |
| $(document).off('click.orderDelivery').on('click.orderDelivery', '.btn_order_delivery', function (e) { | |
| e.preventDefault(); | |
| if (confirm("{=__('수취확인 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'deliveryCompleteRegist', | |
| orderNo: $(this).attr('order-no'), | |
| orderGoodsNo: $(this).attr('order-goodsno') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 구매확정 | |
| $(document).off('click.orderSettle').on('click.orderSettle', '.btn_order_settle', function (e) { | |
| e.preventDefault(); | |
| if (confirm("{=__('구매확정 처리를 하시겠습니까?')}")) { | |
| var params = { | |
| mode: 'settleRegist', | |
| orderNo: $(this).attr('order-no'), | |
| orderGoodsNo: $(this).attr('order-goodsno') | |
| }; | |
| $.post('../mypage/order_ps.php', params, function (data) { | |
| alert(data.message); | |
| if (data.code == 200) { | |
| location.reload(true); | |
| } | |
| }); | |
| } | |
| }); | |
| // 재구매 관련 유효성 검사 | |
| function checkReorderGoodsCount(checkedCount) { | |
| if (checkedCount === 0) { | |
| alert('선택하신 상품이 없습니다.'); | |
| return false; | |
| } | |
| if (checkedCount > maxReorderGoodsCount) { | |
| alert('선택하신 주문의 상품 수가 ' + maxReorderGoodsCount + '개를 초과하여 장바구니에 담을 수 없습니다.'); | |
| return false; | |
| } | |
| return true; | |
| } | |
| // 체크박스 상태 + label on 클래스 동기화 | |
| function setChecked(checkboxes, checked) { | |
| checkboxes.prop('checked', checked).each(function() { | |
| $('label[for="' + $(this).attr('id') + '"]').toggleClass('on', checked); | |
| }); | |
| } | |
| // 주문 체크박스 클릭 → 해당 주문의 상품 전체 선택/해제 | |
| $(document).off('click.orderCheck').on('click.orderCheck', 'input:checkbox[name="reorderOrderNo[]"]', function () { | |
| let orderNo = $(this).data('orderNo'); | |
| let isChecked = $(this).is(':checked'); | |
| setChecked($('input.goods_checkbox[data-order-no="' + orderNo + '"]'), isChecked); | |
| }); | |
| // 상품 체크박스 클릭 → 주문 체크박스 상태 동기화 | |
| $(document).off('click.goodsCheck').on('click.goodsCheck', 'input.goods_checkbox', function () { | |
| let orderNo = $(this).data('orderNo'); | |
| let goodsInOrder = $('input.goods_checkbox[data-order-no="' + orderNo + '"]'); | |
| let isAllChecked = (goodsInOrder.length === goodsInOrder.filter(':checked').length); | |
| setChecked($('input.order_checkbox[data-order-no="' + orderNo + '"]'), isAllChecked); | |
| }); | |
| // 재구매 - 장바구니 담기 | |
| $(document).off('click.reorderCart').on('click.reorderCart', '.btn_reorder_to_cart', function(e){ | |
| e.preventDefault(); | |
| let orderNo = $(this).data('order-no'); | |
| let allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked').filter(function(){ | |
| return $(this).data('order-no') === orderNo; | |
| }); | |
| if (checkReorderGoodsCount(allChecked.length) && confirm('선택하신 상품을 장바구니에 담으시겠습니까?')) { | |
| $('.btn_reorder_to_cart').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: '', | |
| reorderGoodsList: allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| $('input[name="reorderGoodsNo[]"]').prop('checked', false); | |
| $('input[name="reorderOrderNo[]"]').prop('checked', false); | |
| if (confirm(res.message)) { | |
| window.location.href = res.redirect; | |
| } else { | |
| location.reload(); | |
| } | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_to_cart').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| // 재구매 - 바로 구매 | |
| $(document).off('click.reorderDirect').on('click.reorderDirect', '.btn_reorder_direct', function(e){ | |
| e.preventDefault(); | |
| let orderNo = $(this).data('order-no'); | |
| let allChecked = $('input[name="reorderGoodsNo[]"]:checkbox:checked').filter(function(){ | |
| return $(this).data('order-no') === orderNo; | |
| }); | |
| if (checkReorderGoodsCount(allChecked.length) && confirm('선택하신 상품을 주문하시겠습니까?')) { | |
| $('.btn_reorder_direct').prop('disabled', true); | |
| $.post('../order/reorder_ps.php', { | |
| mode: 'cartInMultiForReorder', | |
| data: { | |
| cartMode: 'd', | |
| reorderGoodsList: allChecked.map(function(){ | |
| return $(this).data(); | |
| }).get() | |
| } | |
| }).done(function(res){ | |
| if (res.success) { | |
| if (res.message) { | |
| alert(res.message); | |
| } | |
| window.location.href = res.redirect; | |
| } else { | |
| alert(res.message); | |
| } | |
| }).fail(function(xhr, status, error){ | |
| alert(xhr.responseJSON.message || '요청 처리 중 오류가 발생했습니다.'); | |
| }).always(function(){ | |
| $('.btn_reorder_direct').prop('disabled', false); | |
| }); | |
| } | |
| }); | |
| }); | |
| </script> | |
| <script type="text/javascript" src="\{=c.PATH_SKIN}js/gd_board_goods.js" charset="utf-8"></script> | |
변경 전order_list.html
| <input type="hidden" name="mode" value="{mode}"/> | |
| <fieldset> | |
| <legend>{=__('주문목록/배송조회 날짜 검색')}</legend> | |
| <div class="sel_box"> | |
| <div class="inp_sel"> | |
| <select class="check_option_inner" name="searchPeriod" id="searchPeriod" selected-search-period="{=selectDate}"></select> | |
| </div> | |
| <div id="layer" class="layer"></div> | |
| </div> | |
| </fieldset> | |
| <div class="date_check_calendar" style="display:none;"> | |
| <div class="datepicker-wrapper"> | |
| <input type="text" name="wDate[]" class="anniversary js_datepicker datepicker-range-start" value="{wDate[0]}"/> | |
| <span class="datepicker-tilde">~</span> | |
| <input type="text" name="wDate[]" class="anniversary js_datepicker datepicker-range-end" value="{wDate[1]}"/> | |
| <button type="submit" class="datepicker-submit"><em>{=__('조회')} <img alt="" src="../img/etc/search.png" /></em></button> | |
| </div> | |
| </div> | |
| </form> | |
| </div> | |
| <div id="mypageOrderlist"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_order_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| <div id="orderlist_more"></div> | |
| </div> | |
| $('.more_btn_box button').click(function(){ | |
| var page = parseInt($(this).data('page')) + 1; | |
| var mode = $(this).data("mode"); | |
| var searchPeriod = $('.check_option_inner').val(); | |
| const wDate = isRangeMode() ? getRangeDates().toArray().map(dateElement => dateElement.value) : ""; | |
| $.get('./order_list.php', {'listMode' : 'data', 'page' : page, 'mode' : mode, 'searchPeriod' : searchPeriod, 'wDate': wDate}, function (data) { | |
| if ($(data).find("div.my_goods.no").length) { | |
| alert("{=__('더이상 주문내역이 없습니다.')}"); | |
| } else { | |
| }); | |
| }) | |
| const option = $('.check_option_inner'); | |
| // 검색기간 선택 | |
| if (option.length) { | |
| option.change(function (e) { | |
| } | |
| function initializeDateTimePicker() { | |
| const option = $('.check_option_inner'); | |
| const calendar = $('.date_check_calendar'); | |
| const toggleDateRange = () => calendar.toggle(option.val() === 'range'); | |
| toggleDateRange(); | |
| } | |
| function isRangeMode() { | |
| return $('.check_option_inner').val() === 'range'; | |
| } | |
| function getRangeDates() { | |
변경 후order_list.html
| <input type="hidden" name="mode" value="{mode}"/> | |
| <fieldset> | |
| <legend>{=__('주문목록/배송조회 날짜 검색')}</legend> | |
| <div class="sel_box order_search_period"> | |
| <div class="inp_sel"> | |
| <select class="check_option_inner" name="searchPeriod" id="searchPeriod" selected-search-period="{=selectDate}"></select> | |
| </div> | |
| <div id="layer" class="layer"></div> | |
| </div> | |
| <div class="date_check_calendar" style="display:none;"> | |
| <div class="datepicker-wrapper"> | |
| <input type="text" name="wDate[]" class="anniversary js_datepicker datepicker-range-start" value="{wDate[0]}"/> | |
| <span class="datepicker-tilde">~</span> | |
| <input type="text" name="wDate[]" class="anniversary js_datepicker datepicker-range-end" value="{wDate[1]}"/> | |
| </div> | |
| </div> | |
| <div class="sel_box order_search_keyword"> | |
| <div class="inp_sel">{=gd_select_box(null, 'searchKey', searchKey, null, selectKey, null, null, 'check_option_inner')}</div> | |
| <div class="search_keyword"><input type="search" name="searchKeyword" value="{=searchKeyword}" placeholder="검색어를 입력해주세요."></div> | |
| </div> | |
| <div class="btn_box"> | |
| <button type="submit" class="search_btn">{=__('검색')}</button> | |
| </div> | |
| </fieldset> | |
| </form> | |
| </div> | |
| <div id="mypageOrderlist"> | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_reorder_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| <div id="orderlist_more"></div> | |
| </div> | |
| $('.more_btn_box button').click(function(){ | |
| var page = parseInt($(this).data('page')) + 1; | |
| var mode = $(this).data("mode"); | |
| var listMode = (!mode || mode === 'list') ? 'reorder_data' : 'data'; | |
| var searchPeriod = $('.order_search_period .check_option_inner').val(); | |
| const wDate = isRangeMode() ? getRangeDates().toArray().map(dateElement => dateElement.value) : ""; | |
| let searchKey = $('select[name="searchKey"]').val(); | |
| let searchKeyword = $('input[name="searchKeyword"]').val(); | |
| $.get('./order_list.php', { | |
| 'listMode': listMode, | |
| 'page': page, | |
| 'mode': mode, | |
| 'searchPeriod': searchPeriod, | |
| 'wDate': wDate, | |
| 'searchKey': searchKey, | |
| 'searchKeyword': searchKeyword | |
| }, function (data) { | |
| if ($(data).find("div.my_goods.no").length) { | |
| alert("{=__('더이상 주문내역이 없습니다.')}"); | |
| } else { | |
| }); | |
| }) | |
| const option = $('.order_search_period .check_option_inner'); | |
| // 검색기간 선택 | |
| if (option.length) { | |
| option.change(function (e) { | |
| } | |
| function initializeDateTimePicker() { | |
| const option = $('.order_search_period .check_option_inner'); | |
| const calendar = $('.date_check_calendar'); | |
| const toggleDateRange = () => calendar.toggle(option.val() === 'range'); | |
| toggleDateRange(); | |
| } | |
| function isRangeMode() { | |
| return $('.order_search_period .check_option_inner').val() === 'range'; | |
| } | |
| function getRangeDates() { | |
변경 전order_view.html
| {*** 마이페이지 > 주문상세 | mypage/order_view.php ***} | |
| { # header } | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_order_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| <div class="order_view"> | |
| <!--{ ? orderInfo.gift }--> | |
변경 후order_view.html
| {*** 마이페이지 > 주문상세 | mypage/order_view.php ***} | |
| { # header } | |
| <!-- 주문상품 리스트 --> | |
| {=includeFile('mypage/_reorder_goods_list.html')} | |
| <!--// 주문상품 리스트 --> | |
| <div class="order_view"> | |
| <!--{ ? orderInfo.gift }--> | |
변경 전order.html
| <div class="shipping_info_area"> | |
| <div class="shipping_info_table"> | |
| <!-- 02 배송지정보 --> | |
| <!--{ ? isPresentCartGoods === false }--> | |
| <div class="order_box"> | |
| <h2 class="order_tit"> | |
| <b>{=__('배송정보')}</b> | |
변경 후order.html
| <div class="shipping_info_area"> | |
| <div class="shipping_info_table"> | |
| <!-- 02 배송지정보 --> | |
| <!--{ ? !isPresentCartGoods }--> | |
| <div class="order_box"> | |
| <h2 class="order_tit"> | |
| <b>{=__('배송정보')}</b> | |