1

I am trying to change the PayPal logo that appears on the checkout page, just before the customer is forwarded to PayPal to make a payment. Here is a screenshot:

enter image description here

I looked everywhere and tried to change the file below:

./vendor/magento/module-paypal/view/frontend/templates/payment/mark.phtml

Still no joy. Any help or guidance will be appreciated!

0

Create the file in the path:

app/design/frontend/[vendor_folder]/[theme_folder]/Magento_Paypal/web/template/payment

The file

<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<div class="payment-method" css="_active: getCode() == isChecked()" afterRender="initListeners">
    <div class="payment-method-title field choice">
        <input type="radio"
               name="payment[method]"
               class="radio testing"
               attr="id: getCode()"
               ko-value="getCode()"
               ko-checked="isChecked"
               click="selectPaymentMethod"
               visible="isRadioButtonVisible()"/>
        <label attr="for: getCode()" class="label">
            <!-- PayPal Logo-->
            <!-- Here to change log-->
            <img attr="src: getPaymentAcceptanceMarkSrc(), alt: $t('Acceptance Mark')" class="payment-icon"/>
            <!-- PayPal Logo -->
            <span text="getTitle()"/>
            <a class="action action-help"
               attr="href: getPaymentAcceptanceMarkHref()"
               click="showAcceptanceWindow"
               translate="'What is PayPal?'"/>
        </label>
    </div>
    <div class="payment-method-content">
        <each args="getRegion('messages')" render=""/>
        <div class="checkout-agreements-block">
            <each args="$parent.getRegion('before-place-order')" render=""/>
        </div>
        <div class="actions-toolbar" attr="id: getButtonId()" afterRender="renderPayPalButtons"/>
    </div>
</div>

Finally run the following command

php bin/magento setup:static-content:deploy -f
php bin/magento c:f
| improve this answer | |
0

Please change in below file

/vendor/magento/module-paypal/view/frontend/web/template/payment/paypal-express-in-context.html

After change below file please run below

php bin/magento setup:static-content:deploy
| improve this answer | |
  • Not a good idea to edit core files, extend it in your theme instead. – themanwhoknowstheman Jul 5 '18 at 16:45
0

First you will need to locate where the image is coming from. Location:

vendor/magento/module-paypal/view/frontend/web/template/payment/paypal-express-in-context.html

Create this file in your theme to over-ride core Magento functionality:

app/design/frontend/[vendor_folder]/[theme_folder]/Magento_Paypal/web/template/payment/paypal-express-in-context.html

On (or around about) line 19, replace the img src with the src of the new image. Since this is a html file (not a phtml file), you won't be able to use php within this file so any reference to

Flush the magento cache(s): php bin/magento c:f

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.