View Single Post
  #3  
Old 08-08-2004, 10:29 AM
 
Adian009 Adian009 is offline
 

Advanced Member
  
Join Date: Mar 2004
Location: Tiverton, RI, USA
Posts: 37
 

Default

Quote:
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

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!
Reply With Quote