5 min read • Updated a month ago
Use Wix Stores to manage Foxy products
As soon as you make the following changes, they will be live, so you may want to duplicate your Wix site and test or have Foxy already configured.
Step 1: Wix Website Editor setup
Product Page settings
1From your Wix Website Editor, go to the Product Page
2Click anywhere within the product section, and two options should show above your cursor
3Click the Settings button to go to the product page settings
4Click Settings from the side bar
5Scroll to the "Add to Cart" section
6For the "When button is clicked" setting, select the Stay in Product Page option
7Scroll to the "Buy Now" section
8For the "Show button" setting, toggle it off
Step 2: Add Foxy code snippets
There are two code snippets need to be added to your Wix website.
Foxy loader.js file
1From your Wix Dashboard, go to Settings > Custom Code (under Advanced)
2Click the Add Custom Code button at the top right
3From your Foxy Admin, go to Settings > Website & Products
4Copy the Foxy loader.js code snippet (other code snippets on the page are not needed for this tutorial)
5Go back to the Wix settings page, then paste the code from the previous step in the text box
6For the "Add Code to Pages" setting, select All pages and Load code once
7For the "Place Code in" setting, select Body - End
Foxy + Wix integration code
1From the same Custom Code settings page, click the Add Custom Code button again to add the second code snippet
2Copy the code snippet below and paste in the text box
<script src="https://foxy-integrations.netlify.app/foxy-wix.js"></script>
3For the "Add Code to Pages" setting, select All pages and Load code on each new page
4For the "Place Code in" setting, select Body - End
After finishing the steps above, you should be able to add products to Foxy cart by clicking the "Add to Cart" button on the product page.
Optional: Update product inventory with Make
1Open this link to the Make blueprint file: Make blueprint. On the file page, right click and choose Save As... from the menu to save the file on your computer
2Login Make and create a new scenario
3From the controls at the bottom, click the More button and choose Import Blueprint
4Choose the downloaded blueprint file and click Save
Update the Foxy New Transaction module
1Select the Foxy New Transaction module
2Click the Create a webhook button
3Give this webhook a name (ex: Foxy Transaction Webhook) and Save
4Click the Copy address to clipboard button
5From your Foxy admin, go to Settings > Integrations
6Click the Add webhook button under the Webhooks section
7Enter a name for this webhook (ex: Make)
8Select Transaction for the Resource setting
9Generate a Encrpytion key
10For the Endpoint field, paste the URL copied from Make
12We now need to feed a transaction to the webhook so it can be read by Make. Complete a transaction (test or live) on your store. This will send the data over to your Make webhook. (If you ever need to do that again in the future, you can go to the “transactions” section of the Foxy administration and expand a transaction. Under the “Webhooks” section of the transaction, check the box for your Make webhook and click the “Refeed selected webhooks” button.)
13Go back to Make, and you should see that Webhooks module has updated to show that it’s received the data.
Update the Search Wix Products module
2From the navigation bar at the top, toggle Build Apps and go to My Apps
3Click the Create New App button
4From the left sidebar, go to the Permissions page, then click the Add Permissions button
5Select Filter by category and choose Wix Stores from the dropdown
6Check the scope of Manage Products and Save
7From the left sidebar, go to the OAuth page
11Copy the App ID and App Secret Key
12Go back to Make, select the Search Wix Products module and click Create a connection
13Paste the App ID and App Secret from Step 11
15From the pop-up window, select your Wix site and Agree & Add the app
16Click OK to close the module
Update the Custom JS module
1Select the Custom JS module
2In the X-RapidAPI-Key field, use the test API key or follow this guide to get your own API key
Update the Update Wix Product Inventory module
1Select the Update Wix Product Inventory module
2Choose your Wix connection from the dropdown
Now you can complete a transaction from you Wix website. After completing the checkout, inventory in Wix should be updated.