Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Improved Checkout Customer Details for 4.3.2

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 07-18-2010, 12:25 PM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Improved Checkout Customer Details for 4.3.2

I've added a class to each <td> element in modules/Fast_Lane_Checkout/customer_details_html.tpl, so that you can more clearly separate the label and the information, such as

Title Mr
First name
John
Last name Smith
etc.

Which I think is clearer than:

Title Mr
First name
John
Last name Smith



I edited modules/Fast_Lane_Checkout/customer_details_html.tpl
as follows: (you can cut and paste the entire thing into customer_details_html.tpl, as the only changes I have made are to change the <td> tags to
<td class="customerdetails1"> and <td class="customerdetails2">

You can then target the left and right table data cells with CSS, so you might want to put a different coloured background on each, or a background image, etc.

Code:
{* $Id: customer_details_html.tpl,v 1.10 2009/04/18 06:33:05 max Exp $ vim: set ts=2 sw=2 sts=2 et: *} <div class="flc-checkout-address-left"> {include file="customer/subheader.tpl" title=$lng.lbl_contact_information class="grey"} <table cellspacing="0" class="flc-checkout-address" summary="{$lng.lbl_contact_information|escape}"> <tr class="hidden"><td colspan="2">&nbsp;</td></tr> {if $userinfo.default_fields.title} <tr> <td class="customerdetails1">{$lng.lbl_title}:</td> <td class="customerdetails2">{$userinfo.title}</td> </tr> {/if} {if $userinfo.default_fields.firstname} <tr> <td class="customerdetails1">{$lng.lbl_first_name}:</td> <td class="customerdetails2">{$userinfo.firstname}</td> </tr> {/if} {if $userinfo.default_fields.lastname} <tr> <td class="customerdetails1">{$lng.lbl_last_name}:</td> <td class="customerdetails2">{$userinfo.lastname}</td> </tr> {/if} {if $userinfo.default_fields.company} <tr> <td class="customerdetails1">{$lng.lbl_company}:</td> <td class="customerdetails2">{$userinfo.company}</td> </tr> {/if} {if $userinfo.default_fields.tax_number} <tr> <td class="customerdetails1">{$lng.lbl_tax_number}:</td> <td class="customerdetails2">{$userinfo.tax_number}</td> </tr> {/if} {if $userinfo.default_fields.phone} <tr> <td class="customerdetails1">{$lng.lbl_phone}:</td> <td class="customerdetails2">{$userinfo.phone}</td> </tr> {/if} {if $userinfo.default_fields.fax} <tr> <td class="customerdetails1">{$lng.lbl_fax}:</td> <td class="customerdetails2">{$userinfo.fax}</td> </tr> {/if} {if $userinfo.default_fields.email} <tr> <td class="customerdetails1">{$lng.lbl_email}:</td> <td class="customerdetails2">{$userinfo.email}</td> </tr> {/if} {if $userinfo.default_fields.url} <tr> <td class="customerdetails1">{$lng.lbl_web_site}:</td> <td class="customerdetails2">{$userinfo.url}</td> </tr> {/if} {foreach from=$userinfo.additional_fields item=v} {if $v.section eq 'C' || $v.section eq 'P'} <tr> <td class="customerdetails1">{$v.title}:</td> <td class="customerdetails2">{$v.value}</td> </tr> {/if} {/foreach} </table> </div> <div class="clearing"></div> <div class="flc-checkout-address-left"> {include file="customer/subheader.tpl" title=$lng.lbl_billing_address class="grey"} <table cellspacing="0" class="flc-checkout-address" summary="{$lng.lbl_billing_address|escape}"> <tr class="hidden"><td colspan="2">&nbsp;</td></tr> {if $userinfo.default_fields.b_title} <tr> <td class="customerdetails1">{$lng.lbl_title}:</td> <td class="customerdetails2">{$userinfo.b_title}</td> </tr> {/if} {if $userinfo.default_fields.b_firstname} <tr> <td class="customerdetails1">{$lng.lbl_first_name}:</td> <td class="customerdetails2">{$userinfo.b_firstname}</td> </tr> {/if} {if $userinfo.default_fields.b_lastname} <tr> <td class="customerdetails1">{$lng.lbl_last_name}:</td> <td class="customerdetails2">{$userinfo.b_lastname}</td> </tr> {/if} {if $userinfo.default_fields.b_address} <tr> <td class="customerdetails1">{$lng.lbl_address}:</td> <td class="customerdetails2"> {$userinfo.b_address} {if $userinfo.b_address_2} <br />{$userinfo.b_address_2} {/if} </td> </tr> {/if} {if $userinfo.default_fields.b_city} <tr> <td class="customerdetails1">{$lng.lbl_city}:</td> <td class="customerdetails2">{$userinfo.b_city}</td> </tr> {/if} {if $userinfo.default_fields.b_state} <tr> <td class="customerdetails1">{$lng.lbl_state}:</td> <td class="customerdetails2">{$userinfo.b_statename}</td> </tr> {/if} {if $userinfo.default_fields.b_country} <tr> <td class="customerdetails1">{$lng.lbl_country}:</td> <td class="customerdetails2">{$userinfo.b_countryname}</td> </tr> {/if} {if $userinfo.default_fields.b_zipcode} <tr> <td class="customerdetails1">{$lng.lbl_zip_code}:</td> <td class="customerdetails2">{$userinfo.b_zipcode}</td> </tr> {/if} {foreach from=$userinfo.additional_fields item=v} {if $v.section eq 'B'} <tr> <td class="customerdetails1">{$v.title}:</td> <td class="customerdetails2">{$v.value}</td> </tr> {/if} {/foreach} </table> </div> <div class="flc-checkout-address-right"> {include file="customer/subheader.tpl" title=$lng.lbl_shipping_address class="grey"} <table cellspacing="0" class="flc-checkout-address" summary="{$lng.lbl_shipping_address|escape}"> <tr class="hidden"><td colspan="2">&nbsp;</td></tr> {if $userinfo.default_fields.s_title} <tr> <td class="customerdetails1">{$lng.lbl_title}:</td> <td class="customerdetails2">{$userinfo.s_title}</td> </tr> {/if} {if $userinfo.default_fields.s_firstname} <tr> <td class="customerdetails1">{$lng.lbl_first_name}:</td> <td class="customerdetails2">{$userinfo.s_firstname}</td> </tr> {/if} {if $userinfo.default_fields.s_lastname} <tr> <td class="customerdetails1">{$lng.lbl_last_name}:</td> <td class="customerdetails2">{$userinfo.s_lastname}</td> </tr> {/if} {if $userinfo.default_fields.s_address} <tr> <td class="customerdetails1">{$lng.lbl_address}:</td> <td class="customerdetails2"> {$userinfo.s_address} {if $userinfo.s_address_2} <br />{$userinfo.s_address_2} {/if} </td> </tr> {/if} {if $userinfo.default_fields.s_city} <tr> <td class="customerdetails1">{$lng.lbl_city}:</td> <td class="customerdetails2">{$userinfo.s_city}</td> </tr> {/if} {if $userinfo.default_fields.s_state} <tr> <td class="customerdetails1">{$lng.lbl_state}:</td> <td class="customerdetails2">{$userinfo.s_statename}</td> </tr> {/if} {if $userinfo.default_fields.s_country} <tr> <td class="customerdetails1">{$lng.lbl_country}:</td> <td class="customerdetails2">{$userinfo.s_countryname}</td> </tr> {/if} {if $userinfo.default_fields.s_zipcode} <tr> <td class="customerdetails1">{$lng.lbl_zip_code}:</td> <td class="customerdetails2">{$userinfo.s_zipcode}</td> </tr> {/if} {foreach from=$userinfo.additional_fields item=v} {if $v.section eq 'S'} <tr> <td class="customerdetails1">{$v.title}:</td> <td class="customerdetails2">{$v.value}</td> </tr> {/if} {/foreach} </table> </div> <div class="clearing"></div> {capture name=addfields} {foreach from=$userinfo.additional_fields item=v} {if $v.section eq 'A'} <tr> <td class="customerdetails1">{$v.title}:</td> <td class="customerdetails2">{$v.value}</td> </tr> {/if} {/foreach} {/capture} {if $smarty.capture.addfields ne ""} <div class="flc-checkout-address-left"> {include file="customer/subheader.tpl" title=$lng.lbl_additional_information class="grey"} <table cellspacing="0" class="flc-checkout-address" summary="{$lng.lbl_additional_information|escape}"> {$smarty.capture.addfields} </table> </div> <div class="clearing"></div> {/if}

I added the following styles to altskin.css:

.customerdetails1 {
color: #000;
}
.customerdetails2 {
color: #b00;
}

(I will add more properties to them, this is just so that I can see it's working, and that I've added the class to all the <td> tags correctly.)
__________________
X-Cart Gold Version 4.3.2
Reply With Quote

The following user thanks Sisom for this useful post:
andrew@dermico.com.au (09-20-2010)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:37 PM.

   

 
X-Cart forums © 2001-2020