Jump to content

Is there a way to trigger a pop-up when a customer wants to cancel a subscription?

Recommended Posts

  • Replies 3
  • Views 475
  • Created
  • Last Reply
Posted
6 minutes ago, nosremetnarg said:

My client is wanting to add a pop up that would allow for the customer to pause their subscription instead of cancel.

Sadly, Squarespace does not have a pause option for subscriptions or memberships.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Posted

Thanks Paul. I tried writing some custom JS to trigger my own pop-up to guide clients elsewhere but can't actually trigger my pop up b/c the sidebar that pops up is in a different html body and what I am trying to do violates some CORS rules. Ughhhhhh. My eventListener can't "hear" clicks on the sidebar. 

 

<!-- Code Added by Grant 9/29/21 -->
<div class="pauseSubscription">
        <h1>Want to Pause Your Subscription?</h1>
            <p>Email hello@tinyearth.co</p>  
            <p>and we will put your account on hold</p>
</div>
<style>
.pauseSubscription {
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center; 
        width: 40%;
        background-color: white;
        margin: 0 auto;
        border-radius: 5px;
        color: black;
        position: absolute;
        left: 30%;
        top: 50%;
        transform: translate(-50%, -50%);
        filter: drop-shadow(0 0 0.75rem #0e4e59);
        display: none;
        padding-left: 10px;
  	z-index: 100;
    }
    </style>
<script type=text/javascript>
     let lightBox = document.querySelector(".pauseSubscription")
     let rgx = "Cancel Subscription"
    window.addEventListener("click", function(e) {
        console.log(e.target.innerHTML);
        let target = e.target.innerHTML
        if(target == rgx) {
            console.log("You clicked on Cancel")
            lightBox.style.display = "block";
        } else {
            console.log('no thanks');
        }
    })
</script>

 

Posted

Yes, the account features have been deliberately separated for security.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

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.