Skip to content

Storefront Considerations

lat9 edited this page Feb 24, 2024 · 13 revisions

When you've enabled One-Page Checkout, the customer will see a single-page similar to the images shown here; the actual layout will depend on the template that is currently active for your store and the OPC options that you have enabled. The customer uses the form to apply any coupon (or gift-certificate) codes, choose their shipping and payment methods and then clicks that "Confirm Order" button … which takes them to a transitional confirmation page and subsequently to the checkout_success page. If they've chosen a payment method that accepts credit-cards onsite, then an additional confirmation page is displayed from which the customer re-confirms their order.

Notes:

  1. This page uses jQuery to handle the submittal of the checkout-related form. If the customer has disabled javascript in their browser or if there's a jQuery-related error on the page, the customer is unable to checkout via OPC. In this case, the plugin displays a message to the customer with a link to the multi-page checkout handling so that they can still checkout.
  2. This page's display depends heavily on the mode that a customer uses to perform their checkout.

OPC-GC/RA does not create customers database records for its processing; address- and contact-information for a guest-placed order is recorded only in that order. Instead, its admin-initialization script creates "dummy" records that identify a guest-customer (in the customers and customers_info tables) as well as "dummy" records that identify a temporary billing- and shipping-address (in the address_book table).

Note: Order-confirmation emails sent to guest-customers whose email address is not registered with your store will be sent in TEXT format.

Unlike its predecessors, there is no no_account page provided for OPC-GC. Instead, an alternate template-display for the store's login page begins the guest's checkout and the guest-customer's contact information is gathered as a first step in the OPC checkout process. OPC-GC/RA modifies the flow of that and other pages within the store when its features are enabled:

Page Name Modifications
address_book Recognizes when a customer-account does not yet have a defined primary address (i.e. the customer has registered for an account).
checkout_one Updated to gather guest-customer contact information and provide full support for the plugin's temporary billing- and shipping-addresses.
checkout_success Recognizes when an order has been placed by a guest. The guest has the opportunity to "convert" to a fully-registered account by supplying an account password.
create_account Displays a modified form for entry, requiring only the non-address-related elements for the customer.
create_account_success Displays a modified version of the page when the just-created account is for a registered-account only.
login Displays an alternate form of the page when either the OPC's guest-checkout or registered-accounts processing is enabled.

Like its predecessors, OPC-GC/RA provides an order_status page that enables a not-logged-in customer to check the status of their order.

Implementation Notes

OPC's storefront guest-checkout and registered-accounts handling is controlled by three class modules:

  1. /includes/classes/OnePageCheckout.php
  2. /includes/classes/ajax/zcAjaxOnePageCheckout.php
  3. /includes/classes/observers/class.checkout_one_observer.php

The main class-file is session-based — instantiated as $_SESSION['opc'] — so that it can remember a customer from login through checkout; its observer-class loads fresh on each page-load. This allows the observer-class to act as a conductor, instructing the session-based processing what to do next based on current customer action; it also acts to "refresh" the session-based settings, just in case an admin configuration occurred during the customer's session. The ajax class handles the checkout_one page's AJAX updated.

Clone this wiki locally