Advertisement
ikai2

dawn NL

Apr 12th, 2023 (edited)
667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- PAGEFLY CART HELPER - DO NOT DELETE -->
  2. <script>
  3. window.addEventListener("load", () => {
  4.   try {
  5.     window.__pagefly_helper_store__ &&
  6.       window.__pagefly_helper_store__.subscribe(function (r) {
  7.       async function fetchData() {
  8.         const response = await fetch(
  9.           "/?sections=cart-notification-product,cart-notification-button,cart-drawer,cart-icon-bubble"
  10.         );
  11.         const sections = await response.json();
  12.         const cartDrawer =
  13.           document.querySelector("cart-notification") ||
  14.           document.querySelector("cart-drawer");
  15.         cartDrawer.classList.remove("is-empty");
  16.         r.sections = sections;
  17.         cartDrawer.renderContents(r);
  18.       }
  19.       fetchData();
  20.       });
  21.   } catch (e) {
  22.     console.error("PF Error: ", e);
  23.   }
  24.   });
  25. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement