Any help here would be greatly appreciated,
I have custom pages outside of the cs-cart directory, I would like to connect to the db and initialize the smarty variables to work on those custom pages.
Better yet to be able to include "left.tpl and it work outside the CS cart enviroment.
Using CS-Cart 2.0.12
[quote name=‘ePlanetDesign’]Better yet to be able to include "left.tpl and it work outside the CS cart enviroment.[/quote]
That should be possible with
if the folders/files are on the same server. You have to use relative paths.
Thanks but that’s just an include, I need the variables in left.tpl to work.
Imagine this, you have cs installed in the site root.
Create a new directory, let’s call it test.
Create a new php file in that directory that connects to the db and include the smarty class.
Then, how to make smarty variables work? I’m trying to be lazy so I don’t have to write a bunch of queries by hand.
One software I have you just add the line:
and get smarty variables like:
$loggedin = $smarty->get_template_vars(‘loggedin’);
$companyname = $smarty->get_template_vars(‘companyname’);
just a guess but look at some of these files
require dirname(FILE) . ‘/prepare.php’;
require dirname(FILE) . ‘/init.php’;
Thanks ET, that would be my guess too but I can’t make heads or tails of some of that stuff.
I can include prepare.php and no errors but no help either.