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

Including site header in head.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-05-2006, 12:59 PM
 
superfish superfish is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 32
 

Default Including site header in head.tpl

I have a PHP file that sits outside the cart's folder and is used for the header of the rest of our site. Is there a way to include that throughout our cart i.e. standard PHP include? I can't determine the method to include these files.

Thanks,
Matt
__________________
X-Cart Pro v4.0.16
X-AOM
X-RMA
X-Special Offers
X-Gift Registry
Reply With Quote
  #2  
Old 04-05-2006, 01:25 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Code:
{include_php file="/path/to/file.php"}
Reply With Quote
  #3  
Old 04-05-2006, 01:31 PM
 
superfish superfish is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 32
 

Default

Code:
{include_php file="/path/to/file.php"}

The result:

Warning: Smarty error: http://mydomain.com/shared/menu_header.php is not readable in /home/arc/public_html/shop/Smarty-2.6.9/Smarty.class.php on line 1088

__________________
X-Cart Pro v4.0.16
X-AOM
X-RMA
X-Special Offers
X-Gift Registry
Reply With Quote
  #4  
Old 04-05-2006, 01:36 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

You have to use the server path, not the URL.
Reply With Quote
  #5  
Old 04-05-2006, 01:38 PM
 
superfish superfish is offline
 

Advanced Member
  
Join Date: Dec 2004
Posts: 32
 

Default

Quote:
Originally Posted by Jon
You have to use the server path, not the URL.
Pardon my ignorance, but how would I determine the server path?
__________________
X-Cart Pro v4.0.16
X-AOM
X-RMA
X-Special Offers
X-Gift Registry
Reply With Quote
  #6  
Old 04-06-2006, 01:58 AM
 
sds sds is offline
 

Member
  
Join Date: Dec 2004
Posts: 24
 

Default

If you have shell access, type 'pwd' at the $ prompt to see the current directory you are in.
__________________
X-Cart 4.4.2
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 07:54 PM.

   

 
X-Cart forums © 2001-2020