https://github.com/christopherpickering/eleventy-plugin-ebay-sync
https://github.com/christopherpickering/eleventy-plugin-ebay-sync
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/christopherpickering/eleventy-plugin-ebay-sync
- Owner: christopherpickering
- License: mit
- Created: 2022-12-30T12:49:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-27T15:49:31.000Z (about 3 years ago)
- Last Synced: 2025-02-14T05:34:02.783Z (over 1 year ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
eleventy-plugin-ebay-sync
An Eleventy plugin to sync products from your 11ty store to your eBay store.
## 🚀 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)