Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2007
    Posts
    132
    Plugin Contributions
    0

    Default can database_tables.php be overridden?

    I made changes to the database_tables.php file.

    So far I could only get it to work by changing the original file in original location.

    I first tried making a override folder "includes/mytemplate/" and puting the file there. NG.

    I then tried making a my_database_tables.php with the changes and putting it in the extra_datafiles folders. It did not work. My thought was that the second defines would be read and override the first ones. I think I was wrong here too.

    So, my question: Can this file be overridden? Or is there another way to do this? Or do I just change the core file?

    Thanks,
    Jeff

  2. #2
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: can database_tables.php be overridden?

    What sort of changes did you make?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Oct 2007
    Posts
    132
    Plugin Contributions
    0

    Default Re: can database_tables.php be overridden?

    I am using one database for several sites. Each site has its' own prefix for all tables.

    I want to share the customer table (and probably some others).

    Using info I found in a post, I changed
    PHP Code:
    define('TABLE_CUSTOMERS',  DB_PREFIX .  'customers'); 
    to
    PHP Code:
    define('TABLE_CUSTOMERS''zen_customers'); 
    This all seems to work fine, but I know it is highly recommended to not change files without using the override system.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: can database_tables.php be overridden?

    Why not just properly setup your site for the two configure.php files in:
    /includes/configure.php
    /admin/includes/configure.php

    to use the DB_PREFIX define that are in those files properly?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Oct 2007
    Posts
    132
    Plugin Contributions
    0

    Default Re: can database_tables.php be overridden?

    I do have it set that way. Each store has its own unique db_prefix in the config files. The 80+ tables are created for each store in a single database.

    I am testing/experimenting with a mall type setup. There will be 20 or more stores each accessible from a main site. The main site has its own prefix ('zen_') and its set of tables.

    Once a customer registers at any store, or the main site, I want them to be able to login to any store with the same ID.

    Each store has its own unique products, shipping terms, etc. Each order placed needs to be only for items from that store and will go directly to that store.

    Having read 1000s of posting, I actually have this pretty far along. I have seen lots of interest in the forums for a mall setup. If I am successful, I will share my results. Preliminary results can be seen at www.munchieu.com (follow the selections NY/Buffalo/Pizza for a demo)

 

 

Similar Threads

  1. Problem with overridden english.php file
    By ijlal in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 2 Mar 2010, 03:49 PM
  2. How does the database_tables.php get called
    By Capslock118 in forum General Questions
    Replies: 4
    Last Post: 26 Feb 2008, 02:26 PM
  3. Can my override be overridden? Page 4
    By hambone in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 11 Dec 2007, 06:12 AM

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