From a5d572e9cef6a0cd42d3099111c4e25c15fd9546 Mon Sep 17 00:00:00 2001 From: Matei Iordache Date: Fri, 6 Sep 2024 14:44:24 +0300 Subject: [PATCH 1/2] feat: initialize products price logic for non-draft pages --- _src-lp/scripts/scripts.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_src-lp/scripts/scripts.js b/_src-lp/scripts/scripts.js index 9442cff7..ae079041 100644 --- a/_src-lp/scripts/scripts.js +++ b/_src-lp/scripts/scripts.js @@ -1185,6 +1185,11 @@ async function loadPage() { }); } + const isPageNotInDraftsFolder = window.location.pathname.indexOf('/drafts/') === -1; + if (!isPageNotInDraftsFolder) { + initializeProductsPriceLogic(); + } + addScript('/_src-lp/scripts/vendor/bootstrap/bootstrap.bundle.min.js', {}, 'defer'); eventOnDropdownSlider(); From ec822fa47c46b8b2691cd918938e9609de65da25 Mon Sep 17 00:00:00 2001 From: Matei Iordache Date: Fri, 6 Sep 2024 14:52:22 +0300 Subject: [PATCH 2/2] chore: execute price logic for non-draft pages --- _src-lp/scripts/scripts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/_src-lp/scripts/scripts.js b/_src-lp/scripts/scripts.js index ae079041..0fde25ff 100644 --- a/_src-lp/scripts/scripts.js +++ b/_src-lp/scripts/scripts.js @@ -1185,6 +1185,7 @@ async function loadPage() { }); } + // in the drafts folder adobe target is not loaded, so the price logic should be executed const isPageNotInDraftsFolder = window.location.pathname.indexOf('/drafts/') === -1; if (!isPageNotInDraftsFolder) { initializeProductsPriceLogic();