Guest ace5p1d0r Posted May 15, 2006 Share Posted May 15, 2006 I am trying to simply PHP Include something into my store. It is coded in PHP, why doesent it work? Simple example: Try to include a .txt document into index.tpl to display on all pages. I know the .tpl file does not support PHP, but that only goes into a PHP file doesent it? Thanks in advance Alec Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 18, 2006 Share Posted May 18, 2006 Anybody? Quote Link to comment Share on other sites More sharing options...
convict Posted May 19, 2006 Share Posted May 19, 2006 What would you like to include to? Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 21, 2006 Share Posted May 21, 2006 Simply a .txt file containing text in a seperate folder Quote Link to comment Share on other sites More sharing options...
convict Posted May 21, 2006 Share Posted May 21, 2006 Version of Xtemplate system used in CubeCart 3.0.x doesnt support this in template. You have to use additional template variable with content of the desiderd file in appropriate php file. Add this new template variabale to a template. Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 22, 2006 Share Posted May 22, 2006 Could you explain that slightly better please? :$ Quote Link to comment Share on other sites More sharing options...
convict Posted May 23, 2006 Share Posted May 23, 2006 Try this or this. Hope this will make sence. Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 23, 2006 Share Posted May 23, 2006 Thanks convict I looked closely at both of those. However its not really what I'm looking for. I just want a very simple way of including a .txt document in a .tpl file. Just like PHP Include but that doesent work, so what will? Quote Link to comment Share on other sites More sharing options...
convict Posted May 24, 2006 Share Posted May 24, 2006 Jus paste content of this document to a template. Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 24, 2006 Share Posted May 24, 2006 What document... Quote Link to comment Share on other sites More sharing options...
Guest shandaman Posted May 24, 2006 Share Posted May 24, 2006 index.tpl in yourskin/styleTemplates/global/index.tpl Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 24, 2006 Share Posted May 24, 2006 Ah right. Thats this: <!-- BEGIN: body --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <head> <title>{META_TITLE}</title> <meta http-equiv="Content-Type" content="text/html; charset={VAL_ISO}"> <meta name="description" content="{META_DESC}"> <meta name="keywords" content="{META_KEYWORDS}"> <link href="skins/{VAL_SKIN}/styleSheets/layout.css" rel="stylesheet" type="text/css"> <link href="skins/{VAL_SKIN}/styleSheets/style.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="js/support.js"></script> <script language="javascript" src="js/jslibrary.js" type="text/javascript"></script> </head> <body> <div id="pageSurround"> <div id="subSurround"> <div id="topHeader"> <div style="padding-top: 72px;">{SEARCH_FORM}</div> <div>{SESSION}</div> </div><div> <div class="colLeft"> <div class="boxTitleLeft">Shop by Type</div> <div class="boxContentLeft"> <li class="bullet"><a href="index.php" class="txtDefault">Homepage</a></li> <li class="bullet"><a href="http://www.worldpaintinggallery.com/index.php?act=viewDoc&docId=12" class="txtDefault">Portrait Paintings</a></li> <li class="bullet"><a href="http://www.worldpaintinggallery.com/index.php?act=viewDoc&docId=10" class="txtDefault">Subject</a></li> <li class="bullet"><a href="http://www.worldpaintinggallery.com/index.php?act=viewDoc&docId=11" class="txtDefault">Style</a></li> </div> <div class="boxTitleRight">Our Company</div> <div class="boxContentRight"> <li class="bullet"><a href="http://www.worldpaintinggallery.com/index.php?act=viewDoc&docId=14" class="txtDefault">About Us</a></li> <li class="bullet"><a href="java script:popUp('http://www.worldpaintinggallery.com/contact/')" class="txtDefault">Support</a></li> <li class="bullet"><a href="http://www.worldpaintinggallery.com/index.php?act=viewDoc&docId=5" class="txtDefault">F A Q</a></li> <li class="bullet"><a href="http://www.worldpaintinggallery.com/index.php?act=viewDoc&docId=13" class="txtDefault">How To Order</a></li> <li class="bullet"><a href="http://www.worldpaintinggallery.com/index.php?act=viewDoc&docId=6" class="txtDefault">Terms & Conditions</a></li> <li class="bullet"><a href="http://www.worldpaintinggallery.com/index.php?act=viewDoc&docId=15" class="txtDefault">Partners</a></li></div> {CATEGORIES} {MAIL_LIST}</div> <div class="colMid"> {PAGE_CONTENT} </div><div class="txtSiteDocs"> <div align="center"><img src="../../../../images/secure.gif" alt="Secure Purchasing 100% Guaranteed" width="140" height="55" vspace="3" /></div></div> <div class="colRight"> <div class="boxTitleRight">Showcase</div> <div class="boxContentRight"> <div align="center"><img src="http://www.worldpaintinggallery.com/images/anim.gif" alt="World Painting Gallery"><br> </div></div>{SHOPPING_CART} {POPULAR_PRODUCTS} {SALE_ITEMS} <div class="boxTitleRight">Support</div> <div class="boxContentRight"> <div style="text-align: centre"> <div align="center"><a href="java script:popUp('http://www.worldpaintinggallery.com/contact/')"><img src="http://www.worldpaintinggallery.com/contact/help.gif" alt="Contact WPG" width="140" height="57" border="0"></a><br> </div></div></div> {INFORMATION} {CURRENCY} {LANGUAGE} </div></div> <div align="center"><br clear="all" /> {SITE_DOCS} <span class="txtSiteDocs">Site Development By: <a href="http://www.acedesign.org" target="_blank">AcE Design</a> | Proudly Hosted By: <a href="http://www.bluehost.com/track/ace5p1d0r/text1" target="_blank">BlueHost</a></span><br /><img src="../../../../images/payments.gif" alt="We Accept:" width="390" height="22" /></div></div></div></body></html> <!-- END: body --> Thanks again. Quote Link to comment Share on other sites More sharing options...
Guest shandaman Posted May 24, 2006 Share Posted May 24, 2006 yup to surround it in another content box simply put it inside of <div class=boxContent"> Put Content Here!! </div> Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 25, 2006 Share Posted May 25, 2006 yup to surround it in another content box simply put it inside of <div class=boxContent"> Put Content Here!! </div> shandaman I am aware of how to use DIV tags . Like it says above, I want a way to grab a .txt file from another location. Just like PHP Include. Quote Link to comment Share on other sites More sharing options...
Guest shandaman Posted May 25, 2006 Share Posted May 25, 2006 well since there isnt a way to do it this the next best thing. Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 25, 2006 Share Posted May 25, 2006 So there is absolutely no way of doing this? No possible way? I dont believe that... Quote Link to comment Share on other sites More sharing options...
Guest shandaman Posted May 25, 2006 Share Posted May 25, 2006 well im sure here is but there hasnt been one mentioned yet, you could add it in like a previous post by creatign a tpl file and linking to it. Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 25, 2006 Share Posted May 25, 2006 In that .tpl file would there be a way of grabbing the text file? I have the ability to automatically edit the text file. I just need it displayed automatically now. Quote Link to comment Share on other sites More sharing options...
Guest shandaman Posted May 25, 2006 Share Posted May 25, 2006 there should be a java script you could use to pull that text. or you can just put the text on the .tpl file. Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 25, 2006 Share Posted May 25, 2006 Ok thanks. Do you know the JS way? And how wopuld I link to the .tpl? Could you explain that? Thanks again. Quote Link to comment Share on other sites More sharing options...
Guest shandaman Posted May 25, 2006 Share Posted May 25, 2006 I could find out give me a few minutes. Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 29, 2006 Share Posted May 29, 2006 Thanks :) Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 31, 2006 Share Posted May 31, 2006 THIS page explains grabbing it using Javascript. However the .txt file cannot only include the text I want to show (which it must). Javascript seems to be the most plausible option... I just cant find out how =[ Quote Link to comment Share on other sites More sharing options...
Guest shandaman Posted May 31, 2006 Share Posted May 31, 2006 sorry i havent replied yet, i couldnt find any other way then the link you gave me. you could always use a inline frame to do it this would be a mod and you can pm me for details on how it would work. Quote Link to comment Share on other sites More sharing options...
Guest ace5p1d0r Posted May 31, 2006 Share Posted May 31, 2006 Yes please could you PM me the details or just post them here for everybody...? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.