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

Pretty Customer Details

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 02-07-2006, 10:56 AM
  2coolbaby's Avatar 
2coolbaby 2coolbaby is offline
 

eXpert
  
Join Date: Sep 2004
Location: TN moving to FL
Posts: 265
 

Default Pretty Customer Details

The customer details in the cart by default are not very pretty at all. In fact they are barely readable and not very professional. I made some html changes to make this look much better. I used a pink background to match my site, but you can make changes. Here is my mod:

Open Customer/main/customer_details.tpl

After the first line:
Quote:
{* $Id: customer_details.tpl,v 1.8.2.4 2005/10/31 13:34:52 max Exp $ *}

replace everything else with:

Quote:
<table width="100%" border="0" cellspacing="2" cellpadding="10" bgcolor="#5c0889">
<tr valign="top">
<td colspan="2" bgcolor="#f3dff2"><font color="#520e77" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">{$lng.lbl_personal_information}:</font><font face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">

---------------------------

{if $userinfo.default_fields.firstname}{$lng.lbl_first_name}: {$userinfo.firstname}{/if}

{if $userinfo.default_fields.lastname}{$lng.lbl_last_name}: {$userinfo.lastname}{/if}

{if $userinfo.default_fields.phone}{$lng.lbl_phone}: {$userinfo.phone}{/if}

{if $userinfo.default_fields.fax}{$lng.lbl_fax}: {$userinfo.fax}{/if}

{if $userinfo.default_fields.email}{$lng.lbl_email}: {$userinfo.email}{/if}

{if $userinfo.default_fields.url}{$lng.lbl_web_site}: {$userinfo.url}{/if}

{foreach from=$userinfo.additional_fields item=v}{if $v.section eq 'C' || $v.section eq 'P'}

{$v.title}: {$v.value}{/if}{/foreach}</font></td>
</tr>
<tr valign="top">
<td bgcolor="#f3dff2"><font color="#520e77" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">{$lng.lbl_billing_address}:</font><font face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">

---------------------

{if $userinfo.default_fields.firstname}{$lng.lbl_first_name}: {$userinfo.b_firstname}{/if}

{if $userinfo.default_fields.lastname}{$lng.lbl_last_name}: {$userinfo.b_lastname}{/if}

{if $userinfo.default_fields.b_address}{$lng.lbl_address}: {$userinfo.b_address}

{if $userinfo.b_address_2}{$userinfo.b_address_2}{/if}{/if}

{if $userinfo.default_fields.b_city}{$lng.lbl_city}: {$userinfo.b_city}{/if}

{if $userinfo.default_fields.b_state}{$lng.lbl_state}: {$userinfo.b_statename}{/if}

{if $userinfo.default_fields.b_country}{$lng.lbl_country}: {$userinfo.b_countryname}{/if}

{if $userinfo.default_fields.b_zipcode}{$lng.lbl_zip_code}: {$userinfo.b_zipcode}{/if}

{foreach from=$userinfo.additional_fields item=v}{if $v.section eq 'B'}

{$v.title}: {$v.value}

{/if}{/foreach}</font></td>
<td bgcolor="#f3dff2"><font color="#520e77" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">{$lng.lbl_shipping_address}:</font><font face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">

----------------------

{if $userinfo.default_fields.firstname}{$lng.lbl_first_name}: {$userinfo.s_firstname}{/if}

{if $userinfo.default_fields.lastname}{$lng.lbl_last_name}: {$userinfo.s_lastname}{/if}

{if $userinfo.default_fields.s_address}{$lng.lbl_address}: {$userinfo.s_address}

{if $userinfo.s_address_2}{$userinfo.s_address_2}{/if}{/if}

{if $userinfo.default_fields.s_city}{$lng.lbl_city}: {$userinfo.s_city}{/if}

{if $userinfo.default_fields.s_state}{$lng.lbl_state}: {$userinfo.s_statename}{/if}

{if $userinfo.default_fields.s_country}{$lng.lbl_country}: {$userinfo.s_countryname}{/if}

{if $userinfo.default_fields.s_zipcode}{$lng.lbl_zip_code}: {$userinfo.s_zipcode}{/if}

{foreach from=$userinfo.additional_fields item=v}{if $v.section eq 'S'}

{$v.title}: {$v.value}

{/if}{/foreach}{assign var="is_header" value=""}

{foreach from=$userinfo.additional_fields item=v}{if $v.section eq 'A'}

{if $is_header ne 'Y'}

</font></td>
</tr>
<tr valign="top">
<td colspan="2" bgcolor="#f3dff2"><font color="#520e77" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">{$lng.lbl_additional_information}:</font><font face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">

-------------------------

{assign var="is_header" value="Y"}{/if}

{$v.title}: {$v.value}{/if}{/foreach}

</font></td></tr></table>

It is simple html and therefore you can configure to your tastes, but be careful or it can break it. This was only tested in 4.0.17.
__________________
Mary Lee
-------------------
Dinner and a Murder Mystery Games
http://www.dinnerandamurder.com

x-cart version 4.7.5 / Mac OS 10.10.5 and Windows 8/10 sometimes - Ideal Responsive Template
Reply With Quote
  #2  
Old 02-07-2006, 03:37 PM
 
roblen roblen is offline
 

Senior Member
  
Join Date: Oct 2004
Posts: 114
 

Default

Thanks.. Looks great.!!
__________________
X-Cart version 4.1.9
PHP 5.2.13 Details >>
GD bundled (2.0.34 compatible)
MySQL server 5.0.77-log
MySQL client 5.0.77
Web server Apache/2.2
Operation system Linux
Perl not found
XML parser (expat) found
Reply With Quote
  #3  
Old 02-26-2006, 12:12 AM
 
oracle9i oracle9i is offline
 

Member
  
Join Date: Feb 2006
Posts: 29
 

Default

i love the look of it, but i have a problem

http://members.optusnet.com.au/jbrown/helpdet.gif

no details are showing

the top line of my file says
{* $Id: customer_details.tpl,v 1.8.2.1 2004/08/12 06:27:12 max Exp $ *}
__________________
X-CART 4.0.4 (about to upgrade to 4.0.17)
Reply With Quote
  #4  
Old 02-26-2006, 12:38 PM
  wjbrewer's Avatar 
wjbrewer wjbrewer is offline
Banned
 

X-Adept
  
Join Date: Feb 2005
Location: Pittsburgh, PA
Posts: 504
 

Default

Thanks for sharing this. I hate those <pre> (or whatever they are) tags, just one of the many horrible looking aspects of the x-cart checkout. I pretty much had to recode the entire process just to make it semi logical for a customer.

I had changed my customer details already, but I like the way you did it better.
Reply With Quote
  #5  
Old 02-26-2006, 03:34 PM
  2coolbaby's Avatar 
2coolbaby 2coolbaby is offline
 

eXpert
  
Join Date: Sep 2004
Location: TN moving to FL
Posts: 265
 

Default

It works perfectly for me on several browsers. If you did not change anything then it is possible that the problem is your older version.
__________________
Mary Lee
-------------------
Dinner and a Murder Mystery Games
http://www.dinnerandamurder.com

x-cart version 4.7.5 / Mac OS 10.10.5 and Windows 8/10 sometimes - Ideal Responsive Template
Reply With Quote
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 09:57 PM.

   

 
X-Cart forums © 2001-2020