Skip to content

Storefront Considerations

lat9 edited this page Feb 22, 2024 · 13 revisions

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.
download Provides the order-lookup by order-id and email-address, enabling guest customers to download their purchases.
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.

Additional Topics

Customer-Address Management

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