Skip to content

Troubleshooting

lat9 edited this page Feb 23, 2024 · 1 revision

One-Page Checkout relies heavily on your store to load a single version of jQuery for its use during the checkout processing. If your store uses plugin payment-, shipping- or order-total-modules, you'll need to validate the OPC to make sure that your store is capable of supporting its processing. That's why the OPC's initial installation sets the plugin's configuration as Disabled, to give a store-owner the opportunity to make sure that his/her store's environment is compatible with the one-page checkout process.

OPC's jQuery handling makes use of a browser's "Console" to identify its progress throughout the checkout process. On most up-to-date browsers, you can view the browser's console by pressing the F12 key and then clicking on the "Console" tab that is shown (usually at the bottom of the viewed page).

Some required elements on this page are missing

If you receive a javascript alert reading Please contact the store owner; some required elements of this page are missing., then your template-override version of /includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_one_default.php is missing one or more of the HTML id elements that OPC requires for its proper operation.

Follow the instructions above to view the browser's console-log; the missing elements are identified there. You'll need to compare your template-override version of the file with the version present in the /includes/templates/template_default/templates directory, adding those required elements back!

Check for jQuery Errors

It's important that there are no jQuery errors reported within the browser-console as those can lead to a variety of symptoms:

  1. The checkout_one page shows the message "Sorry, but our expedited checkout process cannot be used. Click here to use our alternate checkout process.", where the link presented is back to the multi-page-checkout process.
  2. The above message is not displayed, but the Review or Confirm buttons are inoperative upon click. Note that this symptom is usually associated with multiple jQuery versions being loaded by your store's template and/or plugins.

Template-specific "jscript_framework.php" is Required

After installation of OPC, you might receive an admin error-message: The One-Page Checkout plugin has been disabled.. That message identifies that the file DIR_FS_INCLUDES/templates/YOUR_TEMPLATE/jscript/jscript_framework.php is required for the plugin's proper operation (where DIR_FS_INCLUDES identifies your store's file-system's /includes sub-directory and YOUR_TEMPLATE identifies your store's active template name).

You'll need to create that file in your store's active template's jscript sub-directory, containing:

<?php
/**
 * Include AJAX Framework for non-template_default templates **only**!
 *
 * @package templateSystem
 * @copyright Copyright 2003-2017 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: Author: zcwilt  lat9 Modified in v1.5.6 $
 */
require DIR_WS_TEMPLATES . 'template_default/jscript/jscript_framework.php';

Clone this wiki locally