Link checkout button to custom page, then redirect to checkout

Highlighted
Tourist
7 1 1

Hello All!

 

For Buy Button embeds:

Is it possible to link the checkout button to a custom page (with tracking scripts), and then redirect to checkout?

 

I'm trying to get Refersion to track from an external website to Shopify's checkout. However, I'm not on the Plus plan and cannot add scripts to the checkout pages.

 

Many thanks,

Andrew

0 Likes
Highlighted

Hi there

 

This solution require coding knowledge, so stay tuned!

 

1. If that just a simple Go To Checkout button you can an event listener for it to go to /checkout on click event

2. If not (It's a Buy Now button), please follow these below steps:

  • Add a button to your page
  • Add an event listener to the button
  • Handle AJAX add to cart function by creating a POST to /add.js endpoint (Remember to include variantId and the quantity)
  • The redirect user to /checkout page

 

If you don't know about code, I would highly recommend you to install PageFly app (Free plan available)
You can use the app to create the Check Out button at any page that you want!

 

- Tips to build the best FAQ page: http://academy.pagefly.io/build-the-best-faq-page
- Are you having problems building Shopify stores? Check out PageFly - An Advanced Page Builder trusted by non-techies and pro web designers.
0 Likes
Highlighted
Tourist
7 1 1

Thanks for your reply @RichardNguyen !

 

Would this be possible using the checkout button in the cart drawer:
What would be needed to pass all the items in the cart to the checkout page?

Screen Shot 2020-01-21 at 10.32.36 AM.png

 

So when the user clicks the checkout button (on external website) → goes to custom page (with tracking scripts) → redirects to Shopify checkout page (with all items in the cart)

0 Likes