Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    9
    Plugin Contributions
    0

    Idea or Suggestion Using application_top.php for multi store solution?

    Hi,

    I've fiddled off n on with zencart for years, I know a multi store solution has been a much anticipated feature.
    I stumbled across some code & wanted some opinions on if it could be used to suit a particular need.

    My particular need is to have multiple stores managed by individual admins.
    However I dont want to install the filesystem (10+mb) for each store. it also becomes a chore to individually upgrade each store when new versions arrive.

    With the included code below (found in application_top.php) would it be possible to have one filesystem install and call one of a variety of properly populated databases?

    PHP Code:
     Set the local configuration parameters mainly for developers
     
    */
    if (
    file_exists('includes/local/configure.php')) {
      
    /**
       * load any local(user created) configure file.
       */
      
    include('includes/local/configure.php');

    If im not mistaken, this function allows zencart to connect to an alternate config file and therefore a different database and template (thus making the single install dynamic in content)
    anyone have any ideas on how to make the above code a variable that can be called via a cookie, variable, session, token or URL string?


    Moderators, if there is a more appropriate forum for this topic please move it to the appropriate location.
    Thank you.

  2. #2
    Join Date
    May 2004
    Posts
    9
    Plugin Contributions
    0

    Default Re: Using application_top.php for multi store solution?

    Something like this?

    PHP Code:
    /**
     * Set the local configuration parameters - mainly for developers
     */
    if (file_exists('includes/local/configure.php')) {
      
    /**
       * load any local(user created) configure file.
       */
      
    include('includes/local/configure.php');
    }
    else{
    // load dynamic config file
    include('includes/local/[i]variableconfigfile[/i]')

    variableconfigfile being config2.php, config3.php etc.
    Last edited by redg8r; 22 Jan 2009 at 04:39 PM.

 

 

Similar Threads

  1. usa ePay solution for PHP 5.3?
    By gotlogos in forum Addon Payment Modules
    Replies: 0
    Last Post: 1 Dec 2010, 01:54 AM
  2. Multi User, Multi Store on same domain
    By lolzita in forum General Questions
    Replies: 1
    Last Post: 7 Dec 2009, 04:02 PM
  3. Using .php code from another cart for multi-shipping?
    By foodstr2 in forum General Questions
    Replies: 2
    Last Post: 12 Sep 2008, 02:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg