Synchronize availability of products

Hey, we looking for a solution to synchronize the availability of products in two different shops. Is here anybody how knows how it works?

Thanks a lot.

Oggi :wink:

What does mean → in 2 different shops ← exactly ?

1-wix-shop + 1-extern site-shop ? ? ?

Maybe you want first decsribe a little bit more your issue?

no, 2 wix shops

First let’s make things clear.

Your two shops are running on the same domain/site?
I never tried to create 2-shops on the same site, so i even can’t tell if this is possible, since you are installing Wix-Stores-App on your site just once as i know.

So i assume you have two different wix-sites and on both you are running a shop?

And now you want to suncronize? Right?

If so, you will have to use wix-fetch i think, and also you will have to create a HTTP-ENDPIONT on the site where you want to get data from.

About http-endpoints… (here you can learn how to create HTTP-ENDPOINTS)

Hey Velo Ninja, thanks a lot.

We have a shop for b2b and one for the b2c. Same products, different prices. Now we want to save ourselves the work and always set the products to available or unavailable in both shops. In other words, if we set it to unavailable in B2C, we want it to be unavailable in B2B as well. 2 different Shops, 2 different domains, but same products.

Then i think my provided link/example should help you out.

With the help of HTTP-ENDPOINTS and Wix-Fetch you can generate your wished function which would make communication (request-response-principe) possible between your 2-shops.

Everytime something has been changed in one of the shops → starting SYNC-FUNCTION to synchronize both of shop-items / data.

Hey Dima, Thanks a lot.
I have a question. Is it important that the products are the same in both shops? Or what if there are 10 products in shop A and 12 in shop b?

Generaly it doesn’t matter, because you would have to generate a function which would be able to check and do the sync automaticaly.

  1. First you generate an HTTP-ENDPOINT on SITE-B, like described in the link above

  2. Then you generate a HTTP-FUNCTION/Fetch-function on SITE-A, which would get all the data from the generated HTTP-ENDPOINT of SITE-B.

  3. Let’s say you have completed CHECKPOINT (1+2), and you got your data from SITE-B to be able to start your check&Sync-function to make the comparisson and investigate for updated/changed data.


//--> once you got your data
let recievedData = //declaring your recieved data into a variable

//--> starting the check&sync function....
checkAndSync(recievedData)

function checkAndSync(recievedData) {
	//write your check and sync function here
	//write what has to be done now by this function to update your DATABASE on SITE-A
}

Do the same one more time vice-versa, to be able to sync & update DATABASE-DATA on SITE-B