What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: I want to add Paypal smart payment buttons

Solved

I want to add Paypal smart payment buttons

Not applicable

I want to add Paypal smart payment buttons  To my store

This is my store link https://www.supportcatlive.com/

This is a link of Paypal smart buttons https://developer.paypal.com/

Please help, help me

I don't know where to add the code

xxx.PNG

Accepted Solution (1)
MattPr
Excursionist
13 1 6

This is an accepted solution.

I've had the same question recently and did a little bit of investigating as most of these posts go unsolved.

 

Lo' and behold I found the answer.

 

First you go into your online store and choose "edit code" in the actions menu. Then find the "cart-template.liquid" file and locate the 268-269th row.

 

Implement your paypal button code inbetween the 268th and 269th row as shown

 

code edited 1.png

 

And then you shoud comment out the code that functioned as your normal check out button as shown below.

 

code edited 2.2.png

 

And this is how the code looks implemented in your store

 

finished code.png

View solution in original post

Replies 57 (57)

Julie
Shopify Staff
1109 106 375

Hi, @Anonymous!

 

Julie here from Shopify Support. Thanks for the link to your store, as well as the screenshots. This is a great question.

While PayPal refers to these as "smart payment buttons", Shopify offers "dynamic checkout buttons", which are quite similar. Dynamic checkout buttons are displayed on your product pages and dynamically change to reflect the customer's preferred accelerated checkout method, which is quite often PayPal.

 

Much like smart payment buttons, dynamic checkout buttons offer the customer the ability to pay with PayPal directly from the product page. However, while PayPal's smart payment buttons also display "Credit or Debit" as options, Shopify's dynamic checkout buttons instead include a "More payment options" button, which will take customers directly to the Shopify checkout, where they can proceed with a credit card transaction. 

 

Taking a look at your product pages, it appears that you already have dynamic checkout buttons enabled. For example, this is what I see when I head to one of your product pages: 

08-58-1e2is-ao26l

 

Is the reason why you're wanting to have PayPal's smart payment buttons because you'd like to give customers the ability to pay with credit or debit through the PayPal gateway? With PayPal Express, the default is set to ask customers to log in to PayPal (or create a PayPal Account). However, you can enable guest payments to let customers pay with their credit card even if they don't have their own PayPal account. To enable guest payments, you'll just need to change the settings in your PayPal account settings. Feel free to check out PayPal's help doc on enabling guest payments to learn more

 

If you are still wanting to add PayPal's smart button, then I would recommend getting in touch with a Shopify Expert to see if this is possible. Because Shopify themes are built upon a different code language, Liquid, the process for integrating this likely involves more than just simple HTML. I'm also curious to see if the rest of the Community has any suggestions.

I hope this clears things up and helps explain the similarities and differences between PayPal's smart buttons and Shopify's dynamic checkout buttons. If I've misunderstood your question, or if you have any followup inquiries, please feel free to respond here! 

Julie | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

rentner
Visitor
1 0 10

im about to get really annoyed by shopify services, all i see are promises for the future without any action taken. 

What can be so hard about letting customers implement simple HTML code in order to let customers pay with credit-card?

It's the least you can do since the proposed payment-providers dont reply at all or after a couple of weeks. 

By the end of my subscription, i highly doubt that i will renew my shopify plan. Cannot reccomend

moderate99
Tourist
4 0 1

Does anyone know how or where to add the paypal smart button code?

Martinsss
New Member
4 0 0

Does anyone know how or where to add the paypal smart button code?

Martinsss
New Member
4 0 0

I also want to add smart button do you know something about it

Ecom_guru
Visitor
3 0 0
First of all login to your PayPal and copy the code then open your Shopify account go to theme then paste..

If you need more info you can contact me on my main
superneil781@gmail.com
Martinsss
New Member
4 0 0

Hi, do you know where exactly have put to this javascript, for example here67.PNGCapture55.PNGcode in shopify?

moderate99
Tourist
4 0 1

