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

include templates outside x-cart

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-16-2004, 03:27 AM
  epi's Avatar 
epi epi is offline
 

Member
  
Join Date: Apr 2004
Posts: 22
 

Default include templates outside x-cart

Hi,
I'd like to show the featured items on our homepage, which is one level up the x-cart-directory.

Now i have created a file(in the x-cart-dir) which prints the featured items

So my index.php contains:
Code:
<?php include('xcart/customer/feat.php');?>

and my 'xcart/customer/feat.php' contains
Code:
<?php require "xcart/customer/auth.php"; require "xcart/customer/featured_products.php"; return $smarty->display("./home_feat.tpl"); ?>
when i run feat.php in my browser it does show the created table perfectly;
(home_feat.tpl is a custom made template to fit the content in the page)

Fortunately is the current web-site very hard to integrate in X-cart, so i have to integrate X-cart in the web-site

What I get returned is:
"ERROR: Can not initiate application! Please check configuration."

Is there some sort of general method to include x-cart templates in your standard PHP-page..?

I use X-cart 3.5.10

Thanks in advance,
Reply With Quote
  #2  
Old 09-16-2004, 07:38 AM
  Jon's Avatar 
Jon Jon is offline
 

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

Default

What I do is create a php script that manually connects to the x-cart database, pulls the information I need, and then writes it using php. Then I skip all of the x-cart code which makes it faster, and avoids smarty.
Reply With Quote
  #3  
Old 09-17-2004, 01:06 AM
  epi's Avatar 
epi epi is offline
 

Member
  
Join Date: Apr 2004
Posts: 22
 

Default

Hi Jon, Thanks for your reply..!
That is a solution indeed, but since the xcart-script is so flexible I just wondered if there is no eehh.. easier solution; i mean; when you have the solution it might be multi-purpose. I just wondered if it is possible.. and if it is.. how?
__________________
Xcart 4.0.19 Gold
modules: X-affiliate, AOM, Feed Manager, SnS
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 03:45 AM.

   

 
X-Cart forums © 2001-2020