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

Need to know how to edit this is the invoice

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-05-2008, 10:57 AM
 
toolexperts toolexperts is offline
 

eXpert
  
Join Date: Feb 2008
Location: Knoxville, TN
Posts: 289
 

Default Need to know how to edit this is the invoice

If you look the business address is set in backwards, I ned it to show address, city state and zip right now it shows address city zip and state

http://www.toolexperts.com/skin1/images/invoiceheader.GIF
__________________
Tool Experts
X-Cart DB Version: 4.1.12 GOLD
Reply With Quote
  #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
  #3  
Old 05-06-2008, 04:45 AM
 
toolexperts toolexperts is offline
 

eXpert
  
Join Date: Feb 2008
Location: Knoxville, TN
Posts: 289
 

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

I don't know carpe, if you look at most of my posts I have figured out issues by myself...and as a reference to my site being ugly...it doesn't appear to be that way to my customers. I have basic html, but x-cart has a huge learning curve especially for someone never using smarty. I do thank you for your help, but don't appreciate the public admonition, if you had something rude to say to me i feel it would have been better said in a private message.

I can find my tempates just fine, forgive me for not knowing smarty, and for annoying you with posts, i am trying to learn here, so I can better myself. Consider this my last post.
Reply With Quote
  #4  
Old 05-06-2008, 05:09 AM
 
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,

My "ugly" point was about the DEFAULT template.. and that yes, we must change/fix it. It wasn't about YOUR store or edit -- it was about x-cart's default template -- that the way it is set up for US businesses, it is pretty ugly, and needs an edit.

Quote:
This is pretty ugly by default, yes?

Everyone has to start somewhere -- but over the weeks/months, your posts have asked people to find code and fix it. I am trying to help you learn more -- by simplifying the process -- you will see how easy (relatively) this is, once you grasp a few basic ideas.

Editing order_invoice.tpl is one of the most basic edits you can do... I am/was trying to help you learn. I won't answer your posts anymore. No need to leave the forum.

PS -- your post went unanswered for quite a while -- and I was sincerely hoping to help you.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #5  
Old 05-06-2008, 05:24 AM
 
toolexperts toolexperts is offline
 

eXpert
  
Join Date: Feb 2008
Location: Knoxville, TN
Posts: 289
 

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

Quote:
Originally Posted by carpeperdiem
Shawn,

My "ugly" point was about the DEFAULT template.. and that yes, we must change/fix it. It wasn't about YOUR store or edit -- it was about x-cart's default template -- that the way it is set up for US businesses, it is pretty ugly, and needs an edit.



Everyone has to start somewhere -- but over the weeks/months, your posts have asked people to find code and fix it. I am trying to help you learn more -- by simplifying the process -- you will see how easy (relatively) this is, once you grasp a few basic ideas.

Editing order_invoice.tpl is one of the most basic edits you can do... I am/was trying to help you learn. I won't answer your posts anymore. No need to leave the forum.

PS -- your post went unanswered for quite a while -- and I was sincerely hoping to help you.


It did fix this issue, and I appreciate it, my biggest issue lately has been finding where crap is so I can fix it, I admit at first I was pretty clueless but I am learning here, in fact we are making some major seo waves, and sales are up. My bosses are nitpicking, I am under deadlines, and I have a tendency to panic when it comes to "new" things, I admit, learning this without help of dreamweaver has been hard and I do appreciate all the help I have gotten. Most of the coding issues I have had issues with have been rectified by using methods recommended, I am sorry I just took that post as offensive...I reread it after I took my insulin lol, no harm no foul
__________________
Tool Experts
X-Cart DB Version: 4.1.12 GOLD
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 12:35 AM.

   

 
X-Cart forums © 2001-2020