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

The weirdest thing ever...Include not working

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-20-2007, 02:37 AM
 
jwwceo jwwceo is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 30
 

Default The weirdest thing ever...Include not working

Yesterday, I accidentally overwrote a template with another one. I overwrote mail/html/order_data.tpl with mail/html/order_invoice.tpl. So I had my server guy restore the file from the day before. But now for some reason the file does not work 100% right. Namely, order_invoice.tpl does not include order_data.tpl anymore, so there is a blank place where that template should go. Nothing has changed and the code is the same. When I go around the "include" by just pasting order_data directly into order_invoice the page works fine. So for some reason the smarty include isn't working anymore. Here is the code for the TD that this code is called in:

Am I missing something????

Code:
<td width="50%" valign="top" style="padding: 4px; border: 1px solid #999999;"> <table cellspacing="0" cellpadding="2" border="0" width="100%"> <tr><td bgcolor="#f3f3f3" colspan="2">Order Details</td></tr> <tr><td width="30%" align="right">Order Date:</td><td>{$order.date|date_format:$config.Appearance.datetime_format}</td></tr> <tr><td width="30%" align="right">Shipping Method:</td><td>{$order.shipping|trademark|default:$lng.txt_not_available}</td></tr> <tr><td width="30%" align="right">Payment Method:</td><td>{$order.payment_method}</td></tr> </table> {include file="mail/html/order_data.tpl"} </td>
__________________
Peter I
X-Cart GOLD Plus
4.5.5
Reply With Quote
  #2  
Old 11-20-2007, 03:42 AM
 
carpeperdiem carpeperdiem is offline
 

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

Default Re: The weirdest thing ever...Include not working

James,

Let's back up a bit. When you say, "I overwrote mail/html/order_data.tpl with mail/html/order_invoice.tpl." that leads me to believe

a) you are not using an FTP client;
b) you are not using appropriate tools;
c) you are not keeping local backups;

Let's back up...

1. Run, don't walk, and do some homework on FTP clients and Text Editors for code.
2. ALWAYS work on backups. LOCAL backups, as well as on the server. You should be able to reverse any code change in an instant.
3. When working with the mail templates, oftentimes email clients will cache what was there 1 minute ago, and no matter what you send to the email client, you won't see it, if the name is the same... so clear your emailclient local cache

Finally, a tip: when posting to the forum, a subject "weirdest thing ever" is not going to attract interest... you would be better naming your post, "include not working - order_data.tpl ?"

I hope you find your solution. Get better tools ASAP and you will have a better experience w/ xcart.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
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 10:11 AM.

   

 
X-Cart forums © 2001-2020