Yeah exactly, I use debutify theme. Do you know where i can paste the code?Screenshot 2020-05-03 at 21.26.06.png

Screenshot 2020-05-13 at 14.59.43.png

Martinsss
New Member
4 0 0

I'm still looking for that

MattPr
Excursionist
13 1 6

This is an accepted solution.

I've had the same question recently and did a little bit of investigating as most of these posts go unsolved.

 

Lo' and behold I found the answer.

 

First you go into your online store and choose "edit code" in the actions menu. Then find the "cart-template.liquid" file and locate the 268-269th row.

 

Implement your paypal button code inbetween the 268th and 269th row as shown

 

code edited 1.png

 

And then you shoud comment out the code that functioned as your normal check out button as shown below.

 

code edited 2.2.png

 

And this is how the code looks implemented in your store

 

finished code.png

Hisham-G
Visitor
1 0 1

Hi MattPr

 

I couldn't find the "cart-template.liquid" file in code edit ,,, i just found 'cart.liquid' ,,,,, could you help me ? 

 

thanks in advance 

MattPr
Excursionist
13 1 6

Hey Hisham,

 

The cart template liquid file should be in your sections, as it is your standard file

Ghayath
Visitor
1 0 0

Hi. I couldn't find it too.

MattPr
Excursionist
13 1 6

@Ghayath 

 

What store theme are you using? This could be the problem as some themes have different sections and files

PLarsen2
Visitor
1 0 0
Click to expand...
Hi Matt I am using the debutify theme do you know how to implement the code into that theme?
fatima2002
Visitor
1 0 0

hi please 

did you find it 

chj6
Tourist
5 0 3

Thank you for this! It's been a hassle for our company to try and get a third payment processor when there's not a lot of options since we are located in Korea.

 

I had a few questions though, have you tried it out on your store? Does it trigger the website that an order has been made if it does not take the customer through the initial checkout process? 

 

My store is connected to the ERP software for my agent and I'm not sure the orders will show up on his software or it's going to send an order confirmation email to my customer. We also can't give them the option of the discount code.

 

Do you know how to put the smartbutton on the product page and the last page of the checkout page where you put in your card information(not on the add to cart page as you have shown above) 

 

Thank you! 

 

 

MattPr
Excursionist
13 1 6

I'm gonna go through your questions so I don't miss any just in case.

 

Have you tried it out on your store?

I have tried it out and got a few sales while in testing phase to see if it's doable, so it does work. It has it's benefits and drawbacks as anything else does.

 

Does it trigger the website that an order has been made if it does not take the customer through the initial checkout process? 

Unfortunately it does not, as the payment itself goes through paypal. The buttons are located on your store, but don't have a connection with it. That's the problem I've been trying to figure out for a while now, as you can't really get precise analytics with your store.

 

I'm not sure the orders will show up on his software or it's going to send an order confirmation email to my customer.

