Jump to content

Redirect after purchase of a single/specific product?

Recommended Posts

Posted

Hello,
I am trying to automatically redirect to a different page after purchasing a specific product. All of the code I can find redirects to a different page for all products in a shop. We're trying to figure out if this can be applied to a single product only?

Thank you!

Posted

I've done a fair amount of redirect code for product detail pages.

I'm a bit confused by your description. You say redirect after product purchase. We can't do anything after a customer has gone through the entire add to cart/cart/checkout process.

If you mean you want to do something while the customer is on the product detail page, before they click on the add to cart button, then I think we can help you out.

But you need to let us know more clearly what you want to accomplish. If it's the later. Please provide the URL for the specific product that you want to redirect.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

  • 3 weeks later...
Posted

See this thread for details of how to redirect to a different page after the Order Confirmation page (after successful Checkout):

However, as @MarcWatson said, this will redirect for all purchases. Although some custom JavaScript could be written to redirect based on the product purchased, this would need to be written specifically for the products, which means it isn't possible to provide you with a generic code to do this via the forum.

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 for everyone's input. We resolved it as best possible. We couldn't figure out a way to do a single product re-direct, therefore used a different concept.

Thanks again!

 

  • 1 month later...
Posted
On 5/4/2021 at 6:53 PM, MarcWatson said:

Thanks for everyone's input. We resolved it as best possible. We couldn't figure out a way to do a single product re-direct, therefore used a different concept.

Thanks again!

 

Hey Marc, I was wondering what solution did you choose instead? I'm trying to set a single product custom re-direct also.

 

  • 1 month later...
Posted

@MarcWatson I too would love to know your workaround as I'm in need of this solution as well. I'm trying to get the client to go to a scheduling page but ONLY for certain products that require it. I'm trying to make it so people who haven't bought the product can't access the scheduling page (and not all products on my site require scheduling). 

Posted
2 hours ago, Chele said:

I'm in need of this solution as well.

Can you provide a few details of your use case, including a working link to the site? With more context, we may be able to help.

 

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.

  • 2 weeks later...
Posted

Thanks @paul2009. The example would be when a client purchases a mentoring session they would then be directed to a scheduling page where they could schedule their sessions. We don't want to make this public or front facing on the site because we don't want people to sign up without having first purchased. We are using an external calendar source (calendly) and have it embedded on a page because we are selling multiple services (some of which are more products than service and don't require a scheduled time) and I haven't yet found a way to allow someone to buy one of each in the same purchase.

Currently, we have put the scheduling link into the notification email they receive upon purchase, but that also goes to people who purchase items that don't need scheduling. Ideally we would like the scheduling option to only be accessible to those that purchase mentoring. Hope that makes sense. The site is mixingmasteringmentoring.com. Thank you!

Posted
46 minutes ago, Chele said:

The example would be when a client purchases a mentoring session they would then be directed to a scheduling page where they could schedule their sessions.

I've assumed that you have one scheduling page shared among all mentoring sessions and that this scheduling page is unlinked and hidden from search results - and similarly hidden on Calendly - to prevent non-purchasers discovering it.

Some JS could be written to look for a common abbreviation (usually in the SKU as this metadata isn't as obvious to the customer as the product title). If the phrase is found on the Order Confirmation page, the JS will modify the page content to add the scheduling page link and some instructions/guidance for the customer.

 

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.

  • 9 months later...
Posted
29 minutes ago, GetGoingDesign said:

I too am looking to re-direct just 1 product to a specific url after purchase. Did you find a way to do this?

Yes, it is possible to do but it isn't straightforward.

You need custom JavaScript to read the order's JSON data and, when the promise is fulfilled, extract the SKUs, check if your product is included and then redirect based on that information. Given the complexity, I wouldn't recommend that someone uses code like that unless they are confident they can maintain it afterwards because it would only take one small Squarespace change for it to break.

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.

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.