X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   The weirdest thing ever...Include not working (https://forum.x-cart.com/showthread.php?t=35578)

jwwceo 11-20-2007 02:37 AM

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>


carpeperdiem 11-20-2007 03:42 AM

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.


All times are GMT -8. The time now is 09:34 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.