ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Integrating EE2 with existing PHP files

June 10, 2011 9:29am

Subscribe [3]
  • #1 / Jun 10, 2011 9:29am

    Pagemakers

    11 posts

    Hi,

    We are going to integrate EE with an existing website. We are using Structure. Expression Engine will handle the general CMS work, whereas a pre-existing php files will handle login to existing user accounts and e-commerce process - inc. SSL. These two areas do not need EE2 control, as they will only be edited by web devs.

    Does anyone have any advice on how to incorporate the two, whilst try to maintain the DRY principle?

    In terms of the EE setup all, templates are external, all JS and CSS too.

    Current setup of files is:

    / (all EE2 files in root)
    /my-account/—old account code integrated—(SSL)
    /shop/ (SSL)

    I have currently come up with 2 options:

    1. create folders for the my-account and shop and re-use css/js, but recreate EE tag driven elements like menus etc.

    2. create the my-account & shop sections within EE2 and use php includes to incorporate the needed existing code

    I see both having benefits, but also limitations. These are:

    1. would need to recreate menu and other ee tag driven elements, meaning duplication of logic/code

    2. client has ability to modify/delete key files. SSL supported for these two sections?

    I’d love to hear thoughts from people who have had similar situations or any advice in general when integrating non-EE driven content.

    Thanks for your time!

    Ben

  • #2 / Jun 11, 2011 5:36pm

    Greg Salt

    3988 posts

    Hi Ben,

    Ultimately I think there will have to be some duplication of effort. If you want to take advantage of EE (or perhaps Structure’s ability) to dynamically output data to build menus/layout etc then you’ve no real option other than to use EE and possibly transition the entire system over time. There is also the possibility of employing framesets to incorporate your external pages but that won’t work for the shop and it’d be bad for SEO etc. You might want to post in the [url=http://ellislab.com/forums/viewforum/114/]Community Help forum[/ur] with more information about what needs to be integrated. Perhaps someone else has done something similar and could offer you some advice.

    Cheers

    Greg

  • #3 / Jun 13, 2011 5:40am

    Pagemakers

    11 posts

    Hi Greg,

    Thanks for the reply. Yeah, that’s pretty much what I thought… The benefits of using EE make this kind of integration tricky. Is it possible to call directly into the db and gather menu structure information etc. directly from the mySQL? Or is this bad practice? I think I can incorporate the ‘my account’ section into EE (SSL seems overkill here…) and it’s just accessing basic user data, so that just leaves the shop, which I will have to look into a bit more to see what’s the best plan. I will try posting in the community help forum for help on this.

    Thanks again you for your time,
    Ben

  • #4 / Jun 14, 2011 2:01pm

    Brandon Jones

    5500 posts

    Hi Pagemakers,

    Sure, there’s no reason you can’t pull info from the database where necessary if that’s required. EE will also work over SSL, but you will need to force SSL on the server side. I will go ahead and move this over to Community Help for you. Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases