View Single Post
  #1  
Old 03-30-2006, 02:50 PM
 
fractalspin fractalspin is offline
 

Advanced Member
  
Join Date: Jul 2005
Posts: 72
 

Default Easily Copy & Paste Shipping Address of orders

After spending a whole morning frustrated about deleting extra space and field descriptions from the shipping field in the Stamps.com labeling program, I figured I should just modify the way x-cart displays the info so it's easy to copy and paste the shipping address.

It even makes the address stand out better with a tasteful little orange box around it.

Copy this bit:

Code:
<TR valign="top"> <TD valign="top"></TD> <TD valign="top"> <div style="padding:10px; border-width:1px; border-style:solid; border-color:orange; background:white"> {if $customer.default_fields.firstname} {$customer.s_firstname} {/if} {if $customer.default_fields.lastname} {$customer.s_lastname} {/if} {if $customer.default_fields.s_address} {$customer.s_address} {/if} {if $customer.default_fields.s_address_2} {$customer.s_address_2} {/if} {if $customer.default_fields.s_city} {$customer.s_city} {/if} {if $customer.default_fields.s_state} {$customer.s_statename} {/if} {if $customer.default_fields.s_zipcode} {$customer.s_zipcode} {/if} {if $customer.default_fields.s_county && $config.General.use_counties eq 'Y'} {$customer.s_countyname} {/if} {if $customer.default_fields.s_country} {$customer.s_countryname} {/if} </div> </TD> </TR>

Now open up skin1/main/order_info.tpl and go to around line 438. Select all of this:

Code:
{if $customer.default_fields.firstname} <TR valign="top"> <TD> {$lng.lbl_first_name}</TD> <TD>{$customer.s_firstname}</TD> </TR> {/if} {if $customer.default_fields.lastname} <TR valign="top"> <TD> {$lng.lbl_last_name}</TD> <TD>{$customer.s_lastname}</TD> </TR> {/if} {if $customer.default_fields.s_address} <TR> <TD valign="top"> {$lng.lbl_address}</TD> <TD valign="top">{$customer.s_address}</TD> </TR> {/if} {if $customer.default_fields.s_address_2} <TR> <TD valign="top"> {$lng.lbl_address_2}</TD> <TD valign="top">{$customer.s_address_2}</TD> </TR> {/if} {if $customer.default_fields.s_city} <TR> <TD valign="top"> {$lng.lbl_city}</TD> <TD valign="top">{$customer.s_city}</TD> </TR> {/if} {if $customer.default_fields.s_county && $config.General.use_counties eq 'Y'} <TR> <TD valign="top"> {$lng.lbl_county}</TD> <TD valign="top">{$customer.s_countyname}</TD> </TR> {/if} {if $customer.default_fields.s_state} <TR> <TD valign="top"> {$lng.lbl_state}</TD> <TD valign="top">{$customer.s_statename}</TD> </TR> {/if} {if $customer.default_fields.s_zipcode} <TR> <TD valign="top"> {$lng.lbl_zip_code}</TD> <TD valign="top">{$customer.s_zipcode}</TD> </TR> {/if} {if $customer.default_fields.s_country} <TR> <TD valign="top"> {$lng.lbl_country}</TD> <TD valign="top">{$customer.s_countryname}</TD> </TR> {/if}

And hit delete. Leave the cursor in the empty space at line 438 and paste the new code.

Save it & upload it.

Yay.
__________________
http://www.fractalspin.com
nerdy jewelry, geekcessories, bags, tshirts and other neat stuff

Xcart Version: 4.0.17, PHP: 4.3.11, MySQL server: 4.1.13-standard-log
Reply With Quote