Page 1 of 1

Multiple stores running off one (AC7) code base.

Posted: Wed Apr 23, 2008 2:34 pm
by jdk3388
We are looking to migrate our current 25 to 30 sites to AC7, but fear this might be a deal breaker.

Currently our stores (which are just url’s) point to one code base.

For example, http://companyA.server.com, http://companyB.server.com, http://companyc.server.com, etc... All point to the same code base made possible through DNS. In this one code base we get the company name from the URL to figure what database we need to use. This allows us not having to modify 30 different code bases but just one.

Is there any way that I could do this with AC7? Or anything like it? The licenses and how they work make me believe otherwise.

I would appreciate your thoughts and ideas. Thanks!
~Josh

Re: Multiple stores running off one (AC7) code base.

Posted: Wed Apr 23, 2008 11:51 pm
by AbleMods
AC7 does have the base functionality to run multiple stores on a single database instance, however the last I heard it wasn't tested and wouldn't be supported at this time. From what I've seen in the AC7 code, Able will most certainly be supporting it at some point.

But your situation is different - running a single instance of a .Net application that can dynamically connect all the data classes and methods to a variable data source. I'm unclear how that would be accomplished with any full .Net web application. Data classes and methods are dependent on a consistent data connection. While a data connection can be manipulated "on the fly", I would think IIS would be forced to recompile the entire .Net app each time so the data classes can be reattached to the data source.

Perhaps someone more knowledgeable would have a better answer for you.

Re: Multiple stores running off one (AC7) code base.

Posted: Thu Apr 24, 2008 2:36 pm
by shp.jc2
This answer is mostly based on AC 5.5 -- I'm assuming we didn't lose features with the upgrade.

If you want all the sites to use the same set of files and the same database, you just need to get additional licenses for that store and your set. Add them to the license and Able can help you do it. This means all stores use the same catalogue, same inventory and all orders would come through for the same site (unless you used affiliate codes within your sites).

[Of course, if you actually have some different designs (say banner graphics) you would have to do some additional work that you must already be doing.]

If you want them to point to different databases but use the same set of files (and I make this suggestion believing you're better off at that point having 30 copies of the files and a smart deployment script), you should just look for the place the SID is set within the code and put some conditional logic that looks at the host name in the request and adjusts the SID accordingly.

Re: Multiple stores running off one (AC7) code base.

Posted: Fri Apr 25, 2008 10:07 am
by jdk3388
Thanks for all the responses guys, I appreciate it. Over the last couple of days I managed to get my IIS/DNS setup so that I have multiple domains pointing to one location (code base). This was the easy part.

What I am struggling with now is trying to implement what shp.jc2 stated:
shp.jc2 wrote:If you want them to point to different databases but use the same set of files (and I make this suggestion believing you're better off at that point having 30 copies of the files and a smart deployment script), you should just look for the place the SID is set within the code and put some conditional logic that looks at the host name in the request and adjusts the SID accordingly.
I could use a smart deployment script as a last resort but would like to cover all bases first by trying to dynamically change the connection string (App_Data/database.config) somehow to reflect the database for the domain.

If anyone has any advice on how this could be easily implemented I would greatly appreciate. In the meantime I will keep you updated on my progress.

Thanks
~Josh

Re: Multiple stores running off one (AC7) code base.

Posted: Fri Apr 25, 2008 10:11 am
by shp.jc2
jdk

All Able stores will use the same database -- I was a little careless in my language.

Each table has a column indicating what store (store id -> SID) that row of data is for.

So you don't need to change the database connection string -- it's all going to the exact same place.

You just need to change which SID all queries will filter on.

Re: Multiple stores running off one (AC7) code base.

Posted: Mon Apr 28, 2008 11:18 am
by jdk3388
I see what you’re saying shp.jc2. That is a nice design feature... easier then what I thought. I have been trying to look to see where the default store ID is assigned to the token object but was unable to locate it.

Would I need to get the CommerceBuilder® API source to make this happen?

Re: Multiple stores running off one (AC7) code base.

Posted: Mon Apr 28, 2008 11:55 am
by shp.jc2
In 5.5, it's set in includes/storeid.aspx but I'm not sure about I'm not sure in 7.0