Search

리뷰와 관련된 기본 섹션 및 메뉴 숨기기

태그
일반
1 more property
상점에서 리뷰 기능을 사용하지 않는 경우, 아래 소스코드를 헤더의 HTML 섹션에 입력하면 다음과 같은 변경이 적용돼요.
상품 상세 페이지의 리뷰 섹션이 숨겨져요.
고객 마이페이지의 리뷰 메뉴가 숨겨져요.
주문 배송 조회 메뉴에서 구매 확정 버튼 클릭 시 ‘구매 확정이 완료되었습니다. 리뷰를 작성해주세요’ 문구 중 ‘리뷰를 작성해주세요.’ 부분이 생략되고, ‘리뷰 작성하기’ 버튼 대신 ‘확인’ 버튼이 노출돼요.
유의 사항
카카오 알림톡의 배송 완료 기본 템플릿에는 리뷰 작성 유도 멘트가 포함되어 있어, 위 소스코드를 사용하는 경우에는 커스텀 템플릿 사용을 권장해요.
배송 완료 시점의 이메일 기본 템플릿에도 리뷰 작성 유도 멘트가 포함되어 있지만, 이메일 템플릿은 수정이 불가능하므로 소스코드 적용 시 이 점 유의해 주세요.
<style> [class*="section-type-ProductReviewList"], [class*="MyPageMenu_navigation"] button:nth-child(2) { display: none; } </style> <script> var dialogObserver = new MutationObserver(function (mutations, obs) { var dialogHeader = document.querySelector('[class*="ConfirmDialogContentsstyled__DialogHeader"] p'); var footerButtons = document.querySelectorAll('[class*="ConfirmDialogContentsstyled__Footer"] button'); if (dialogHeader || footerButtons.length) { if (dialogHeader && dialogHeader.textContent.includes("구매 확정이 완료")) { dialogHeader.textContent = "구매 확정이 완료 되었습니다."; } footerButtons.forEach(function (button) { var text = button.textContent.trim(); if (text === "리뷰 작성하기") { button.style.display = "none"; } else if (text.includes("다음에")) { button.textContent = "확인"; } }); obs.disconnect(); } }); dialogObserver.observe(document.body, { childList: true, subtree: true }); var buttonObserver = new MutationObserver(function () { document.querySelectorAll('[class*="MyPageContents"] [class*="OrderItemstyled__ButtonWrapper"] button').forEach(function (btn) { if (btn.textContent.includes('리뷰 작성')) { btn.style.display = 'none'; } }); }); buttonObserver.observe(document.body, { childList: true, subtree: true }); </script>
HTML
복사