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 12
  • Views 1.3k
  • 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.

Update: Member Sites protects Squarespace content. Please see the more up-to-date information below.

Edited by paul2009

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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 me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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.

Update: Member Sites protects Squarespace content. Please see the more up-to-date information below.

Did this help? Please give feedback by clicking an icon below  ⬇️

Edited by paul2009
Updated for the release of Digital Products (including Member Sites) in August 2023

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

No problem :-)

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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 - renamed Member Sites (in August 2023) - an additional cost option that allows you to secure specific pages on your site and make them available to members only.

Did this help? Please give feedback by clicking an icon below  ⬇️

Edited by paul2009
Updated for the release of Digital Products (including Member Sites) in August 2023

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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.