Jump to content

How to use javascript to check to see if a logged in user has bought a subscription.

Go to solution Solved by paul2009,

Recommended Posts

Hey all, I need to allow a user to access a part of my website if they have bought a subscription product. The customer will have to log in before I do this check.

Is there a way to check to see if a user has purchased a subscription project with Javascript?

Edited by activefire
Initial Revision
Link to comment
  • Replies 13
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

No. There's no effective way to protect Squarespace content like this.

About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity 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.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

Link to comment

You said that you only want to allow a website visitor to be able to access a part of your website unless they have purchased a product. Therefore you presumably want to protect these parts of your site from being accessed by all other visitors?

About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity 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.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

Link to comment

Okay. Sorry, I misunderstood you.

Yes. You are correct. Sorry, I've just never heard it that way. So yeah, if a user has not purchased a subscription either don't show them a page, or don't allow them access.

I don't want to store the non-subscription and subscription pages in HTML since a user could just un-hide the HTML for subscription users only. I don't think Squarespace would allow me to do that. Additionally, I don't think squarespace allows access to their servers anyway.

Edited by Paul2009
Link to comment

Okay. Sorry, I misunderstood you.

Yes. You are correct. Sorry, I've just never heard it that way. So yeah, if a user has not purchased a subscription either don't show them a page, or don't allow them access.

I don't want to store the non-subscription and subscription pages in HTML since a user could just un-hide the HTML for subscription users only. I don't think Squarespace would allow me to do that. Additionally, I don't think squarespace allows access to their servers anyway.

Link to comment

Yes, there's no way to do this with Squarespace alone. You don't have access to the backend. You could buy a third party addon like MemberSpace and process the membership subscriptions on this instead. It can then lock access to certain protected content - but not the content on Squarespace's own pages. It's not technically possible.

About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity 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.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

Link to comment

Yes, there's no way to do this with Squarespace alone. You don't have access to the backend. You could buy a third party addon like MemberSpace and process the membership subscriptions on this instead. It can then lock access to certain protected content - but not the content on Squarespace's own pages. It's not technically possible.

About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity 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.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

Link to comment

No problem :-)

About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity 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.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

Link to comment
  • 2 years later...
  • Solution

This thread was created and answered in 2019 and is now out of date.

Since that time, Squarespace launched a new feature called Member Areas, an additional cost option that allows you to secure specific pages on your site and make them available to members only.

About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity 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.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

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.