FROM CACHE - en_header

I want to add Paypal smart payment buttons

Solved
Anonymous
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)

Accepted Solutions
MattPr
Tourist
11 1 5

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 47 (47)
Julie
Shopify Staff
Shopify Staff
1109 106 330

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
New Member
1 0 8

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
New Member
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
Ecom_guru
New Member
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
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
Tourist
11 1 5

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
New Member
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
Tourist
11 1 5

Hey Hisham,

 

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

chj6
Tourist
5 0 2

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! 

 

 

Ghayath
New Member
1 0 0

Hi. I couldn't find it too.

MattPr
Tourist
11 1 5

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
Tourist
11 1 5

@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
Tourist
11 1 5

@Ghayath 

 

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

MattPr
Tourist
11 1 5

 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