An open API service indexing awesome lists of open source software.

https://github.com/christopherpickering/eleventy-plugin-ebay-sync


https://github.com/christopherpickering/eleventy-plugin-ebay-sync

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

eleventy-plugin-ebay-sync

An Eleventy plugin to sync products from your 11ty store to your eBay store.


tweet
npm

## 🚀 Installation

Install from [npm](https://www.npmjs.com/package/eleventy-plugin-ebay-sync):

```bash
npm i -D eleventy-plugin-ebay-sync
```

## 😎 What does it do?

This plugin will sync products between your 11ty store and your eBay store each time your site is built.

## 🏃 Usage

Simply add a few additional properties to your product yaml front matter.

First, set some environment variables.

```bash
EBAYAPPID=
EBAYAPPSECRET=

# see https://developer.ebay.com/DevZone/merchandising/docs/Concepts/SiteIDToGlobalID.html
EBAYSITEID=eBayApi.SiteId.EBAY_US # default

EBAYMARKETPLACEID=eBayApi.MarketplaceId.EBAY_US # default

EBAYLANGUAGE=eBayApi.Locale.en_US # default

EBAYCONTENTLANGUAGE=eBayApi.ContentLanguage.en_US # default

EBAYSANDBOX=false # default
```

Next, import in your `.eleventy.js`:

```js
const ebaySync = require('eleventy-plugin-ebay-sync');

module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(ebaySync);
};
```

For example, on `product_1.md`:

```yaml
---
name: Product 1
price: $10
eBayPercentIncrease: 15 # increase base price by a % for ebay (optional)
eBayFixedIncrease: 10 # increase base price by a $ for eBay (optional)
eBayId: 1
# other required attributes?
```

## ⚙️ Details

This plugin uses the [`ebay-api`](https://hendt.gitbook.io/ebay-api/) package to keep things in sync with eBay.

Check out the [samples](https://github.com/christopherpickering/eleventy-plugin-ebay-sync/tree/master/sample) site, or clone and run locally with `npm test`.

## 🦘 Out in the Wild

- [the Bible House](https://bible.house)