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

    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,395
    Plugin Contributions
    61

    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
    763
    Plugin Contributions
    4

    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 - how to remove the button?
    By tparvaiz in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 18 Jul 2011, 11:13 PM
  3. No Paypal Express Checkout Button
    By justinhunt in forum PayPal Express Checkout support
    Replies: 1
    Last Post: 19 Dec 2008, 03:14 PM
  4. checkout button & paypal express
    By w2e in forum Basic Configuration
    Replies: 3
    Last Post: 21 Oct 2007, 01:04 PM
  5. Paypal Express checkout don't show button after installing Google Checkout
    By jgarabot in forum PayPal Express Checkout support
    Replies: 9
    Last Post: 2 Apr 2007, 07:59 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
  •