The order will not show up as the payment goes straight to paypal. You can see the order on paypal, but not on shopify + if you sell multiple items you would need extra lines of code in your cart template file to account for those as well (find your cart.total variable and link it to the paypal button so it knows how much to charge - I could post pictures here of this code as I've been experimenting with it as well). The only way (for now) that I found which works with this method is just to copy the account information (name, surname, address, country, etc.) from paypal to shopify in a draft order and mark it as payed. Then when you fill out all the necessary information with your supplier, just copy the shipping code and any other necessary information to that order on shopify. This would make the email notifications on your store work.

 

We also can't give them the option of the discount code.

I've been dealing with this problem as well, but I've seen a couple examples of the paypal button with discount code boxes where the customer can input their discount and it would subtract the discounted amount, although I still need to look into that to see if it would work. 

 

Do you know how to put the smart button on the product page and the last page of the checkout page where you put in your card information(not on the add to cart page as you have shown above)

Like in the previous questions, I've been looking into that as well. Putting the paypal button on the last page of the checkout page is not really a problem. The problem with having your paypal button on the end of your checkout page is that you somehow need to link all the account information that the customer filled on your shopify store with the paypal button, which seems to be a hassle, as paypal basically just embedded the button without giving you an easy option to modify the code to fit your needs. The benefits of this would of course be better analytics and tracking, because you know which customer made and initiated the checkout.

 

The reason I'm answering these questions is to give insight to other people where I am currently with this situation and if anybody knows more, to share. Some of the ideas I've been researching are linking paypal and shopify with api's and webhooks so shopify can reach out to your paypal and get the information needed. Google ads would be another option to research, but I think that, like any other ad platform, it needs information to feed it's algorithm.

 

 

Once again, if anybody knows more or has better insight please feel free to share, as this is a community of like-minded people who are eager to learn!

 

Edit: Spelling and grammar

MattPr
Excursionist
13 1 6

@chj6  I'll try to answer your questions separately so I don't miss any:

 

 

have you tried it out on your store?

I have tried it and got sales during the test phase, so it does work, but like any other method it has it's advantages and drawbacks.

 

 

Does it trigger the website that an order has been made if it does not take the customer through the initial checkout process? 

Unfortunately it does not as it goes directly through paypal and not shopify. That's the biggest problem with this method (for now) in my opinion

 

 

 I'm not sure the orders will show up on his software or it's going to send an order confirmation email to my customer. 

The orders will not show up on your agent's software and or on shopifies as previously stated. The paypal button is just embedded on the store and does not share any information with it (name, username, address, etc.). The way I found which works with this method is to copy your customers information from paypal (as it will show up there) and just make a draft order on shopify with the exact same information and mark it as paid. Then pay for the order and fill out the remaining information, i.e. shipping code and other notable information. This should start the email sequence you have set up. Although a little longer and less automated, it works.

 

 

We also can't give them the option of the discount code.

I've been trying to find the solution for this, as I've seen examples of paypal's buttons with input boxes where the customer could type in his/her discount code and then apply it to the final product price. This would take a little bit more code to do, as the smart buttons work with one "price", i.e they are set to one specific price and not to a changeable variable like your cart total price. I've exchanged ideas with people on here that had this problem regarding total product cart pricing with paypal buttons - basically paypal buttons only accept one price out of the box and you need to make a string variable with a "." separator so paypal knows what's up (I made the code and if anybody asks for it I'm willing to put it on here for everybody to see)

 

 

Do you know how to put the smartbutton on the product page and the last page of the checkout page where you put in your card information(not on the add to cart page as you have shown above) 

Putting the smart buttons on the final page of the checkout page is not that big of a problem. The biggest problem is linking the information a customer puts in your store with the smart buttons. Paypal remodeled their own javascript SDK language for this and it could take a bit more work and expertise that I do not currently posses. This wouldn't fix the problem though, as shopify wouldn't know if the customer payed for the product or not because the payment goes through paypal.

 

The reason why I'm answering these questions is to give insight into the topic of what I currently know. The best way, in my opinion, of fixing this is to have api-s or webhooks which would connect the two platforms and make them exchange information when one or the other gets some. I'm currently looking into this and do not posses the knowledge to share completely so if anybody (who knows more) wants to share, feel free! Plus it would be a good idea to look further into this, as shopify feeds the facebook pixel with information which it uses for it's ads and if it does not receive information it could mess up the learning phase of the platform. Google ads could be another option, but I didn't look further into them.

 

If anybody has anything valuable to share on this topic, feel free!

 

 

MattPr
Excursionist
13 1 6

 I'll try to answer your questions separately so I don't miss any:

 

@chj6 

 

have you tried it out on your store?

I have tried it and got sales during the test phase, so it does work, but like any other method it has it's advantages and drawbacks.

 

 

Does it trigger the website that an order has been made if it does not take the customer through the initial checkout process? 

Unfortunately it does not as it goes directly through paypal and not shopify. That's the biggest problem with this method (for now) in my opinion

 

 

 I'm not sure the orders will show up on his software or it's going to send an order confirmation email to my customer. 

The orders will not show up on your agent's software and or on shopifies as previously stated. The paypal button is just embedded on the store and does not share any information with it (name, username, address, etc.). The way I found which works with this method is to copy your customers information from paypal (as it will show up there) and just make a draft order on shopify with the exact same information and mark it as paid. Then pay for the order and fill out the remaining information, i.e. shipping code and other notable information. This should start the email sequence you have set up. Although a little longer and less automated, it works.

 

 

We also can't give them the option of the discount code.

I've been trying to find the solution for this, as I've seen examples of paypal's buttons with input boxes where the customer could type in his/her discount code and then apply it to the final product price. This would take a little bit more code to do, as the smart buttons work with one "price", i.e they are set to one specific price and not to a changeable variable like your cart total price. I've exchanged ideas with people on here that had this problem regarding total product cart pricing with paypal buttons - basically paypal buttons only accept one price out of the box and you need to make a string variable with a "." separator so paypal knows what's up (I made the code and if anybody asks for it I'm willing to put it on here for everybody to see)

 

 

Do you know how to put the smartbutton on the product page and the last page of the checkout page where you put in your card information(not on the add to cart page as you have shown above) 

Putting the smart buttons on the final page of the checkout page is not that big of a problem. The biggest problem is linking the information a customer puts in your store with the smart buttons. Paypal remodeled their own javascript SDK language for this and it could take a bit more work and expertise that I do not currently posses. This wouldn't fix the problem though, as shopify wouldn't know if the customer payed for the product or not because the payment goes through paypal.

 

The reason why I'm answering these questions is to give insight into the topic of what I currently know. The best way, in my opinion, of fixing this is to have api-s or webhooks which would connect the two platforms and make them exchange information when one or the other gets some. I'm currently looking into this and do not posses the knowledge to share completely so if anybody (who knows more) wants to share, feel free! Plus it would be a good idea to look further into this, as shopify feeds the facebook pixel with information which it uses for it's ads and if it does not receive information it could mess up the learning phase of the platform. Google ads could be another option, but I didn't look further into them.

 

If anybody has anything valuable to share on this topic, feel free!

 

Edit: Shopify seems to be deleting my posts regarding this everytime I post

MattPr
Excursionist
13 1 6

 I'll try to answer your questions separately so I don't miss any:

 

@chj6 

 

have you tried it out on your store?

I have tried it and got sales during the test phase, so it does work, but like any other method it has it's advantages and drawbacks.

 

 

Does it trigger the website that an order has been made if it does not take the customer through the initial checkout process? 

Unfortunately it does not as it goes directly through paypal and not shopify. That's the biggest problem with this method (for now) in my opinion

 

 

 I'm not sure the orders will show up on his software or it's going to send an order confirmation email to my customer. 

The orders will not show up on your agent's software and or on shopifies as previously stated. The paypal button is just embedded on the store and does not share any information with it (name, username, address, etc.). The way I found which works with this method is to copy your customers information from paypal (as it will show up there) and just make a draft order on shopify with the exact same information and mark it as paid. Then pay for the order and fill out the remaining information, i.e. shipping code and other notable information. This should start the email sequence you have set up. Although a little longer and less automated, it works.

 

 

We also can't give them the option of the discount code.

I've been trying to find the solution for this, as I've seen examples of paypal's buttons with input boxes where the customer could type in his/her discount code and then apply it to the final product price. This would take a little bit more code to do, as the smart buttons work with one "price", i.e they are set to one specific price and not to a changeable variable like your cart total price. I've exchanged ideas with people on here that had this problem regarding total product cart pricing with paypal buttons - basically paypal buttons only accept one price out of the box and you need to make a string variable with a "." separator so paypal knows what's up (I made the code and if anybody asks for it I'm willing to put it on here for everybody to see)

 

 

Do you know how to put the smartbutton on the product page and the last page of the checkout page where you put in your card information(not on the add to cart page as you have shown above) 

Putting the smart buttons on the final page of the checkout page is not that big of a problem. The biggest problem is linking the information a customer puts in your store with the smart buttons. Paypal remodeled their own javascript SDK language for this and it could take a bit more work and expertise that I do not currently posses. This wouldn't fix the problem though, as shopify wouldn't know if the customer payed for the product or not because the payment goes through paypal.

 

The reason why I'm answering these questions is to give insight into the topic of what I currently know. The best way, in my opinion, of fixing this is to have api-s or webhooks which would connect the two platforms and make them exchange information when one or the other gets some. I'm currently looking into this and do not posses the knowledge to share completely so if anybody (who knows more) wants to share, feel free! Plus it would be a good idea to look further into this, as shopify feeds the facebook pixel with information which it uses for it's ads and if it does not receive information it could mess up the learning phase of the platform. Google ads could be another option, but I didn't look further into them.

 

If anybody has anything valuable to share on this topic, feel free!

 

Edit: Shopify seems to be deleting my posts regarding this everytime I post

Erni
Visitor
1 0 0

Hey Matt,

Have you managed to get any progress on these buttons? I've been struggling for a while now not able to add them, and there seems to be no help online when it comes to integrating these buttons to Shopify. 
I'd love to hear if you came up with any solutions! Thank you for your contribution so far, I appreciate it!

MattPr
Excursionist
13 1 6

Hey Erni,

 

I've been really busy in the past few days preparing my exams so I didn't have much time to work on the buttons. As soon as they're finished I'll get back to it and reply to this thread if I find anything interesting and or find the solution!

 

Mike321
Visitor
2 0 0

Hi Matt, thanks for sharing all of this, I am trying to figure out the same thing, did you find anything new about this?

chj6
Tourist
5 0 3
Simply, not yet. Unless done manual like mentioned above but I just had my
friend who codes take a look at the smart button to see if he can integrate
it with my shopify store to trigger the order once the payment has been
made but he said it would be too much work. Seems like we just have to wait
jonh1
Tourist
4 0 4

do you know how to add the smart paypal button to the product page ?

 

thanks

Yaserm
Visitor
1 0 1

But how does shopify get notified when a payment is made 

coyaka
Visitor
1 0 0

Hi, bro.

I've added the Paypal smart button. Just want to know if the 'initiate checkout' & 'purchase' event can be tracked by the Facebook pixel? Thank you

Delilah8
Visitor
1 0 0

How shoud you comment out the code that functioned as your normal check out button

alaaghourani
Visitor
1 0 0

hello, can I please know what goes in value ? should I change it from 0.01 ?

   amount: {
                            value: '0.01'
                        }
MRamzan
Shopify Partner
392 3 36

So easy, follow this video: https://youtu.be/2Cs4qfMx9J8

Hire Me:

WhatsApp: +91-9145985880
Email: mohdramzaan112@gmail.com
Skype: mohdramzaan112
RUFA
Tourist
3 0 1

I have the Dawn theme and can. not figure out where to paste this code, could you please help me?

 

Waqaram
Visitor
1 0 0

Hey Rufa, did you find out the solution?

 

SimoFr
Visitor
1 0 0

bro if i do that if someone checkout will i see this on my shopify dashboard or not because i think it will not show in the dashboard

Bodiedbybella
Not applicable
1 0 0

Are you able to help me . My cart liquid page looks different on those lines , I need to add the PayPal smart button as well. 

amolrand
Excursionist
34 0 4

can i get the code please ? 

 

KHALIDFG
Visitor
1 0 0

i can help u this is my Gmail ''khalidyou770@gmail.com''

Ecom_guru
Visitor
3 0 0
First of all login to your PayPal and copy the code then open your Shopify account go to theme then paste..

If you need more info you can contact me on my mail
superneil781@gmail.com
Bonfire1
Visitor
2 0 0

Neil - just emailed you. Can you help me?

Ecom_guru
Visitor
3 0 0
Ok I can help you
MRamzan
Shopify Partner
392 3 36
Watch this https://youtu.be/qET9mzn830U
Hire Me:

