| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Custom script into template | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Im wondering if there is code I can insert at the top of each of my custom script pages so it includes the stores template and my scripts output and everything gets posted in the conent area?
Is there like an include header and footer? Thanks Jordan |
|||||||
#2
|
|||||||||
|
|||||||||
![]() You can create a php file and smarty template to include a page exactly like the other pages of the cart, and then include your php into the smarty template using something like:
{php} include "./folder/file.php"; {/php} Not ideal, but with some tweaking it should work. |
|||||||||
#3
|
|||||||
|
|||||||
![]() Quote:
Jordan: Let me explain something about your approach first..you don't need to add the "stores templates" to your pages, you need to integrate your pages into X-Cart. It is quite easy, actually, once you understand the architecture.... All you do is add your program to the /xcart/skin1/customer/home_mail.tpl file and it will include it in the "Content" area. That file is used to do *exactly* what you are trying to do. Then, in your PHP file you set "main" to the value you used in the "home_main.tpl" file. Let me show you a live example of something I wrote, below: In my PHP file I have: $smarty->assign("main","infosolv_shipping"); $smarty->display("customer/home.tpl"); In my home_main.tpl I have (you can ignore the comment, I put it there so I know why I modified the files): {* 08/2004 by Al Ponte: Modified to support Infosolv Shipping. *} {elseif $main eq "infosolv_shipping"} {include file="customer/infosolv_shipping.tpl"} This passes the application through the X-Cart framework and your template will be parsed as part of the overall store. Let me know if you need more help... --al
__________________
--------------------------------------------- Infosolv, LLC A Professional Services Company X-Cart v3.5.10 & 4.01 Find our MOD\'s at: Custom X-Cart MOD\'s, Add-On\'s & X-Cart Hosting! |
|||||||
#4
|
|||||||
|
|||||||
![]() hello, I am trying to include plogger.org - image gallery script in static page but can't seem to work. I have script in different folder / outside xcart folder.
need to place following codes. Tried few different ways but it doesn't seem to be working. First line of HTML file -> <?php require("gallery.php"); ?> In HEAD section of HTML -> <?php the_gallery_head(); ?> Somewhere in BODY section -> <?php the_gallery(); ?> I tried different path putting plogger folder name in front and few changes but doesn't work. Is it compatible? Thanks.
__________________
X-Cart Version 4.1.8 Hosted on Linux |
|||||||
#5
|
|||||||
|
|||||||
![]() Quote:
Did you ever manage to intergrate Plogger? I'm trying to do the exact same thing, and it's driving me mad! Thanks Paul
__________________
X-Cart Gold V 4.4.1 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|