Dear Wix,
I am chasing some information to know of it is possible to have 2 wix websites (identical but with different users) that when data is entered into 1 the data is actually linked to the master data table on the other site.
We want to use a franchise model but centralise the data for research and analysis purpose
Regard
A very interesting subject, have been contemplating the same for quite a while. In short, I THINK it can be done. I stress that I have not implemented or even tried it, but I would go around it like this;
Assumptions
- we have n client sites and one master site. In your case, n=1
- master site holds ALL data (and later on, maybe, all interface components)
This means client sites can have their own URL, but retrieve/store all their data in Master Site. Your “linking” would thus be defined as one datastore, n clients.
I would investigate (which is a euphemism for horsing around) the following:
- use wix-http fi¡unctions to expose an API on Master Site for reading and writing data:
- use wix-fetch to access this API from client site
This would need some authentication, like an API key in a client backend module, to identify a valid client to the Master, but this is rather trivial.
A problem arises when you start to have more franchises, here, when n is no loner 1, but 5 or 6 or more. Wix is interface-centric. This means that is assumes an interface (a web page) and from that page you pull data inside, as opposed to “push”-models, where a server pushed data + interface towards the client (browser). The problem you would then run in to is that you have your front end code copied to 5 or 6 sites. 1 change in the source code means manual updating of the other ones, a nightmare, believe me. The only way I can now think of to get around this (future) problem is making separate sites (URL´s) without any logic, and than redirect everything that is db-related to the master site. This can be done with wix-location.
This would mean in human terms that a user sees on client site 1 in the address bar www.clientside1.com/aformtofillout immediately changing to www.mastersite.com/clientsite1/aformtofillout.
In short: if you only have 1 or 2 franchises, you might get away with duplicating interface and calling code, using an API on your Master site. If you envision more franchises and you envision congruency problems (I do) because every single client code change triggers a manual update across ALL other client sites, you would better be of with the redirect. This, of course, means that you no loner need to develop the API to store and retrieve data from/to another (Master) domain: all work would be done ON the Master domain, with the (maybe undesirable) side effect that the URL in the browser changes to another domain.
Does this make any sense at all?