WhatsApp: +91-9145985880
Email: mohdramzaan112@gmail.com
Skype: mohdramzaan112
Bonfire1
Visitor
2 0 0
If someone clicks on the paypal credit/debit card buttons, will this order be registered by Shopify?
wipada
Visitor
1 0 1

Hello mohdramzaan112

Could you please help me integrate the PayPal button on my Shopify store?

The button is already display but it doesn't work I don't know why.

Can I add you on WhatsApp as well? 

 

Thank u very much

taskallwebsolut
Shopify Partner
7 0 0

you can add the smart Paypal buttons everywhere in Shopify. but you don't have permission to add the buttons on the checkout page.

Thanks

Click Here to Hire Shopify Store Customization Experts
MRSTUDIO09
Visitor
1 0 0

Hi @Julie , 

 

I am trying to integrate paypal to shopify since last 3 days, However when I clink on activate Paypal it takes me to paypal dashboard.

I already have a business account, I tired many work arounds none of them really worked for me. I see many others are also facing similar issue on paypal community chat.

 

It would be great if Shopify and Paypal would work together to fix this.

 

Store: www..pawfectionsalon.com

Regards,

PawfectionSalon

Julie
Shopify Staff
1109 106 375

Hey, @MRSTUDIO09!

Before we hop into some troubleshooting steps, have you had a chance to review our help doc on how to set up your PayPal account with Shopify? When you first create a Shopify store, a PayPal account is automatically created for you using the same email address that you used when you signed up with Shopify. This help doc will walk you through the process of ensuring that the correct PayPal Business account is connected. 

Since you already have a PayPal Business account, then you'll just need to deactivate PayPal in Shopify, then reactivate it using the email address associated with your Business account. This is done by heading to Settings > Payments and selecting Deactivate within the PayPal section, where you'll then see a Reactivate once you've disconnected your account.

When you reactivate your account, you'll be prompted to login to PayPal to complete the activation and grant Shopify permissions. It's worth noting that if you've used another PayPal account recently, the email for that account might already be filled in, so you'll just need to make sure you're using the email for the account you want to connect to your store.

Because you're being immediately directed to your PayPal account, it sounds like you're already logged in. Is this the dashboard associated with your PayPal Business account, or a different PayPal account? 

If it's the incorrect account, then I would recommend opening up your PayPal dashboard in a different browser window and completely logging out before trying to connect within Shopify again. It would also be worth trying the setup steps again using Google Chrome's Incognito mode (File > New Incognito Window), or a different browser altogether. If all else fails, do you have another device you can try this on? For example, if you're currently using a computer, you could try again using your mobile device.

Following these steps should do the trick, but please respond here and let me know if you are still having difficulties connecting your PayPal account!

Julie | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Distro
Tourist
3 0 0

Hello Julie, If I do this process will I then see all the buttons (including debit credit card button) added to the paypal checkout section?

Rae
Shopify Staff (Retired)
1166 95 366

Hi, @Distro

This is Rae from Shopify. I'm helping my colleague Julie out with this thread today. 

Are you referring to adding dynamic checkout buttons? If so, this feature allows customers to skip the cart page, and quickly buy the product they're viewing by clicking the dynamic checkout button on the product page. This feature is compatible with PayPal, and you can learn more about it in our help document here

Have you already enabled PayPal on your site by following these steps

Please keep me posted on this! 

To learn more visit the Shopify Help Center or the Community Blog.

SURGERITE
Visitor
1 0 0
Copy the following code and paste between<head>...</head>on your page.
 
 
Copy the following code and paste between<body>...</body>on your page anywhere you'd like your messages to appear. We recommend placing them near the price of your products or cart amount.
<!--
    In your code, update data-pp-amount
    with the price or cart amount. For
    example, data-pp-amount="89.99" for
    a $89.99 product.
-->
<div
    data-pp-message
    data-pp-style-layout="text"
    data-pp-style-device="message"
    data-pp-style-logo-type="inline"
    data-pp-style-text-color="black"
    data-pp-amount="ENTER_VALUE_HERE">
</div>