View Single Post
  #27  
Old 05-31-2006, 04:30 PM
 
Grant Grant is offline
 

Senior Member
  
Join Date: Apr 2006
Posts: 171
 

Default Re: easy simplify checkout mod

Quote:
Originally Posted by bobcc99
Hi All,

This was some simple mods I have done for X-Cart 4.11, to make the checkout neater. I post it here in case it is useful to anyone starting out.

In summary, I have changed the title of the first block of registering for profile or checkout to Customer Details, have removed URL, Fax, Company fields and brought the Phone and Email up to this block as well as some other formatting. Also removed the multiple fields for first and last name so there is just the one. Any alternative ways of doing this I'd be interested to here about.

** CHANGE TEXT "PERSONAL INFORMATION (register/checkout)**
In Admin, go to Languages, select English.
Wait for page refresh. Select Labels and type in "Personal Information"
Change this text to 'Customer Details' and click Apply Changes

** REGISTER PAGE - COMBINE CONTACT FIELDS WITH CUSTOMER DETAILS **
In customer/main/register.tpl find this code
{include file="main/register_contact_info.tpl" userinfo=$userinfo}
move to below {include file="main/register_personal_info.tpl" userinfo=$userinfo}
Open main/register_contact_info.tpl and remove the header row <tr> and associated code </tr>

** REGISTER/CHECKOUT PAGES - HIDE BILLING/SHIPPING INFORMATION FIRSTNAME LASTNAME **
Do this if you want to use the firstname lastname fields as identical for
registering, shipping and billing
Open main/register_shipping_address.tpl

Find this code:
----------------------------------------------------------------------------
Code:
{if $default_fields.firstname.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_first_name}</TD> <TD>{if $default_fields.firstname.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD> <TD nowrap> <INPUT type="text" name="s_firstname" size="32" maxlength="32" value="{$userinfo.s_firstname}"> {if $reg_error ne "" and $userinfo.s_firstname eq "" && $default_fields.firstname.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {/if} {if $default_fields.lastname.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_last_name}</TD> <TD>{if $default_fields.lastname.required eq 'Y'}<FONT class="Star">*</FONT>{else}{/if}</TD> <TD nowrap> <INPUT type="text" name="s_lastname" size="32" maxlength="32" value="{$userinfo.s_lastname}"> {if $reg_error ne "" and $userinfo.s_lastname eq "" && $default_fields.lastname.required eq 'Y'}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {/if}
------------------------------------------------------------------------------
REPLACE WITH
Code:
<INPUT type="hidden" name="s_firstname" size="32" maxlength="32" value="{$userinfo.s_firstname}"> <INPUT type="hidden" name="s_lastname" size="32" maxlength="32" value="{$userinfo.s_lastname}">
REPEAT FOR BILLING
Open main/register_billing_address.tpl

Find two table rows containing first last name fields as above
and replace with

Code:
<INPUT type="hidden" name="b_firstname" size="32" maxlength="32" value="{$userinfo.b_firstname}"> <INPUT type="hidden" name="b_lastname" size="32" maxlength="32" value="{$userinfo.b_lastname}">

Open main/register_personal_info.tpl
Find INPUT fields for firstname and lastname
ADD THIS CODE to end of tag

Code:
onChange="populateProfile()"

Open common_js.tpl
Add this function

Code:
function populateProfile() { document.registerform.s_firstname.value = document.registerform.firstname.value; document.registerform.s_lastname.value = document.registerform.lastname.value; document.registerform.b_firstname.value = document.registerform.firstname.value; document.registerform.b_lastname.value = document.registerform.lastname.value }

To maintain "leave empty if same as billing" message before registering
open main/register_shipping_address.tpl
find
Code:
{if !$is_s_fields}({$lng.lbl_leave_empty_if_same_as_b_address}){/if}

replace with
Code:
{if $login eq ""}({$lng.lbl_leave_empty_if_same_as_b_address}){/if}

** CHECKOUT PAGE 3 **
To simplify information on this page...
customer/main/cart_details -

find
{if $cart.products and $have_products eq "Y"} lines 77 and 99
comment out * these and their respective end tags

customer/main/customer_details.tpl
format/remove unused fields like fax, company name fields etc.

customer/main/checkout_notes.tpl
do some formatting here


bob

This doesn't work on 4.0.18 - just generates 'fields not completed errors'

http://www.wyzeshop.com/screenshot8.gif



Does anybody know how to get rid of that stupid multiple name entry thing?
__________________
X-Cart version : 4.0.18
Mod : Customer Also Bought
Mod : Custom catergory Templates
Mod : Custon Product Templates
Reply With Quote