Forums

[resolved] Give zen-cart access to wp functions (2 posts)

  1. jrodgers
    Member
    Posted 4 years ago #

    I have a site

    http://www.mysite.com/index.php
    which is a wp site
    the site also has a cart (zen cart)
    http://www.mysite.com/store/

    i would like to add the side bar and other code to the zen-cart, but how can i add the functions from wp to zen-cart? (a simple one line include or include once which would allow me to access the wp code is what i'm looking for)

  2. jrodgers
    Member
    Posted 4 years ago #

    FYI

    i was able to provide zen-cart with access to the WP libraries by copying this line from the wp index.cfm

    require('./wp-blog-header.php');

    and adding it to the zen-cart index.cfm, and changing the relative path to reference the higher directory
    require('../wp-blog-header.php');

    Note: do not add
    define('WP_USE_THEMES', true);
    doesn't stop the functionality but did some weird stuff with my styles/themes

Topic Closed

This topic has been closed to new replies.

About this Topic