Dropship

Vendor integration - Wix

If your vendor has a Wix account, Jetti can automatically sync products.

Last updated July 2nd, 2020

VIDEO TUTORIAL: How to generate the correct credentials needed for a Wix vendor integration

Share the video tutorial or this support article with your Shopify vendors to ensure they provide the correct credentials needed for the Shopify integration.

With Jetti, you can publish and automatically sync products between your Wix vendors and your store. Tracking details can be entered by the vendor through a dropship portal, as Wix doesn't currently allow orders to be synced. To learn more on how they view their orders from the dropship portal, read this.

Syncing with Wix Vendors

To enable the inventory feed sync, your Wix vendors will need to do the following from their end:

  1. Click on Edit Site from the main Wix dashboard menu.

  2. In the editor, turn on Dev mode by clicking it on the top bar.

  3. Now, on the menu on the left, click on the plus sign next to Backend > New js. File.

  4. Next, rename the new file to “http-functions.js”

If the file already exists, we recommend co-tagging a developer to ensure your current setup continues to operate as expected, as the file contents will need to be copied into the existing file.

  1. Copy paste the following code to the editor and click save and then publish.
import { notFound, ok, serverError } from 'wix-http-functions';
import wixData from 'wix-data';
import wixStores from 'wix-stores-backend';

export async function get_productsListing({ query }) {
    const options = {
        headers: {
            'Content-Type': 'application/json',
        },
    };

    const products = [];
    // Always get 100 items from first page i.e. skip 0, if query parameters are not set
    let [page, limit] = [0, 100];

    if (query) {
        page = query.page ? parseInt(query.page, 10) : page;
        limit = query.limit ? parseInt(query.limit, 10) : limit;
    }

    try {
        const result = await wixData.query('Stores/Products')
            .include('inventoryItem', 'variant')
            .skip(page * limit)
            .limit(limit)
            .find();

        for (const item of result.items) {
            // eslint-disable-next-line no-underscore-dangle
            item.mappedVariants = await wixStores.getProductVariants(item._id, {});
            products.push(item);
        }
    } catch (onRejected) {
        options.body = {
            error: onRejected.message,
        };
        return serverError(options);
    }

    options.body = {
        items: products,
        query,
    }
    return ok(options);
}
  1. Last step is to turn off Dev mode, and hit publish again.

That’s all from the vendor’s side! Once this is done, the Jetti user can then enter the script installation path in Jetti, which is the vendor's store URL, e.g. www.mysite.com. This will then enable the inventory sync, pulling in the product catalogue of the Wix vendor that can be published to the marketplace store, syncing product details, inventory, and pricing!

Troubleshooting errors

There are two main mistakes that we often see as the cause for a failed Wix feed in Jetti. If your Wix feed is not fetching products, or is giving an error, we recommend you get in touch with the vendor directly to verify the following:

  1. Ensure that the URL entered is correct. It should either be in the format of https://.wixsite.com// or https:///
  2. Ensure the file is named correctly. If it is not correctly named, Jetti is unable to access the product data from the store. If https://.wixsite.com//, you should be able to access: https://.wixsite.com//_functions/productsListing If https:///, you should be able to access: https:///_functions/productListing

If you have ensured both of the above, and the feed is still not loading as expected, kindly ask the vendor for screenshots of their backend, and forward them to support@jetti.io.

Back to Dropship