View Single Post
  #2  
Old 05-05-2008, 04:45 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Need to know how to edit this is the invoice

Shawn,

You really need to learn some basic html -- but before you do that, have you determined which templates are involved in html email?

Try, /skin1/mail/html/order_invoice.tpl

By this point, I would image that you know how to figure out what a language variable looks like, right? You need to identify which language variables are involved here...

in order_invoice.tpl, company address is:

Code:
<b>{$config.Company.company_name}</b><br /> {$config.Company.location_address}, {$config.Company.location_city}<br /> {$config.Company.location_zipcode}{if $config.Company.location_country_has_states}, {$config.Company.location_state_name}{/if}<br /> {$config.Company.location_country_name}<br />

This is pretty ugly by default, yes?

You should simply reorder the fields and use line breaks as needed <br />

Of course, respect the ifs for the smarty variables...

This is xcart/smarty editing 101.

Part of me says I should not do this for you, since you'll never learn if I do it. But then your store will look pretty ugly if I don't do this... so here's some basic editing of order_invoice.tpl for "typical" US business addresses:


Code:
<b>{$config.Company.company_name}</b><br /> {$config.Company.location_address}<br /> {$config.Company.location_city},&nbsp;{if $config.Company.location_country_has_states}{$config.Company.location_state_name}{/if}&nbsp;{$config.Company.location_zipcode}<br />

Now, for US addresses, this is not quite right, since most businesses in the US use a 2 letter abbreviation -- so instead of using {$config.Company.location_state_name}, instead use: {$config.Company.location_state}

so, your code will look like this:

Code:
<b>{$config.Company.company_name}</b><br /> {$config.Company.location_address}<br /> {$config.Company.location_city},&nbsp;{if $config.Company.location_country_has_states}{$config.Company.location_state}{/if}&nbsp;{$config.Company.location_zipcode}<br />

And you can even lose the if for the state, since you clearly have a state.. so make it this:

Code:
<b>{$config.Company.company_name}</b><br /> {$config.Company.location_address}<br /> {$config.Company.location_city},&nbsp;{$config.Company.location_state}&nbsp;{$config.Company.location_zipcode}<br />

BUT THEN -- xhtml discourages the use of the <b> tag for bold, instead, use <strong>, like this:

Code:
<strong>{$config.Company.company_name}</strong><br /> {$config.Company.location_address}<br /> {$config.Company.location_city},&nbsp;{$config.Company.location_state}&nbsp;{$config.Company.location_zipcode}<br />

In english:

This is VERY basic html. &nbsp; is a non-breaking space. You want this after comma, before the state abbreviation. You also want a &nbsp; after the state and before the zip. The rest is simply language variables.

I would hope that after your many weeks of working on xcart, you can find your templates using webmaster mode, then do some very basic editing of html. If not, the forum has failed you -- since people continue to spoon feed you every edit. I hope you see this post as the teacher trying to help you learn to fish. I'm not trying to beat you up. Honest.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote