Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,547
    Plugin Contributions
    81

    Default [Done v1.5.0] PayPal Express Checkout Button does not display

    In the configuration you have the option to disable showing the PayPal Express Checkout button from displaying.

    Turning this to false will cause the button to not display on the shopping cart. However, on the login page it will still show the other text and tell the user to click the button below, which of course is not there at all.

    The problem is in includes/modules/login/header_php.php this is no check for whether the button is enabled or not, only the following code:
    PHP Code:
    // Check for PayPal express checkout button suitability:
    $paypalec_enabled = (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True');
    // Check for express checkout button suitability:
    $ec_button_enabled = ($paypalec_enabled && ($_SESSION['cart']->count_contents() > && $_SESSION['cart']->total 0)); 
    But in includes/modules/payment/paypal/tpl_ec_button.php you have:

    PHP Code:
    $paypalec_enabled = (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True');
    $ecs_off = (defined('MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON') && MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON == 'Off');
    if (
    $ecs_off$paypalec_enabled FALSE
    By this point the other text has already been added to the document so this check for...
    PHP Code:
    (defined('MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON') && MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON == 'Off'
    ...needs to be in the header_php.php file like this:

    PHP Code:
    $ec_button_enabled = ($paypalec_enabled && (defined('MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON') && MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON == 'Off') && ($_SESSION['cart']->count_contents() > && $_SESSION['cart']->total 0)); 
    Then those redundant conditions inside tpl_ec_button.php can be removed and only used when loading from the shopping_cart page.

  2. #2
    Join Date
    Apr 2007
    Location
    Vancouver, Canada
    Posts
    1,547
    Plugin Contributions
    81

    Default Re: PayPal Express Checkout Button does not display

    NEVERMIND, I see this is fixed in v1.5, good job.

  3. #3
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: [Done v1.5.0] PayPal Express Checkout Button does not display

    Hi Numinix

    I tried to get the above to work on 139h but am uncertain about the outcome.

    I gather from your instructions that line 153 of includes/modules/pages/login/header_php.php needs to be replaced with:

    Code:
    $ec_button_enabled = ($paypalec_enabled && (defined('MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON') && MODULE_PAYMENT_PAYPALWPP_ECS_BUTTON == 'Off') && ($_SESSION['cart']->count_contents() > 0 && $_SESSION['cart']->total > 0));
    In so doing, the text component of the button no longer appears in the login page, with or without products in cart, or any other page from my reckoning, but on the shopping_cart page a text link (because my site has not yet gone live) to PPEC remains under the checkout button. Is this right?

    Then those redundant conditions inside tpl_ec_button.php can be removed and only used when loading from the shopping_cart page.
    However I am not at all certain about this quote. Is this just a statement of what your fix will do or does some other code need to be removed?

    Thanks

 

 

Similar Threads

  1. Cart not showing on paypal express Check after click on express checkout button
    By magic.solve in forum PayPal Express Checkout support
    Replies: 5
    Last Post: 2 Aug 2011, 06:58 PM
  2. Paypal Express Checkout Button Not Showing
    By sports guy in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 4 Mar 2011, 05:29 PM
  3. Replies: 32
    Last Post: 2 Oct 2010, 10:23 PM
  4. PayPal Express Checkout: Admin sees order but Paypal does not
    By MeltDown in forum PayPal Express Checkout support
    Replies: 12
    Last Post: 8 Mar 2009, 11:50 PM
  5. Paypal express button does not appear
    By toritaiyo in forum PayPal Express Checkout support
    Replies: 1
    Last Post: 17 Nov 2007, 01:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR