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 templates outside x-cart (https://forum.x-cart.com/showthread.php?t=9387)

epi 09-16-2004 03:27 AM

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,

Jon 09-16-2004 07:38 AM

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.

epi 09-17-2004 01:06 AM

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? :D


All times are GMT -8. The time now is 01:13 PM.

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