Results 1 to 10 of 12

Hybrid View

  1. #1

    Default Re: Share a database between stores

    If you look at my links to the costume sites above, you'll notice the top level categories do not show on the respective sites, only those second level categories under the site category.

    Breadcrumbs have also been customized to remove the unecessary category links.

    Sideboxes and special lists (featured, special etc.) were all mod'd to only show the correct sites (via top level category) items.

    Its all possible, just takes more time to get the finer details.

  2. #2
    Join Date
    Aug 2006
    Posts
    27
    Plugin Contributions
    0

    Default Re: Share a database between stores

    Damonp, do you have any documentation on the changes you had to make to complete this? I do not need exact changes, just a high-level list of what I should examine I decide to got his route. Depending on response to other threads out there (Multiple Stores with One Database) I may end up having to code this myself.

    It sure would be nice if it was deemed useful enough to go into a core Zencart release... wouldn't that be sweet!?!?!?

    hehehe

  3. #3

    Default Re: Share a database between stores

    Sorry, no documentation. The best high level description of what I did is above a few posts.

    I added a categories_top_parent column to the database. Basically, any file that uses the categories tables (from admin, to templates, to sideboxes, etc) has to be mod'd to be limited to a category below that site's top level category.

    I would hope such a mod isn't included in the core. It required extensive modification to a lot of files. Its a very worthwhile mod for the few in 1000 users that need it, but it overly complicates the code for the 995 others that don't. Feature creep and code bloat are already becoming problems in my opinion.

    PM me if you have specific questions and I'll see what I can do.

  4. #4
    Join Date
    Aug 2006
    Posts
    27
    Plugin Contributions
    0

    Default Re: Share a database between stores

    Quote Originally Posted by damonp View Post
    Sorry, no documentation. The best high level description of what I did is above a few posts.

    I added a categories_top_parent column to the database. Basically, any file that uses the categories tables (from admin, to templates, to sideboxes, etc) has to be mod'd to be limited to a category below that site's top level category.

    I would hope such a mod isn't included in the core. It required extensive modification to a lot of files. Its a very worthwhile mod for the few in 1000 users that need it, but it overly complicates the code for the 995 others that don't. Feature creep and code bloat are already becoming problems in my opinion.

    PM me if you have specific questions and I'll see what I can do.
    Actually everything you described in the above threads is how I've expected this needed to be done (i.e. categories_top_parent field, etc). I was just looking for a jump-start on the files to modify using that field. Anyway, your posts above will be more than sufficient to get me heading in the right direction. I appreciate all of your input on this and will let you know if I have any outstanding problems if I encounter them.

    Thanks again,
    Bob

  5. #5

    Default Re: Share a database between stores

    To get a list of files to edit, grep the source for TABLE_CATEGORIES. Pretty much every category query needs a

    Code:
    and top_category = ...
    Last edited by damonp; 16 Dec 2006 at 03:02 AM.

  6. #6
    Join Date
    Aug 2006
    Posts
    27
    Plugin Contributions
    0

    Default Re: Share a database between stores

    Thanks for the heads up. I was able to use the Developer's toolkit to find most of the locations. I've also modified several queries that pull all products regardless of category (thus the category table was not found with the toolkit). And finally I created a sidebox that lists the departments (which is how I am using this concept) and allows the user to change to whichever view they want.

    All in all, it was much easier than I first thought it would be. I've also developed a few secondary pages that allow me to administer the departments via the frontend as well as assign/modify categories to the departments.

    Now that the bulk of the work is done, I want to go back and winMerge compare the files with the originals because I know there were several places where I modified the originals instead of the overrides (ugg!). I'm also starting to pickup on some of the Zencart API... honestly, I'd rather write stuff myself, but it's nice to know that stuff... is there any detailed documentation on the Zencart API????

    Once the system is ready from a data standpoint, I want to modify it to use a different stylesheet depending on the department selected. So if someone is in the Toys department, they will see bright colors and matching header images, but while in Electronics department the colors will be more metalic and the imagery more techo... at least that's the plan.
    Last edited by rknepp79; 19 Dec 2006 at 03:24 AM.

 

 

Similar Threads

  1. 3 domains share products users etc 3 different stores
    By Quality Refurbished in forum General Questions
    Replies: 8
    Last Post: 7 Mar 2013, 03:06 PM
  2. 2 stores... share the same image folder??
    By kitcorsa in forum General Questions
    Replies: 6
    Last Post: 22 Jul 2010, 09:56 AM
  3. Replies: 10
    Last Post: 2 Dec 2009, 12:57 PM
  4. Can 2 stores share one database
    By mach9 in forum General Questions
    Replies: 9
    Last Post: 16 Oct 2009, 10:27 AM
  5. Sharing a database between stores
    By boinkit in forum General Questions
    Replies: 2
    Last Post: 6 Jun 2008, 12:16 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