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)
-   -   include a php file in tpl (smarty) (https://forum.x-cart.com/showthread.php?t=14316)

gargonzo 06-01-2005 07:10 PM

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

Emerson 06-01-2005 07:39 PM

This should work:

{php}
include(path);
{/php}

mffowler 06-01-2005 10:38 PM

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

TelaFirma 06-02-2005 03:23 AM

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.


All times are GMT -8. The time now is 05:32 PM.

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