Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    help question Two Stores - One Database

    Hi,

    I know that this topic has been discussed many times, I'd just like to clarify certain things.

    1. Would it be reasonable to do this if I want to implement a mobile site? Basically, I will copy/paste my current site into a new folder, for example, mobile.mysite.com - and completely customize all the newly copied files to display a mobile-friendly website - but of course it will be using the same database.

    2. If the above is possible, are there any issues I need to worry about, for instance, how are sessions handled or are there any security implications? Also, certain threads make mention of using different database prefixes, why would you do this and is it necessary?

    Thank you!

    Two Stores - One Database - To Rule Them All - And In The Darkness - Bind Them.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Two Stores - One Database

    What you're talking about is two faces to one store. It should be quite feasible. One thing I don't know about is if the two sets of software try to update the db at the same time, whether there is a possibility for confusion.

    Database prefixes are only useful if you are trying to have separate sets of information in one db container. Most everyone has no need for this; the prefix is just an automatic artifact of auto-installers.
    Last edited by gjh42; 17 Aug 2012 at 06:26 PM.

  3. #3
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Two Stores - One Database

    Thanks for the response, I guess it would need some trial and error testing then...

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Two Stores - One Database

    If it's just to DISPLAY the store differently when on mobile, then you probably just need some templating work, not another whole store.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Two Stores - One Database

    Quote Originally Posted by DrByte View Post
    If it's just to DISPLAY the store differently when on mobile, then you probably just need some templating work, not another whole store.
    Hi DrByte,

    the reason why I'm opting instead to copy the store and modify separately is becaused I currently I have so many customizations here and there and everywhere - I'd rather interfere with copied-over files than touch the ones doing their job properly.

    I'm the kind of person who isn't very organized, and I know I'll slip up somewhere.

    So, what do you reckon regarding complications I will face by doing this, if any?

    Will an issue like the one gjh42 pointed out be a problem, or even exist?

    Are there any complications you can think of that would occur in this scenario?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Two Stores - One Database

    Yes, glenn pointed out some very valid issues. What you're talking about will require a lot of organized changes to core code to make it work smoothly.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Two Stores - One Database

    the reason why I'm opting instead to copy the store and modify separately is becaused I currently I have so many customizations here and there and everywhere - I'd rather interfere with copied-over files than touch the ones doing their job properly.
    Then copy your store files and database into a test location (you can make it hidden from the public) and do all the template work you need there, so if you mess up you can just go back without worrying about your live store. Then when it works perfectly, copy that to your live location (keeping the live db).

    This is always the recommended method for making changes to your store; it avoids all kinds of problems. See the tutorials for the complete version of this advice.

  8. #8
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Two Stores - One Database

    Quote Originally Posted by gjh42 View Post
    Then copy your store files and database into a test location (you can make it hidden from the public) and do all the template work you need there, so if you mess up you can just go back without worrying about your live store. Then when it works perfectly, copy that to your live location (keeping the live db).

    This is always the recommended method for making changes to your store; it avoids all kinds of problems. See the tutorials for the complete version of this advice.
    Thanks for the response.

    This would however have been the normal procedure I would have followed. I'm not concerned about something going wrong during the development process - I would have developed in an an environment secluded from the lives store.

    My concern however is after all of that, once I'm ready to connect the new files to the original db, and how it will play alongside the old files. Basically I'm wondering if there would be any conflicts, 2 stores 1 db.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Two Stores - One Database

    Yes, it is complicated. Yes there will be "issues" which you will need to sort out when merging two stores into one database, since you are making the system work in a way it wasn't originally designed.

    And as far as "going live" after doing upgrades and/or major code changes, you will want to have made REALLY GOOD notes about ALL the database changes and admin settings changes you made, so that you can "re-play" (or "redo" whatever you want to call it) them all again against the live database when you "go live" with your new code onto the live site.
    If you use an old copy of the database then you'll of course lose everything that happened between the date of the old database and 'today'.
    Discussed here, for example, in the context of upgrading: http://www.zen-cart.com/showthread.p...02#post1094802
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Mar 2009
    Posts
    169
    Plugin Contributions
    2

    Default Re: Two Stores - One Database

    Quote Originally Posted by DrByte View Post
    Yes, it is complicated. Yes there will be "issues" which you will need to sort out when merging two stores into one database, since you are making the system work in a way it wasn't originally designed.
    Thanks DrByte - perhaps it would be more safe to have 2 separate databases, that are only connected by the product prices, titles and descriptions then. I'm sure there's some way of doing this, I will do some Googling. Some sort of XML feed system should do the trick me thinks - would be a really cool solution if I could end up figuring it out.
    Last edited by yaseent; 22 Aug 2012 at 08:36 AM.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Merge two stores into one new one
    By supersnow in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 24 Nov 2010, 08:04 PM
  2. Two stores in one?
    By staypop in forum General Questions
    Replies: 6
    Last Post: 4 Oct 2009, 09:00 PM
  3. two stores on one db or two payment modules?
    By trillian in forum General Questions
    Replies: 7
    Last Post: 18 Nov 2008, 04:10 PM
  4. Can I Run Two Stores from One Database
    By adnimas5 in forum Installing on a Windows Server
    Replies: 8
    Last Post: 1 Feb 2007, 09:55 AM
  5. Two Stores One Database
    By Gkrynen in forum General Questions
    Replies: 2
    Last Post: 17 Jun 2006, 03:50 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