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

welcome.tpl php include?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-18-2010, 05:10 PM
  baconbits's Avatar 
baconbits baconbits is offline
 

Advanced Member
  
Join Date: Nov 2006
Location: WNY
Posts: 46
 

Default welcome.tpl php include?

How can I run a php script that is in a different directory?
My x-cart is in the root and the php script is in /blog/

I know how to add this to welcome.tpl but do I also need an include?

{Literal} <?php dynamic_content_gallery(); ?> {/Literal}
__________________
X-Cart Gold 4.1.12 / XC SEO / AOM / Google Checkout / PayPal
Reply With Quote
  #2  
Old 05-19-2010, 12:37 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: welcome.tpl php include?

{php}
{include file="/blog/script.php"}
dynamic_content_gallery();
{/php}


Just be aware of two things:
1) You shouldn't be using PHP in .tpl files.
2) It probably won't work due to X-cart and your blog having the same name PHP functions.
__________________
- Shane Munroe
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 04:25 PM.

   

 
X-Cart forums © 2001-2020