Jump to content

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

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment

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>

 

Link to comment

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

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.