Re: Hand off X-Cart users to Wordpress
I can add a few tips if anyone is trying to do something like this on their own. I only wanted the ability to show the minicart on the blog. I didn't deal with users, just $MINICART and $login (so they could log out if they wanted from the blog)
First off, you have to make sure both the xcart and wordpress database tables are located inside the same database.
Second, I added the following lines to the wordpress folder's index.php file.
require_once("../auth.php");
include $xcart_dir."/minicart.php";
Right before:
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
(I'm not sure if this is the best place to add this information, so if anyone who knows wordpress better wants to reply I'd be interested to know.)
Now both the $MINICART and $login variables, plus a host of other xcart variables including $smarty, are available to wordpress and your templates. So you call something like func_display("customer/head.tpl", $smarty); to get a specific xcart .tpl template file in your wordpress templates. (I hate copying code.)
This isn't exactly on topic, but I thought it might help someone else out.
|