Page 1 of 1

Removing PayPal Button from the Braintree PayPal Checkout in OC3

Posted: Wed Jul 11, 2018 9:10 pm
by lukeketchum1
Hi guys

I would like to remove the PayPal button from the braintree debit/credit card payment section of quick checkout.

I am using the braintree paypal setup that comes with the OpenCart core, and I am using open cart 3.

I have attached a pic, for easier reference
Image

The reason I want to remove this is because I have named this payment method Credit / Debit cards, and I have a seperate option for PayPal which works, as do the credit/debit cards. What doesn't work funilly enough is the paypal button I'm trying to remove!

If someone could tell me how to do this would be great, I grow ever closer to a working setup :)

Re: Removing PayPal Button from the Braintree PayPal Checkout in OC3

Posted: Wed Jul 11, 2018 10:18 pm
by straightlight
From the default theme-view, it would be in your catalog/view/theme/<your_theme>/template/extension/payment/pp_braintree.twig file:
{% for vaulted_payment_method in vaulted_payment_methods.paypal %}
<div class="row" id="vaulted-method-{{ vaulted_payment_method.token }}">
<div class="col-sm-1"><input type="radio" name="vaulted_payment_method" class="pull-right" value="{{ vaulted_payment_method.token }}"/></div>
<div class="col-sm-1"><img class="card-logo" src="{{ vaulted_payment_method.image }}" /></div>
<div class="col-sm-10">{{ vaulted_payment_method.name }}<br />[<a id="{{ vaulted_payment_method.token }}" class="remove-vault-method braintree-button">{{ text_remove }}</a>]</div>
</div>
<hr />
{% endfor %}
If using a custom theme, look for similar codes in that file.

Re: Removing PayPal Button from the Braintree PayPal Checkout in OC3

Posted: Thu Jul 12, 2018 8:30 pm
by lukeketchum1
Thanks for your help as always. I removed this from the default theme, but because I use the Journal 2 Theme I have lodged it with their support ref where to find it in their setup.

Re: Removing PayPal Button from the Braintree PayPal Checkout in OC3

Posted: Fri Jul 13, 2018 9:54 pm
by lukeketchum1
Journal 2 guys reckon this should be pulling from a normal opencart file, and isn't anything to do with their theme. Yet I have removed all the codes you said from pp_braintree.twig and the button still comes up! :-/

Re: Removing PayPal Button from the Braintree PayPal Checkout in OC3

Posted: Fri Jul 13, 2018 11:22 pm
by straightlight
lukeketchum1 wrote:
Fri Jul 13, 2018 9:54 pm
Journal 2 guys reckon this should be pulling from a normal opencart file, and isn't anything to do with their theme. Yet I have removed all the codes you said from pp_braintree.twig and the button still comes up! :-/
Ensure to apply these steps afterwards: viewtopic.php?f=176&p=728050#p718325

Re: Removing PayPal Button from the Braintree PayPal Checkout in OC3

Posted: Sat Jul 14, 2018 1:55 am
by lukeketchum1
I had cleared the journal cache, and the modification cache, but admittedly not the main OC Core dashboard ones. I have since cleared these but unfortunately that infernal button is still there. I removed only "<img class="card-logo" src="{{ vaulted_payment_method.image }}" />" line. I left everything that was around it - I since noticed some other paypal related fieldset, and removed that info too and now its gone! Now I'm one horizontal line away from solving this particular problem :-D Thank you young hero.