Page 1 of 2 12 LastLast
Results 1 to 10 of 3052

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by lat9 View Post
    OK, I've had a chance to look into this a bit more. It turns out that there is also an issue with OPC and payeezyjszc during PayPal Express Checkout (i.e. like the customer can't complete their PP-ec purchase due to a jQuery issue).

    The issue with OPC (and possibly the 3-page-checkout mode as well) is that all enabled payment methods are being loaded when the current order is being paid with PayPal-ec and some of those methods' javascript/jQuery scripts are getting confused since their payment-selections aren't rendered during "special checkout".

    It might take me a couple of days, but I've at least got a direction to look!
    The issue with the integration of PayPal Express Checkout, One-Page Checkout and payment methods that use a separate checkout_payment page jscript module is as follows.

    Requirements to "expose" the issue:
    The site has enabled the PayPal Express Checkout (and its shortcut button) and either Square or Payeezyjs in addition to One-Page Checkout.
    A new customer chooses to pay via the PP-EC shortcut button and the email address associated with the customer's PayPal account is not associated with a customer on the site.

    The problem:
    The jscript processing associated with those payment methods (and possibly others) currently loads so long as the associated payment-method is enabled in the admin. When the customer makes a purchase using the PP-ec Shortcut button, the payment-gathering page is rendered only with the PayPal-related form elements. Unfortunately, the jscript for these payment methods assumes that its form-elements have been rendered if the jscript is loaded. When that jscript attempts to verify settings of an unrendered HTML element, a javascript error is raised; that error subsequently results in the One-Page Checkout's "Confirm Order" button failing to activate.

    The solution:
    Unfortunately, this change requires updates to both the One-Page Checkout and the payment-methods' processing.

    First, the OPC's entry-page processing will check to see if the customer is currently in "special checkout" (a.k.a. checkout using the PP-ec shortcut) and, if so, "resets" the payment methods to activate only the special-checkout payment method. Note that this is a chicken/egg situation, since for OPC to determine whether or not the customer is in "special checkout", all currently-enabled payment methods must be loaded.

    When OPC sees that the customer is in "special checkout", OPC reloads the payment methods to specify that the active payment-method is the "special checkout" one. This does not remove the object-instances associated with the other enabled payment methods, but does ensure that only the active payment-method will be called for subsequent payment actions.

    Secondly, each payment-method that has a separate jscript_*.php module requires update to that module's loading to ensure that the associated javascript is only loaded when the customer is not in "special checkout".

    The changes:
    The file /includes/modules/pages/checkout_one/header_php.php:
    Code:
    // load all enabled payment modules
    require DIR_WS_CLASSES . 'payment.php';
    $payment_modules = new payment;
    
    // -----
    // Check to see if we're in "special checkout", i.e. the payment's being made via the PayPal Express
    // Checkout's "shortcut" button.  If so, "reset" the payment modules to include **only** the payment
    // method presumed to be recorded in the current customer's session.
    //
    if ($payment_modules->in_special_checkout()) {
        unset($payment_modules);
        $payment_modules = new payment($_SESSION['payment']);
    }
    $payment_selections = $payment_modules->selection();
    $flagOnSubmit = count($payment_selections);
    This change is available on the OPC plugin's GitHub repository.

    The jscript_square.php module, distributed as part of the Square payment-method:
    Code:
    if ($payment_modules->in_special_checkout() || !defined(MODULE_PAYMENT_SQUARE_STATUS) || MODULE_PAYMENT_SQUARE_STATUS != 'True' || (!defined('MODULE_PAYMENT_SQUARE_APPLICATION_ID') || MODULE_PAYMENT_SQUARE_ACCESS_TOKEN == '')) {
        return false;
    }
    The jscript_payeezy.php module, distributed as part of the PayeezyJsZc payment-method:
    Code:
    if ($payment_modules->in_special_checkout() || !defined(MODULE_PAYMENT_PAYEEZYJSZC_STATUS) || MODULE_PAYMENT_PAYEEZYJSZC_STATUS != 'True' || (!defined('MODULE_PAYMENT_PAYEEZYJSZC_JSSECURITY_KEY') && !defined('MODULE_PAYMENT_PAYEEZYJSZC_JSSECURITY_KEY_SANDBOX') )) {
        return false;
    }
    I'll be cross-posting a link to this post to the Square and PayeezyJsZc payment methods' support threads.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: One-Page Checkout [Support Thread]

    Shouldn't the modification to the other payment methods depend on the use of this plugin instead of always returning false if in special_checkout?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by mc12345678 View Post
    Shouldn't the modification to the other payment methods depend on the use of this plugin instead of always returning false if in special_checkout?
    Nope, the issue with Square and PayeezyJs also rears its head during the 3-page checkout, with an error message displayed.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    I've just submitted v1.4.2 of the One-Page Checkout to the Zen Cart plugins for review. Once reviewed and made available, the update can be downloaded from here.

    That version contains the changes (both to the OPC's code and readme) associated with changes required for proper integration of the PayPal Express Checkout's shortcut button. Please refer to post#90 (above) of this support-thread for additional information.

    I'll post back here once the download is available.

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Version 1.4.2 of One-Page Checkout is now available for download from the Zen Cart plugins section.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    I've just submitted v1.5.0 of One-Page Checkout to the Zen Cart plugins' area for review; I'll post back here when it's available for download.

    This version contains the changes associated with the following GitHub issues:

    #104: Defer installation until admin login.
    #105: Split template blocks into separate files for easier re-arrangement
    #106: Move jQuery processing to separately-loaded .js file, with minified version.

    It's a major move forward in OPC's release, making it easier to customize since each of the major template "blocks" (e.g. payment-address, shopping-cart) are moved to a separate file. That way, you can move the blocks around more easily by simply updating your template's version of tpl_checkout_one_default.php.

    In addition, the main page's jQuery processing has been split into a constant-setting file that then loads the actual jQuery processing (full-size or minified, based on an admin configuration setting). This allows (a) the ever-growing script file to be minimized and (b) for that file to be loaded after the page has been rendered by the browser ... both page-level load-time improvements.

  7. #7
    Join Date
    Jan 2018
    Posts
    165
    Plugin Contributions
    4

    Default Re: One-Page Checkout [Support Thread]

    If I have plugin reward points, I have to add this to one page checkout correct? like it's done for ot_coupon module? Thanks

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by lat9 View Post
    I've just submitted v1.5.0 of One-Page Checkout to the Zen Cart plugins' area for review; I'll post back here when it's available for download.

    This version contains the changes associated with the following GitHub issues:

    #104: Defer installation until admin login.
    #105: Split template blocks into separate files for easier re-arrangement
    #106: Move jQuery processing to separately-loaded .js file, with minified version.

    It's a major move forward in OPC's release, making it easier to customize since each of the major template "blocks" (e.g. payment-address, shopping-cart) are moved to a separate file. That way, you can move the blocks around more easily by simply updating your template's version of tpl_checkout_one_default.php.

    In addition, the main page's jQuery processing has been split into a constant-setting file that then loads the actual jQuery processing (full-size or minified, based on an admin configuration setting). This allows (a) the ever-growing script file to be minimized and (b) for that file to be loaded after the page has been rendered by the browser ... both page-level load-time improvements.
    v1.5.0 is now available for download from the Zen Cart plugins: https://www.zen-cart.com/downloads.php?do=file&id=2095

  9. #9
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: One-Page Checkout [Support Thread]

    Maybe I should stick to templates

    Fresh install from both GIT and ZC plugins. Can't confirm order, keep getting:

    HTML Code:
    Your order's details have changed. Please review the current values and re-submit.

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: One-Page Checkout [Support Thread]

    Quote Originally Posted by rbarbour View Post
    Maybe I should stick to templates

    Fresh install from both GIT and ZC plugins. Can't confirm order, keep getting:

    HTML Code:
    Your order's details have changed. Please review the current values and re-submit.
    I'm guessing that you're using the ZCA Bootstrap Template ... did you create the (required) template-override file for the tpl_modules_opc_shopping_cart.php file?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Set number of products displayed per page (support thread)
    By yellow1912 in forum All Other Contributions/Addons
    Replies: 146
    Last Post: 2 Nov 2023, 12:50 AM
  2. v151 Banners In Main Page - Support Thread
    By stevesh in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Sep 2021, 03:36 PM
  3. v151 Site Map/Page Not Found: Combined [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 4 Jan 2016, 02:19 PM
  4. v151 PayPal Express Checkout Using NVP 84.0 [Support Thread]
    By lat9 in forum Addon Payment Modules
    Replies: 32
    Last Post: 28 Dec 2015, 04:54 PM
  5. Checkout Amazon Style -- Support Thread
    By CJPinder in forum All Other Contributions/Addons
    Replies: 72
    Last Post: 13 Apr 2011, 08:18 PM

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