Jump to content

Trying to embed my "To-Go" ordering system on Page

Recommended Posts

Site URL: https://www.medusasbrewing.com

Hi all,

I am trying to embed a to-go ordering menu into a new page on my site and for the life of me I can't figure this out. The script that was sent to me by the provider is pasted below.

<script src='https://app.upserve.com/platform/olo-widget.js?medusa-brewing-company-hudson' type='text/javascript' id='upserve-olo-script'></script>

Any help would be appreciated. I've been searching and searching through the forum, but I just can't figure this one out. I am not a web designer (obviously).

THANK YOU!!!!

Keith

Link to comment
  • Replies 3
  • Views 613
  • Created
  • Last Reply

With ❤️, from Andrew @ SQSDesign
Need help building and maintaining your website?

That's all we do: custom blocks, fully-styled templates, product management, POD fulfillment, and more.
Reach out anytime, 24/7/365: 
📱
(628) SQS-DSGN • ✉️ Email • 👀 Instagram • 🚀 RocketSurgery Blog •  🔲 @SQSDesign

Link to comment

Yes. I tried this by pasting the code exactly as it's written, and then choising the HTML option so that it would render the script. The page simply loads as blank.

I did figure out how to run my browser's debugger, and found the following in the olo-widget.js

!function(e,t,n){var r={},o="https://app.upserve.com/s/",s="Upserve Widget: please check the script element that was copied--it should include id='upserve-olo-script'.",i="Upserve Widget: unable to determine store. Please check the code snippet copied from the Breadcrumb Online Ordering settings.",l="Upserve Widget: unable to find click targets. Make sure links or buttons have 'upserve-olo-opener' as a class.";try{var a=function(t){if(t.preventDefault(),e.screen.width<400||!r.cssLoaded){var n=e.open();return n.opener=null,n.location=o+r.spu,!1}c(t)},c=function(){r&&r.container||(r.container=u()),r.container.style.visibility="visible",r.container.style.display="flex",setTimeout((function(){r.section.classList.add("slide-in"),r.overlay.classList.add("fade-in")}),10)},d=function(){r.closer.classList.add("fade-out"),r.section.classList.add("slide-out"),r.section.classList.remove("slide-in"),r.overlay.classList.remove("fade-in"),setTimeout((function(){r.container.style.visibility="hidden",r.container.style.display="none",r.section.classList.remove("slide-out"),r.closer.classList.remove("fade-out")}),350)},u=function(){return r.container=t.createElement("div"),r.container.className="up-olo-container",r.overlay=t.createElement("div"),r.overlay.className="up-olo-overlay",r.section=t.createElement("section"),r.section.className="up-olo-section",r.iframe=t.createElement("iframe"),r.iframe.className="up-olo-iframe",r.iframe.setAttribute("frameborder",0),r.closer=t.createElement("div"),r.closer.className="up-olo-closer",r.closer.innerHTML="&times;",r.closer.setAttribute("role","button"),r.closer.setAttribute("aria-label","Close online ordering widget"),r.closer.addEventListener("click",d),r.spinner=t.createElement("div"),r.spinner.className="up-olo-spinner",r.spinnerLogo=t.createElement("div"),r.spinnerLogo.className="up-olo-logo",r.spinner.appendChild(r.spinnerLogo),r.section.appendChild(r.iframe),r.section.appendChild(r.spinner),r.container.appendChild(r.overlay),r.container.appendChild(r.section),r.container.appendChild(r.closer),r.iframe.src=o+r.spu,r.iframe.onload=function(e){r.spinner.classList.add("fade-out"),setTimeout((function(){r.spinner.style.visibility="hidden",r.spinner.style.display="none"}),450)},t.body.appendChild(r.container),r.container},p=t.getElementById("upserve-olo-script");if(!p)throw new Error(s);if(r.spu=p.getAttribute("src")&&p.getAttribute("src").split("?")[1],!r.spu||r.spu.length<3)throw new Error(i);r.style=t.createElement("link"),r.style.rel="stylesheet",r.style.media="all",r.style.crossOrigin="anonymous";var f=new URL(p.getAttribute("src")).origin;r.style.href="".concat(f,"/platform/6f5b1713841329d4001a/olo-widget.6f5b1713841329d4001a.css"),p.parentNode.appendChild(r.style);var m=0,v=setInterval((function(){r.style.sheet&&r.style.sheet.cssRules&&(r.cssLoaded=!0,clearInterval(v)),m>300&&clearInterval(v),m+=1}),50),y=t.querySelectorAll(".upserve-olo-opener");if(y.length<1)throw new Error(l);y.forEach((function(e){e.addEventListener("click",a)}))}catch(t){e.console&&e.console.warn(t)}}(window,document)},"./styles/olo-widget.css":function(e,t,n){},1:function(e,t,n){n("./src/olo-widget.js"),e.exports=n("./styles/olo-widget.css")}});

I am not sure if that helps.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.