X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Pretty Customer Details (https://forum.x-cart.com/showthread.php?t=19793)

2coolbaby 02-07-2006 10:56 AM

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.

roblen 02-07-2006 03:37 PM

Thanks.. Looks great.!!

oracle9i 02-26-2006 12:12 AM

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 $ *}

wjbrewer 02-26-2006 12:38 PM

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.

2coolbaby 02-26-2006 03:34 PM

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.


All times are GMT -8. The time now is 01:44 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.