Glossary Item Box
Overview
There are several different templates involved in generating your checkout pages, depending on the step you are on during checkout.
Main Checkout Template - checkout.tpl.php
Overview
Every portion of the checkout process has the overall apperance controlled by the checkout.tpl.php template file. This template is used for every checkout step.
Code Explanation
The default code for the checkout.tpl.php template file is as follows:
1: <?php
/* This line prevents direct access to template. Don't remove it. */ if (!defined('SC_INCLUDE_OK')) die; ?>
Line #1:
This ensures that this file is only included by Squirrelcart, and is a security precaution. It appears at the top of all template files.
Line #2:
This line appears in all templates. It outputs an HTML comment to make it easiery to locate the template file by viewing the source code.
Example:
<!-- Template: store_main -->
Line #4:
This surrounds the entire checkout content
Lines #5 - 43:
This section of code outputs the checkout progress steps. The labels for the steps can be controlled on the Visual Settings page in your control panel.
Lines #45 - 48:
Each line outputs a different type of message if one is available. The message.tpl.php template file controls the overall appearance of these messages.
Line #51:
This line outputs HTML that varies based on the step we are on in the checkout process. See the section below for details on templates used for specific checkout steps.
Viewing Cart Templates
checkout_view.tpl.php - controls most of the HTML when viewing your cart
checkout_view_buttons.tpl.php - this template is used to display the buttons used to checkout - Continue Shopping, Empty Cart, Update Cart, and Checkout
checkout_view_buttons_amazon.tpl.php - this is an alternate template used in place of checkout_view_buttons.tpl.php. It is only used when Checkout By Amazon is enabled.
checkout_view_buttons_google.tpl.php - this is an alternate template used in place of checkout_view_buttons.tpl.php. It is only used when Google Checkout is enabled.
Empty Cart Template
checkout_empty_cart.tpl.php - When the customer clicks Empty Cart, this template is used to display the confirmation form.
Account Choice Template
The account choice form may appear during checkout if enabled. This form is used for other operations as well, and is discussed in the Account Choice topic in this section.
Account Form Template
The account form may appear during checkout if your customer chooses to create an account during the checkout process. This form is used for other operations as well, and is discussed in the Account Form topic in this section.
Address Form Template
Overview
The address form is seen when the customer clicks Skip Account on the Account Choice page, OR if they click Edit in one of the address blocks at the top of the Viewing Cart page. The fields shown on the form are controlled by the Address Form Settings page.
Templates
checkout_address_form.tpl.php - controls the entire address form, with the exception of the template listed below
checkout_address_paypal_express.tpl.php - if PayPal Express Checkout (part of PayPal Website Payments Pro) is enabled, this template is used to show the button to checkout via Express Checkout.
Shipping Rate Form Template
checkout_ship.tpl.php - This template controls the shipping rate selection form.
Payment Templates
checkout_pay.tpl.php - this is the main template that controls the payment portion of the checkout process
checkout_pay_cvv2_help.tpl.php - this template controls the page that is shown when you click the "help" link to the right of the Security Code field
checkout_pay_final.tpl.php - some payment gateways require a separate page after the one shown above, to send/confirm payment. This template controls that page.
checkout_pay_order_summary.tpl.php - this template controls the order summary at the top of the payment page
checkout_pay_redirect.tpl.php - for payment systems that require sending the customer to their site for payment, this template controls the page shown while that redirect is occurring
checkout_pay_redirect_iframe.tpl.php - this template is used in conjunction with the one listed directly above
checkout_pay_stratapay*.tpl.php - templates used in conjunction with the Stratapay payment method.
Checkout Done Template
When an order is completed, a thank you page is shown that includes a record of what the customer ordered. The HTML for that section of the checkout is controlled by the checkout_done.tpl.php template file. The "Thanks for your order..." message at the top of the page is controlled by the Thank You Message field on your Visual Settings control panel page.
© 2001-2017 Lighthouse Development. All Rights Reserved.