Jump to content

Customize Membership Button with Javascript

Recommended Posts

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

Hey all,

I'm working on integrating subscription access to a site I'm working on for a friend. I love the css and customization I currently have utilizing an entire image block as a link. That being said, I've discovered that there is a member's block in squarespace they want you to use to direct customers to their javascript popup. I'd like for the signup popup to popup from clicking my image block rather than their prepackaged member's blocks.

Website is still in it's infancy, but here is the URL: www.mamascoach.com, password = password

1797254651_ScreenShot2021-10-03at5_19_37PM.thumb.png.8ef94fdc44f99c5d03a0cbfdc299d97b.png

Above you can see the image blocks I'd like to use as links. 

 

Below is the member block button that I'd like to use the javascript from.

1258738890_ScreenShot2021-10-03at5_21_09PM.thumb.png.849b4f91fcae11c019c957fb83ff1c1d.png

 

I may be wrong, but I believe this is the javascript being triggered by that button:

<script type="application/json" id="bootstrap-data">
         
          {"loginDialogConfig":{"headerText":"Welcome to Mama's Coach","subheaderText":""},"createAccountDialogConfig":{"headerText":"Create Account","subheaderText":"","shouldShowReCaptcha":false,"reCaptchaSiteKey":"6LcLKWYaAAAAALAdf1Q4ri_EcSPPN4yRW0xxHdaX"},"xsrfToken":"MXw2MTJlYzZiZWVmMjU2YjQyM2UxYWI3MmY6MTYzMzI5NjkyOTkzMHxzQ0l4ZzdMSThKTXRIVDQwcUh5dlJQZ1lDeWVJNWdEb3hhTHdJcDRMMXYtZ0RMb2IxZUZNckRBV2ROM2hITW1R","loginOrigin":"member_area_block","memberArea":{"websiteId":"612ec6beef256b423e1ab72f","memberAreaId":"615a02f7961c542198d1a56d","groupId":"615a02f7961c542198d1a56d","title":"BASIC","paywallProductId":"3a7e5c8b-7243-4405-b07d-34b7fc4f459f","purchaseType":"PAID","aclIds":[],"joinButtonVisibility":"SHOW_JOIN_BUTTON"},"pricingOptionId":"fba0e268-a240-4c86-9517-e96ec58d5784","originUrlPath":"","pricingOption":{"id":"fba0e268-a240-4c86-9517-e96ec58d5784","price":{"currencyCode":"USD","value":1499,"decimalValue":"14.99","fractionalDigits":2},"onSale":false,"subscriptionPlan":{"productId":"3a7e5c8b-7243-4405-b07d-34b7fc4f459f","pricingOptionId":"fba0e268-a240-4c86-9517-e96ec58d5784","billingPeriod":{"value":1,"unit":"MONTH"},"planVersionId":"2a644235-ba82-472f-87b2-53848756357b","numBillingCycles":0},"subscribable":true},"websiteId":"612ec6beef256b423e1ab72f"}
        </script>

I'm pretty desperate for help. 

 

Thank you so much!

 

@tuanphan I know you always have so many helpful things to say! 

 

 

Edited by Ten10
addition of tag
Link to comment
  • Ten10 changed the title to Customize Membership Button with Javascript
  • Replies 1
  • Views 305
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

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.