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

Easily Copy & Paste Shipping Address of orders

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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
  #2  
Old 02-19-2009, 05:48 AM
 
shimmy shimmy is offline
 

Advanced Member
  
Join Date: Jun 2008
Posts: 41
 

Default Re: Easily Copy & Paste Shipping Address of orders

This is fantastic thanks, I had been trying to figure out an easy way to do this without having to change the invoice. I have one quick question, How would I make it so it's properly formatted for an address label rather than one straight line of text. I tried to put a <p> tag in after each line but it left it double spaced like this

fake customer

123 fake St.

Someplace ID 12345

But I'd like to look like this

fake customer
123 fake St.
Someplace ID 12345
__________________
Shimmy

www.hatsandheadscarves.com
Feedback welcome
shimmy@hatsandheadscarves.com
x-cart version 4.3
one page checkout & buy together mods

Reply With Quote
  #3  
Old 02-21-2009, 04:18 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Easily Copy & Paste Shipping Address of orders

Quote:
Originally Posted by shimmy
This is fantastic thanks, I had been trying to figure out an easy way to do this without having to change the invoice. I have one quick question, How would I make it so it's properly formatted for an address label rather than one straight line of text. I tried to put a <p> tag in after each line but it left it double spaced like this

fake customer

123 fake St.

Someplace ID 12345

But I'd like to look like this

fake customer
123 fake St.
Someplace ID 12345

A <br /> instead of a <p> will make it drop one line.
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
Reply With Quote

The following user thanks JWait for this useful post:
shimmy (02-21-2009)
  #4  
Old 02-21-2009, 08:45 AM
 
shimmy shimmy is offline
 

Advanced Member
  
Join Date: Jun 2008
Posts: 41
 

Default Re: Easily Copy & Paste Shipping Address of orders

Thanks a billion, I guess I should reread HTML for dummies
__________________
Shimmy

www.hatsandheadscarves.com
Feedback welcome
shimmy@hatsandheadscarves.com
x-cart version 4.3
one page checkout & buy together mods

Reply With Quote
  #5  
Old 12-03-2009, 08:43 AM
 
shimmy shimmy is offline
 

Advanced Member
  
Join Date: Jun 2008
Posts: 41
 

Default Re: Easily Copy & Paste Shipping Address of orders

I'm tried this in the new 4.3 and it seems to work except for the first and last name showing up.
Any Ideas
Thanks
__________________
Shimmy

www.hatsandheadscarves.com
Feedback welcome
shimmy@hatsandheadscarves.com
x-cart version 4.3
one page checkout & buy together mods

Reply With Quote
  #6  
Old 12-03-2009, 09:31 AM
  JWait's Avatar 
JWait JWait is offline
 

X-Man
  
Join Date: Nov 2005
Location: California
Posts: 2,440
 

Default Re: Easily Copy & Paste Shipping Address of orders

Just a thought, but do you have the customer's first and last names as required? You can check this in admin in the general settings area under "user profiles options".
__________________
Two Separate X-Cart Stores
Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux
Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series.
Integrated with Stone Edge Order Manager + POS

Version 4.1.12 Gold (fresh install) - X-AOM - Linux
Mods - XCSEO free
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 08:56 AM.

   

 
X-Cart forums © 2001-2020