I was hoping there would have been PHP example code for the database connectors. The only example code I could find are Wix’s prefab Node examples for Google’s AppEngine and Firestore.
I have searched high and low (maybe using the wrong search terms?) for a mySQL PHP connector I can use on my non-Wix site to talk to my organization’s Wix site.
I help with tech stuff for a dog rescue, and in updating some form stuff on Wix to talk to our in-house DB, I realized that the adoption coordinator has made about 400 static pages for dogs. Only 12-ish are ever active at a time, an on-Wix data collection is a great solution, but tying it into our own DB is 1000x better (though I bet I hit a wall with media slide shows translating).
Anyhow, if anyone has any pointers, in the mean time I’m going to be pulling the data from the 450 static pages and making sure it’s not throwaway, and is in our off-wit DB.
You won’t find any PHP in the Wix and Corvid resources. All of our code is Javascipt.
If you want to expose an API from your Wix site, see this example and the referenced resources: Expose and Access Site APIs
Use MyApi and MyApiClient to expose and access external APIs.
Here are some examples that use fetch to access third-party services:
Send Email with SendGrid REST Interface Send an email using the SendGrid REST API.
Stripe Payment Processing
Integrate the Stripe Payment processing system into a site. Three levels of user access are demonstrated: visitor, freemium (registered), and premium (paid).
Using the Places API from Google Map Services
Demonstrates geolocation queries using the Google Maps Places API web services. The queries are performed in backend (server-side) web modules.
The fetch API does not tie into collections, it allows you to interface with an external service/site. You will need to implement http-functions on your side as query endpoints for the fetch queries originating from your Wix site.
This example illustrates how to expose and consume an API:
Expose and Access Site APIs
Use MyApi and MyApiClient to expose and access external APIs.
Per your other comment, our shelter has a robust system I’ve hand-written for managing our dogs (and humans, for that matter.) I’m trying to make life easier for our volunteers by having dogs entered in one place and propagating to Wix.
I’ll see if there’s and latency doing this with fetch. I also will need to research how to make sure valid slugs are created for a page created dynamically from fetch content.