Skip to content

HTML Selectors used by OPC's jQuery

lat9 edited this page Feb 22, 2024 · 1 revision

Much of One-Page Checkout's processing is performed by its jQuery script (jquery.checkout_one.js). This document identifies the HTML selectors used by that jQuery handler.

Note: The Source column contains the name of the template file that creates the HTML containing the associated Selector. For brevity, if the source's name begins with opc_*, the associated source-file name is actually tpl_modules_opc_*.php.

Selector Usage Source
#checkoutPaymentNoJs Identifies the container — outside of the #checkoutPayment block — that is displayed if a jQuery-related error is detected, overriding the main data-gathering display. tpl_checkout_one_default.php
#checkoutPayment Identifies the overall container block for the checkout_one page's form. tpl_checkout_one_default.php
form[name="checkout_payment"] The name of the primary checkout form on the checkout_one page. tpl_checkout_one_default.php
.opc-overlay Identifies the container, present as a direct child of the #checkoutPayment block, that is used to provide an overlay of input areas not used for the current action. For example, when the Customer Information block is active, the other areas of the form are faded. tpl_checkout_one_default.php
     
#checkoutOneGuestInfo Identifies the block that contains the form elements associated with the guest-related information. opc_customer_info.php
#opc-guest-cancel Identifies the Cancel button associated with a guest-information change. opc_customer_info.php
#opc-guest-save Identifies the Save button associated with a guest-information change. opc_customer_info.php
     
#checkoutOneBillto Identifies the container block that holds the order's billing address. opc_billing_address.php
#opc-bill-cancel Identifies the Cancel button associated with a billing-address change. opc_billing_address.php
#opc-bill-save Identifies the Save button associated with a billing-address change. opc_billing_address.php
#opc-add-bill Identifies the Add to Address Book checkbox within the billing-address block. opc_billing_address.php
#select-address-bill Identifies the existing-address drop-down, present in the billing-address block for logged-in customers. opc_billing_address.php, opc_address_block.php
     
#shipping_billing Identifies the checkbox field that indicates whether or not the order is shipping to the specified billing address. opc_shipping_address.php
#checkoutOneShipto Identifies the container block that holds the order's shipping address. Required if the order is not virtual. opc_shipping_address.php
#opc-ship-cancel Identifies the Cancel button associated with a shipping-address change. opc_shipping_address.php
#opc-ship-save Identifies the Save button associated with a shipping-address change. opc_shipping_address.php
#opc-add-ship Identifies the Add to Address Book checkbox within the shipping-address block. opc_shipping_address.php
#select-address-ship Identifies the existing-address drop-down, present in the shipping-address block for logged-in customers. opc_shipping_address.php, opc_address_block.php
     
#checkoutShippingMethod Identifies the overall container that holds the order's shipping selections. opc_shipping_choices.php
#checkoutShippingChoices Identifies the container that holds the order's current shipping choices. opc_shipping_choices.php
#checkoutShippingContentChoose Identifies the container that holds the instructions associated with the order's current shipping choices. opc_shipping_choices.php
input[name=shipping] Identifies the collection of radio-button inputs used to choose the order's shipping method. checkout_one_shipping.php
     
#orderTotalDivs Identifies the wrapper element for the order-totals' section. opc_shopping_cart.php
#ottotal1 Identifies the order's current total value on entry to the page. tpl_modules_order_totals.php
#otshipping Identifies the order's shipping cost element; required if the order is not virtual. tpl_modules_order_totals.php
     
#current-order-total Set to contain the order's current total value prior to submit, possibly updated from the initial value (#ottotal) based on a change in shipping-method selection. opc_submit_block.php
#opc-order-review Identifies the Review button on the checkout_one page. opc_submit_block.php
#opc-order-confirm Identifies the Confirm button on the checkout_one page. opc_submit_block.php
#confirm-the-order Identifies the hidden field that is set to indicate whether (1) or not (0) the order is being confirmed, as opposed to being submitted to record a credit-class order-total's (e.g. ot_coupon) variables. opc_submit_block.php
     
.opc-buttons Identifies the button-container for the guest-information, billing-address and shipping-address blocks. opc_customer_info.php, opc_billing_address.php, opc_shipping_address.php

1 Starting with OPC v2.3.0, the #ottotal selector is replaced by a configurable selector to enable interoperation with more templates!

Clone this wiki locally