I am using ZenCart 1.3.7 and I found this thread while searching for a solution to the following problem:
When I was using PayPal express checkout, it was confusing to the customer to see two "proceed to checkout" buttons. Besides this if the customer was not logged into my store, paypal express would send them back to the website to login or create a new account but he major problem is that in the same login screen it has ANOTHER PayPal express checkout button (which would put the customer in an endless loop until they actualy open a new account with my store).
So to bypass all this I decided to figure out how to remove the PayPal express checkout buttons from both the shopping cart page and the account login page (but still have it as a payment option during the checkout process).
You might ask: why dont I just use PayPal IPN which would only show the customer a PayPal option as a form of payment during checkout? Well the answer is that I was having problems with the IPN with duplicate orders and was unable to find a proper resolution to this dilemma (sometimes it would not duplicate orders and other times it would).
So to continue with how to remove the PayPal express checkout buttons from both the shopping cart page and the account login page, here it goes:
PLEASE REMEMBER ALWAYS BACKUP BEFORE MAKING ANY CHANGES TO ANY FILES
- go to "shopping cart" file located at: "/public_html/includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_shopping_cart_default.php "
Now change following code from this:
<!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
<?php // the tpl_ec_button template only displays EC option if cart contents >0 and value >0
if (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True') {
include(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php');
// }
?>
<!-- ** END PAYPAL EXPRESS CHECKOUT ** -->
TO THIS (it simply is commenting out the entire section):
<!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
<?php // the tpl_ec_button template only displays EC option if cart contents >0 and value >0
// if (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True') {
// include(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php');
// }
?>
<!-- ** END PAYPAL EXPRESS CHECKOUT ** -->
- Now find the file for the login found at: "/public_html/includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_login_default.php"
Now change following code from this:
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT ** ?>
<?php if ($ec_button_enabled) { ?>
<div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION_SPLIT; ?></div>
<div class="center"><?php require(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php'); ?></div>
<hr />
<?php echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_DIVIDER; ?>
<?php } ?>
<?php // ** END PAYPAL EXPRESS CHECKOUT ** ?>
TO THIS (it simply is commenting out the entire section):
<?php // ** BEGIN PAYPAL EXPRESS CHECKOUT ** ?>
<?php // if ($ec_button_enabled) { ?>
<div class="information"><?php // echo TEXT_NEW_CUSTOMER_INTRODUCTION_SPLIT; ?></div>
<div class="center"><?php // require(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php'); ?></div>
<!-- <hr /> -->
<?php // echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_DIVIDER; ?>
<?php // } ?>
<?php // ** END PAYPAL EXPRESS CHECKOUT ** ?>
ALL DONE.
There may be an easier way to do this, but I couldn't find it, and this works pefect for what I needed, it takes out the PayPal express checkout button, but leaves in the PayPal express checkout as a payment option during normal customer checkout.