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

include a php file in tpl (smarty)

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-01-2005, 07:10 PM
 
gargonzo gargonzo is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 171
 

Default include a php file in tpl (smarty)

hi folks.. using a php page i can include anything i want..
I want to include a php file into the smarty template: header.tpl

normally i'd do <?php include(path); ?>

I tried that inside the header.tpl and got a blank image..err no image.

how can i include this php file in the header?
garz


//////////////
xcart 4.xx
linux/php
Reply With Quote
  #2  
Old 06-01-2005, 07:39 PM
 
Emerson Emerson is offline
 

X-Man
  
Join Date: Mar 2004
Location: Atlanta, GA
Posts: 2,209
 

Default

This should work:

{php}
include(path);
{/php}
__________________
Emerson
Total Server Solutions LLC- Quality X-Cart Hosting
Recommended X-Cart Hosting Provider - US and UK servers
Does your host backup your site? We do EVERY HOUR!!!
Shared Hosting | Managed Cloud | Dedicated Servers
Reply With Quote
  #3  
Old 06-01-2005, 10:38 PM
 
mffowler mffowler is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Melbourne, Australia
Posts: 811
 

Default

I am having this problem to. I have a php file located in my store root directory that I would like to insert into the detailed images normal location on the product.tpl.

I created a detail_image.tpl in a dir. located in the skin1/modules dir. but no matter what I put in to include the php file, I get errors.

Any ideas?

Thanks, Mike
__________________
4.1.9
Reply With Quote
  #4  
Old 06-02-2005, 03:23 AM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default

I think that you will need to you the complete path to the file from root (like the path that is displayed in "Images Locations"), not just the path from "home" for your website.
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 01:55 PM.

   

 
X-Cart forums © 2001-2020