Using my custom domain for the checkout page when using Buy Button

Solved
Highlighted
Tourist
3 0 6

Hello!

 

I am just about to migrate out of Shopify themes, amazing as they are, and create my own website using a different service. I created a Basic Buy Button, embedded that into the website. The behavior is that the button Adds To Cart, the cart is the overlay on the right which has a Checkout button. Everything works flawlessly till here. But upon clicking Check Out, it redirects the user to a abc.myshopify.com/... checkout URL and not to my own custom domain. Since I am migrating to a new design, I am nervous as this might affect the website's credibility a little. Is there a way to mask the domain or have checkout redirected to customdomain.com/.... I am not entirely comfortable with programming but I can tinker. I'd be really grateful if anyone could help out.

 

Additionally, a side question if anyone knows- will the Add To Cart action of a Buy Button trigger Facebook's Pixel Event normally like it does within Shopify themes?

 

Thanks guys!

5 Likes
Highlighted
Tourist
8 0 4

I am currently going through the same thing and wanting to have the checkout as my custom domain, I am assuming though that it defaults to the abc.shopify.com domain as that is where the checkout system is hosted whilst your actual website is hosted externally to shopify. I would also like to be able to add a 'continue shopping' link to the Buy Button but that doesn't seem to be something that I can do either with the Buy Button. 

 

Hopefully there will be a response to your question soon. 

2 Likes
Highlighted
Tourist
3 0 6

Hi Debbie,

 

I believe since it is a Buy Button for a specific product, the Checkout button takes you to the Checkout Link of that product which is hosted on abc.myshopify.com domain and not the actual fully fledged checkout as you would on your Shopify hosted shop. Hoping there's an update to the Buy Button soon, if there's no easy solution to this. Fingers crossed.

0 Likes
Highlighted
Tourist
5 0 1

Any progress on masking the checkout URL with buy buttons?

Christian

1 Like
Highlighted
New Member
1 0 1

Stil hoping/waiting for a solution to this.

Anyone been in direct contact with customer support about this topic? 

I know I would turn around as a customer experiencing this “weird” URL behavior.

I’m expecting abc.com but get abc.shopify.com

Dear Shopify - Please look into this and if possible provide us “custom domainers” with a fix

1 Like
Highlighted
New Member
1 1 3

This is an accepted solution.

I have some good news for you all. Like you, I wanted to be able to design my own website while using Shopify checkout and was baffled that Shopify provided no way to point a domain to buy-button checkout. I spent hours chatting with Support about this, and heard many times that it's simply "not a feature." There's actually an extremely simple solution that's either not known to support or they've chosen not to share.

If you go into your buy button's embed code, you'll find a script like the following: 

function ShopifyBuyInit() {
var client = ShopifyBuy.buildClient({
domain: 'insert-custom-domain.com',
storefrontAccessToken: '12345..........',
});

Yes – you can control the domain that surfaces during buy-button checkout by simply switching out the "domain" variable's value ('insert-custom-domain' here for clarity) to your custom domain. I thought this was too simple to work, but confirmed this via a comment from Shopify in a tangentially related thread and it works for me. 

FYI I'm using a subdomain that I've connected to my online-store channel in Shopify. I don't think this solution would work without that connection. 

Enjoy!

3 Likes
Highlighted
Tourist
8 0 4

Wow @jakedoering 

thankyou so much for this. I have just looked at the Buy Buttom code now and am kicking myself that I didn't look into the code better as it makes perfect logical sense. Unfortunately, I ended up changing to shopify basic as there didn't seem to be a solution. I will keep this solution in mind for the future. Bloody awesome though, thankyou

Cheers

1 Like
Highlighted
Tourist
3 0 6

@jakedoering this will help out a lot of folks indeed! I have rudimentary technical knowledge and while this seems good, I hope for everyone implementing it, it is a safe way to do it. I wonder why Shopify has not suggested this before! It looks simple and straightforward enough. 

I eventually just had to go with a theme and customize it quite a bit to fit it to my needs. Nowhere close to how I envisioned the website but good enough. Will keep this in mind though for implementing the button on a sister website. Thanks a ton.

1 Like