I want to add Paypal smart payment buttons

Solved
Highlighted
New Member
4 0 0

I'm still looking for that

0 Likes
Highlighted
Tourist
9 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

4 Likes
Highlighted
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 

1 Like
Highlighted
Tourist
9 1 5

Hey Hisham,

 

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

0 Likes
Highlighted
Tourist
5 0 1

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! 

 

 

0 Likes
Highlighted
New Member
1 0 0

Hi. I couldn't find it too.

0 Likes
Highlighted
Tourist
9 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

0 Likes
Highlighted
Tourist
9 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!

 

 

0 Likes
Highlighted
Tourist
9 1 5

@Ghayath 

 

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

0 Likes
Highlighted
Tourist
9 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

0 Likes