georgiamather Posted October 26, 2021 Share Posted October 26, 2021 Site URL: https://www.weareenough.com.au/ I need to add a gift card widget to a websites navigation. I've added a circle to a screenshot of where I need it to sit. (or at least somewhere in the navigation area). This is the code I've been provided but it simply doesn't work when I follow the instructions. Is anyone able to assist? <!––Place this script into your webpage's head section.––> <script type="application/javascript" async id ="sc-widget_launcher" src="https://d19ujuohqco9tx.cloudfront.net/ols-prod-giftcard-ui/widget-injector/sc-widget-launcher.js" data-ruleset_id="6364" data-currency_code="AUD" data-activation_option="3" data-widget_label="Gift vouchers" data-liable_site_id="40369" data-popup_width="480" data-popup_height="840" data-host="https://d19ujuohqco9tx.cloudfront.net/ols-prod-giftcard-ui" ></script> <!––Place this button or link into your webpage's body where you want the widget launcher to display.––> <input id="sc-widget_launcher_button" type="button" value="Purchase giftcard!" onclick="launchShortcutsWidget();"> <a id="sc-widget_launcher_link" href="#" onclick="launchShortcutsWidget();">Purchase giftcard!</a> Beyondspace 1 Link to comment
Beyondspace Posted October 26, 2021 Share Posted October 26, 2021 What is the widget provider BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Beyondspace Posted October 26, 2021 Share Posted October 26, 2021 Add this into Settings->Advanced->Code Injection->Footer <script> (function() { const headerCta = document.querySelectorAll('.header-actions-action--cta, .header-menu-cta'); headerCta.forEach((item) => { item.insertAdjacentHTML('afterbegin', `<a id="sc-widget_launcher_link" class="btn btn--border theme-btn--primary-inverse" href="https://enoughstudio.mylocalsalon.com/onlinebooking/v7410/Steps/SelectServices.aspx" target="_blank" onclick="launchShortcutsWidget();">Purchase giftcard!</a>`) }); })() </script> <script type="application/javascript" async id ="sc-widget_launcher" src="https://d19ujuohqco9tx.cloudfront.net/ols-prod-giftcard-ui/widget-injector/sc-widget-launcher.js" data-ruleset_id="6364" data-currency_code="AUD" data-activation_option="3" data-widget_label="Gift vouchers" data-liable_site_id="40369" data-popup_width="480" data-popup_height="840" data-host="https://d19ujuohqco9tx.cloudfront.net/ols-prod-giftcard-ui" ></script> BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
georgiamather Posted October 26, 2021 Author Share Posted October 26, 2021 18 hours ago, bangank36 said: What is the widget provider Thank you for this code! So it definitely works in terms of showing a button, however it's taking me to the wrong spot. I've added the widget to a hidden page so you can see what pop up screen it is meant to link too:https://weareenough.com.au/gift-voucher-test Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment