How to get the customer’s LightSpeed Webstore minicart to show in WordPress Theme

For ages I’ve known how to get WordPress stuff to show up in my Webstores. But getting Webstore stuff to show up in my WordPress themes seemed to be beyond me.
I’d tried and tried and given up many times. So today when working on a client project I don’t know what made me try again. I just felt like I knew more now than I did and this time I might be able to do it. And I did it. Amazing.

Enough with the chitter chatter here is how I did it.

Went to (where webstore is installed), opened index.php and found this: require_once(‘includes/prepend.inc.php’);.

Then I made a copy of my_webstore_location/templates/my_template/minicart.tpl.php.

And in my WordPress theme I created a new file called “webstore-minicart.php”.

In webstore-minicart.php I pasted the contents of minicart.tpl.php.

And webstore-minicart.php, after the first < ?php, I pasted require_once('/path/to/webstore_location/includes/prepend.inc.php'); The path to file prepend.inc.php is very important. It has to be 100% correct or you'll get a nasty error or just a white page. You don't want that. If you don't know the server path to your webstore location ( where your webstore files are) here's the easiest way to find it out: create a file named info.php in the same directory where your shop is installed. If it's in /shop place info.php in /shop. In info.php paste: [php] <?php phpinfo();?>[/php] Then load the file in your browser by going to www.your-domain.com/shop/info.php Find PHP Variables and locate _SERVER["SCRIPT_FILENAME"] everything before the actual name of the file is the server path to the file. On one server the path to the file could be /home/user/username/htdocs - just for example. On another server it could be /blah/blahbla/public_html. In any case if you load info.php you ought to be able to find it out. Note: PHP errors will include the path so if you get the path wrong pay attention to any errors that occur. Whew. So now that we know where the file is and how to tell PHP where to find it we can display the minicart in our WordPress theme! [php] <?php get_template_part('webstore-minicart');?> [/php] Unfortunately, I have had to be secretive when it comes to customizing LightSpeed Webstore because there are very large multiple person team companies that do the same work as I do and charge a lot more than I do and get more customers than I do but never ever share their code! So I'm not going to post webstore-minicart.php for you on this site but if you contact me and ask me for it I will send it to you.