Account Template Files
Account Template Introduction
The following document details the various template files that can be found in the account template directory, detailing specific calls you can make within each template. Both variable setting calls, and data calls listed below can be used in any account template file.
Index template files are located in - Directory: Templates/account
The following files usually make up the account set of templates:-
Account Variable Settings
You can pre-define various settings which determine how data is displayed using the following calls. All calls must be operated within PHP tags as follows:-
<?php $Template->Index->setProductMainFeatureLimit('8'); ?>
Account Data Calls
forgotPassword.template.php
File Sample
<?php /* ########################################################################### *\ ## FORGOTPASSWORD.TEMPLATE.PHP - 02/01/2008 - Copyright RedbeckGroup 2008 # \* ########################################################################## */ ?> <div class="box_header"> <h1><img src="pics/box/icon.gif">Login or Register</h1> </div> <div class="box_right_curve"></div> <div class="box_content"> <div align="center"><span class="red_text"><strong>Please log in to your <?php echo STORE_NAME; ?> account by entering your username, email address and password below.</strong></span></div> </div> <div class="box_products"> <table cellspacing="0" cellpadding="0" id="productList"> <thead> <tr> <th colspan="2">Existing Customer?</th> <th>New Customer?</th> </tr> </thead> <tbody> <tr><td colspan="2" class="clear"> <b>Shopping with us again?</b> Login below to continue your purchase, check your order status or raise a support ticket. </td> <td width="50%" class="clear"> <strong>Shopping with us for the first time?</strong> If you are a new customer, please tell us which type of customer your are: <tr><td colspan="2"> <?php /* /////////////////////////// header END /////////////////////////////////// */ /* DEPARTMENT VIEW WHEN LOGGED IN */ ?> <div class="login"> <form action="forgot_password" method="post" name="login"> <?php echo $Template->Account->getSeedFormField(); ?> <p>Forgotten your password? Please enter the email address that you registered with in the box below. Your password will be emailed to you. <br /><br /></p> <p> <label for="email">Email</label> <input type="text" id="email_address" name="email_address" value="" size="25" maxlength="255" /> </p> <p class="login_submit"> <input class="submit_green" value="Send Password" name="send" type="submit" /> </p> <input type="hidden" name="action" value="do_password" /> </form> </div> </td> <td width="50%" align="center"> <?php echo $Template->Account->getCustomerTypeFields(); ?> </td></tr></tbody> </table> </div> <div class="box_nav">[Forgot Password?]</div> <div class="box_nav"><strong>Safe Shopping:</strong> We take secure shopping seriously and use the latest technologies to ensure this at all times. All transactions are 128bit Secure, and we use industry leading Thawte Security Certificates to prove our identity. </div> <div class="box_footer"> <span> </span> </div>
PHP Calls
$Template->Login->getStoreName()
Returns the static store name definition
$Template->Account->getSeedFormField()
$Template→Account→getSeedFormField() is a form field entry that is added to the top of a form. It prints a hidden field value as a hashed string value which is used as a unique identifier for a form. When creating forms it is advised to add this call to your form. It is used to stop XSS cross browser scripting attacks, only allowing a form to be submitted locally on the hosted URL.
Cross-site scripting (XSS) is a type of computer security vulnerability typically found in web applications which allow code injection by malicious web users into the web pages viewed by other users
Usage:
<form action="forgot_password" method="post" name="login"> <?php echo $Template->Account->getSeedFormField(); ?> <p>Forgotten your password? Please enter the email address that you registered with in the box below. Your password will be emailed to you. <br /><br /></p> <p> <label for="email">Email</label> <input type="text" id="email_address" name="email_address" value="" size="25" maxlength="255" /> </p> <p class="login_submit"> <input class="submit_green" value="Send Password" name="send" type="submit" /> </p> <input type="hidden" name="action" value="do_password" /> </form>
$Template->Account->getCustomerTypeFields()
Returns the account creation option boxes in HTML, sample usage:
</td> <td width="50%" align="center"> <?php echo $Template->Account->getCustomerTypeFields(); ?> </td></tr></tbody>
loginBox.template.php
File Sample
<?php /* ########################################################################### *\ ### LOGINBOX.TEMPLATE.PHP - 28/12/2007 - Copyright RedbeckGroup 2008 ### \* ########################################################################## */ ?> <div class="box_header"> <h1><img src="pics/box/icon.gif">Login or Register</h1> </div> <div class="box_right_curve"></div> <div class="box_content"> <div align="center"><span class="red_text"><strong>Please log in to your <?php echo $Template->Login->getStoreName(); ?> account by entering your username, email address and password below.</strong></span></div> </div> <div class="box_products"> <table cellspacing="0" cellpadding="0" id="productList"> <thead> <tr> <th colspan="2">Existing Customer?</th> <th>New Customer?</th> </tr> </thead> <tbody> <tr> <td colspan="2" class="clear"> <b>Shopping with us again?</b> Login below to continue your purchase, check your order status or raise a support ticket. </td> <td width="50%" class="clear"> <strong>Shopping with us for the first time?</strong> If you are a new customer, please tell us which type of customer your are: </td> </tr> <tr> <td colspan="2"> <div class="login"> <form action="login" method="post" name="login"> <?php echo $Template->Login->getSeedFormField(); ?> <p> <label for="email">Email</label> <input type="text" id="email" name="email" value="" size="25" maxlength="255" /> </p> <p> <label for="password">Password</label> <input type="password" id="password" name="password" size="25" maxlength="32" /> </p> <p class="login_submit"> <input class="submit_green" value="LOGIN" name="login" type="submit" onClick="doChallengeResponse(); return false;" /> </p> <input type="hidden" name="action" value="do_login" /> <input type="hidden" name="ref" value="<?php echo $Template->Login->getHttpReferer(); ?>" /> <p><a href="forgot_password" title="Forgot Password?">Forgot Password?</a></p> </form> </div> </td> <td width="50%" align="center"> <div class="new_customer_b"> <a href="register/business" title="JLT Online Customers"><h1>Online Account / X2tek</h1></a> </div><br><div class="new_customer_h"> <a href="register/all_access" title="All Access Customers"><h1>All Access Account</h1></a> </div><br> </td></tr></tbody> </table> </div> <div class="box_nav"><strong>Safe Shopping:</strong> We take secure shopping seriously and use the latest technologies to ensure this at all times. All transactions are 128bit Secure, and we use industry leading Security Certificates to prove our identity. </div> <div class="box_footer"> <span> </span> </div> <div class="box_wrap"> <div class="box_header"> <h1><img src="pics/box/icon.gif">Information</h1> </div> <div class="box_content"> <div>Account Types Explained</div> </div><div class="box_product_description"> <div class="box_orange_info"> <p><b>Online Account / X2tek</b> - This account type allows you to setup an account with minimal fuss, but only allows you to place orders on the website and signup to our reseller service X2tek. Choose this option if you wish to order online only.<br /><br /></p> <p><b>All Access Account</b> - This account type allows you to order online, signup to X2tek and also order by telephone from a member of our sales team. If you currently hold an account with JLT and have a dedicated account manager, please choose this option.</p> </div> </div><div class="box_footer"> <span> </span> </div> </div>
PHP Calls
As standard, the following calls already mentioned above can also be used within this template.
- $Template→Login→getStoreName()
- $Template→Login→getSeedFormField()
Calls used in this file also include:
$Template->Login->getHttpReferer()
This is used to return the reffering file location, to determine where to send the user once they have completed the login proceedure. It can be used as follows:-
<input type="hidden" name="action" value="do_login" /> <input type="hidden" name="ref" value="<?php echo $Template->Login->getHttpReferer(); ?>" /> <p> <a href="forgot_password" title="Forgot Password?">Forgot Password?</a> </p>
loginError.template.php
This file currently has no information
myaccount.template.php
File Sample
<?php echo $Template->Account->getUserMenu(); ?> <!-- Add custom html here if you wish, such as new menus, additional info, links and text. --> <?php echo $Template->Account->getCustomerDetailsEditForm(); ?>
PHP Calls
$Template->Account->getUserMenu()
This is the call for the User Menu used for any account page. It can be located anywhere on the page, and its styling is controlled by the main css/style.css file. Its css tag is: div#menu_user
$Template->Account->getCustomerDetailsEditForm()
Calls the customer details and displays them as an editable form. Css is styled by the main product list: table#productList
myledger.template.php
File Sample
<?php /* ########################################################################### *\ ### MYLEDGER.TEMPLATE.PHP - 04/01/2008 - Copyright RedbeckGroup 2008 ### \* ########################################################################## */ ?> <?php echo $Template->Account->getUserMenu(); ?> <?php echo $Template->Account->getLedgerTable(); ?>
PHP Calls
$Template->Account->getLedgerTable()
This is the call for the ledger of the logged in user. Css is styled by the main product list: table#productList
myaccount.template.php
File Sample
<?php echo $Template->Account->getUserMenu(); ?> <!-- Add custom html here if you wish, such as new menus, additional info, links and text. --> <?php echo $Template->Account->getCustomerDetailsEditForm(); ?>
PHP Calls
$Template->Account->getUserMenu()
This is the call for the User Menu used for any account page. It can be located anywhere on the page, and its styling is controlled by the main css/style.css file. Its css tag is: div#menu_user
$Template->Account->getCustomerDetailsEditForm()
Calls the customer details and displays them as an editable form. Css is styled by the main product list: table#productList
myOrdersOrder.template.php
File Sample
<?php /* ########################################################################### *\ # MYORDERSORDER.TEMPLATE.PHP - 02/01/2008 - Copyright RedbeckGroup 2008 # \* ########################################################################## */ ?> <?php echo $Template->OrderOutput->getUserMenu(); ?> <?php echo $Template->OrderOutput->getMyOrders(); ?>
PHP Calls
$Template->OrderOutput->getMyOrders()
This is the call for the list of orders for the logged in user. Css is styled by the main product list: table#productList
myOrdersOrderDetail.template.php
File Sample
<?php /* ########################################################################### *\ # MYORDERSORDERDETAIL.TEMPLATE.PHP - 02/01/2008 - (C)RedbeckGroup 2008 # \* ########################################################################## */ ?> <?php echo $Template->OrderOutput->getUserMenu(); ?> <div class="box_header"><h1><img src="pics/box/icon.gif">Customer Details & Order Statistics Order #</h1></div> <div class="box_products"> <?php echo $Template->OrderOutput->getOrderInfo(); ?> </div> <div class="box_footer"><span> </span></div> <?php echo $Template->OrderOutput->getOrderPayment(); ?> <div class="item_heading"><h3>Products</h3></div> <?php echo $Template->OrderOutput->getOrderProducts(); ?> <br /><br /> <!-- Shipping --> <div class="box_header"><h1><img src="pics/box/icon.gif">Shipping</h1></div> <!-- Box_Product --> <div class="box_products"> <?php echo $Template->OrderOutput->getOrderShipping(); ?> </div> <div class="box_footer"><span> </span></div> <!-- Parcels --> <div class="box_header"><h1><img src="pics/box/icon.gif">Parcels</h1></div> <!-- Box_Product --> <div class="box_products"> <?php echo $Template->OrderOutput->getOrderParcels(); ?> </div> <div class="box_footer"><span> </span></div> <!-- Tickets --> <div class="box_header"><h1><img src="pics/box/icon.gif">Tickets for this order</h1></div> <div class="box_products"> <?php echo $Template->OrderOutput->getOrderTickets(); ?> </div> <div class="box_footer"><span> </span></div> <div class="item_heading"><h3>Order Status History</h3></div> <div id="info_box"><?php echo $Template->OrderOutput->getOrderStatusInfo(); ?></div><br /> <?php echo $Template->OrderOutput->getOrderStatusHistory(); ?>
PHP Calls
The following already defined calls can be made within this template :-
- $Template→OrderOutput→getUserMenu()
$Template->OrderOutput->getOrderInfo()
This is the call for the basic details of the order, such as the invoice name and address etc. It is displayed as a block of information.
$Template->OrderOutput->getOrderPayment()
Displays the loaded payment module payment information to the user.
$Template->OrderOutput->getOrderProducts()
Returns a list of order products in tabular format.
$Template->OrderOutput->getOrderShipping()
Returns all associated shipping details about the order.
$Template->OrderOutput->getOrderParcels()
Returns the parcels and their associated tracking codes as a block of information. Css is styled by the main product list: table#productList
$Template->OrderOutput->getOrderTickets();
Returns any tickets relating to the order ID. Css is styled by the main product list: table#productList
$Template->OrderOutput->getOrderStatusInfo()
Returns the a block of text describing the current order status in detail.
$Template->OrderOutput->getOrderStatusHistory()
Returns the order status history in tabular format.
myreturns.template.php
File Sample
<?php /* ########################################################################### *\ # MYRETURNS.TEMPLATE.PHP - 07/01/2007 - Copyright RedbeckGroup 2008 # \* ########################################################################## */ ?> <?php echo $Template->Account->getUserMenu(); ?> <div class="box_wrap"> <div class="box_header"> <h1><img src="pics/box/icon.gif" alt="Returns Listings" />Returns Manager</h1> </div> <div class="box_right_curve"></div> <div class="box_content"> <div>Current returns Listings</div> </div> <div class="box_nav"><?php echo $Template->Returns->getReturnsPageNav(); ?></div> <div class="box_products"> <?php echo $Template->Returns->getReturnsTable(); ?> </div> <div class="box_nav"><?php echo $Template->Returns->getReturnsPageNav(); ?></div> <div class="box_footer"> <span> </span> </div> </div>
PHP Calls
$Template→Account→getUserMenu() can be used in this template.
$Template->Returns->getReturnsPageNav()
Returns the page navigation. Css is styled by the main product list: table#productList.
$Template->Returns->getReturnsTable()
Returns each return (if any) in tabular format. Css is styled by the main product list: table#productList.
myreturnsDetail.template.php
File Sample
<?php /* ########################################################################### *\ # MYRETURNSDETAIL.TEMPLATE.PHP - 07/01/2007 - Copyright RedbeckGroup 2008 # \* ########################################################################## */ ?> <?php echo $Template->Account->getUserMenu(); ?> <?php echo $Template->Returns->getReturnsDetails(); ?> <?php echo $Template->Returns->getReturnsMsgBox(); ?> <?php echo $Template->Returns->getReturnsMessages(); ?>
PHP Calls
$Template→Account→getUserMenu() can be used in this template.
$Template->Returns->getReturnsDetails();
Returns details about the product return, along with info and the current status.
$Template->Returns->getReturnsMsgBox()
Returns a message box allowing the logged in user to add comments (message ticket) to the return.
$Template→Returns→getReturnsMessages()
Returns any return tickets (if any) in tabular format. Css is styled by the main product list: table#productList
myreturnsNew.template.php
File Sample
<?php /* ########################################################################### *\ # MYRETURNSBNEW.TEMPLATE.PHP - 07/01/2007 - Copyright RedbeckGroup 2008 # \* ########################################################################## */ ?> <?php echo $Template->Account->getUserMenu(); ?> <?php echo $Template->Returns->getNewReturnsForm(); ?>
PHP Calls
$Template→Account→getUserMenu() can be used in this template.
$Template->Returns->getNewReturnsForm()
Returns a submission for allowing a logged in user to raise a return against an order.
password.template.php
File Sample
<?php /* ########################################################################### *\ ### PASSWORD.TEMPLATE.PHP - 16/01/2008 - Copyright RedbeckGroup 2008 ### \* ########################################################################## */ ?> <?php echo $Template->Account->getUserMenu(); ?> <div class="box_header"><h1><img src="pics/box/icon.gif">Change Password</h1></div> <!-- Box_Product --> <div class="box_products"> <?php echo $Template->Account->getChangePasswordForm(); ?> </div> <div class="box_footer"><span> </span></div>
PHP Calls
$Template→Account→getUserMenu() can be used in this template.
$Template->Account->getChangePasswordForm()
Returns a submission form for allowing a logged in user to change their password.
signup.template.php
File Sample
<?php /* ########################################################################### *\ ### SIGNUP.TEMPLATE.PHP - 29/12/2007 - Copyright RedbeckGroup 2008 ### \* ########################################################################## */ ?> <div class="box_wrap"> <div class="box_header"> <h1><img src="pics/box/icon.gif">Register!</h1> </div> <div class="box_right_curve"></div> <div class="box_content"> <div >Please complete the following form to set up your account!</div> </div> <div class="box_products"> <?php echo $Template->Signup->getRegistrationForm(); ?> </div> <div class="box_nav"><strong>Privacy Policy:</strong> You can have piece and mind when shopping with us, we never pass your details onto any third party!<br> <span class="red_text">Please make sure all fields marked with an astrix * are completed</span></div> <div class="box_footer"> <span> </span> </div> </div>
PHP Calls
$Template->Signup->getRegistrationForm()
Returns a submission form so a user can register an account.
signupMoreInformation.template.php
This template is displayed if accounts require activating before they can be used. Activation of accounts is controlled by a global configuration value.
File Sample
<?php /* ########################################################################### *\ ## SIGNUPMOREINFORMATION.TEMPLATE.PHP - 29/12/2007 - C RedbeckGroup 2008 ## \* ########################################################################## */ ?> <div class="box_wrap"> <div class="box_header"> <h1><img src="pics/box/icon.gif">Your account has been registered and is now awaiting activation</h1> </div> <div class="box_right_curve"></div> <div class="box_product_description"> <div class="box_orange_info"> Congratulations, your account was successfully registered. Please allow 24 hours for your account to be activated by a member of our team. You will receive an email informing you when you account goes live. </div> </div> <div class="box_footer"> <span> </span> </div> </div>
PHP Calls
There are no specific calls for this page as it is a static template.
signupSuccess.template.php
This template is displayed when an account has been successfully created. There are no php calls in this template.
File Sample
<?php /* ########################################################################### *\ ###SIGNUPSUCCESS.TEMPLATE.PHP - 30/12/2007 - Copyright RedbeckGroup 2008### \* ########################################################################## */ ?> <div class="box_wrap"> <div class="box_header"> <h1><img src="pics/box/icon.gif">Your account has successfully been registered</h1> </div> <div class="box_right_curve"></div> <div class="box_product_description"> <div class="box_orange_info"> Congratulations, your account was successfully registered. You can now browse your <a href="account">account</a>, or <a href="checkout_shipping">continue to checkout</a> to complete your order. </div> </div> <div class="box_footer"> <span> </span> </div> </div>
PHP Calls
There are no specific calls for this page as it is a static template.
tickets.template.php
File Sample
<?php /* ########################################################################### *\ ### TICKETS.TEMPLATE.PHP - 03/12/2007 - Copyright RedbeckGroup 2008 ### \* ########################################################################## */ ?> <?php echo $Template->Tickets->getUserMenu(); ?> <div class="box_wrap"> <div class="box_header"> <h1><img src="pics/box/icon.gif">My Tickets</h1> </div> <div class="box_right_curve"></div> <div class="box_content"> <div>Here is a list of all the communications you have made so far. To raise a new ticket, please email <?php echo $Template->Tickets->getTicketsEmail(); ?></div> </div> <div class="box_nav"><?php echo $Template->Tickets->getAllTicketsPageNav(); ?></div> <div class="box_products"> <?php echo $Template->Tickets->getAllTickets(); ?> </div> <div class="box_nav"><?php echo $Template->Tickets->getAllTicketsPageNav(); ?></div> <div class="box_footer"> <span> </span> </div> </div>
PHP Calls
$Template→Tickets→getUserMenu() can be used in this template. (please note the partial change from $Template→Account to $Template→Tickets to what has been used before for this call. Both calls do the same thing.
$Template->Tickets->getAllTicketsPageNav()
Returns the page navigation for the tickets list.
$Template->Tickets->getAllTickets()
Returns a list of tickets associated with the logged in user. These are displayed in tabular format. Css is styled by the main product list: table#productList.
ticketsDetail.template.php
File Sample
<?php /* ########################################################################### *\ ### TICKETSDETAIL.TEMPLATE.PHP - 03/12/2007 - Copyright RedbeckGroup 2008 # \* ########################################################################## */ ?> <?php echo $Template->Tickets->getTicketDetails(); ?>
PHP Calls
$Template→Tickets→getUserMenu() can be used in this template. (please note the partial change from $Template→Account to $Template→Tickets to what has been used before for this call. Both calls do the same thing.
$Template->Tickets->getTicketDetails()
Returns details for the specified ticket.