BM eBay Feed - A Craft CMS plugin

EASY INSTALLATION, SIMPLE DOCUMENTATION

BUY NOW

BM EBAY FEED

Pull an eBay store's realtime item feed into your Craft site with no hassle.

ADD IT TO YOUR SITE IN SECONDS

Installing our plugin is as easy as...

  • 1

    Get

    After downloading the free plugin, download the zip.

  • 2

    Move

    Move the unzipped plugin to the craft/plugin folder

  • 3

    Enable

    Navigate to the plugins section in the Craft admin settings, then click "Install"

1. Configure plugin

Navigate to your sites plugin listing in the craft admin panel, eg:

http://www.example.com/admin/settings/plugins

Click the plugin name "Ebay Feed" to access the plugins control panel:

You will need to configure the following values:
  • Ebay API App ID - You will need to register for a developer account and create an application, in order to generate this
  • Ebay Store Name - This needs to be the exact name of the store
  • Items Per Page - How many items you wish to output per page

2. Output eBay Feed store items

To access your ebay feed items, you will need to pass the feed page number to your template.

This can be achieved by setting up a new route that passes the page number (number) to your template, like so:

Inside the template, we will use this page number (number) to retrieve the correct page in the ebay feed.

First we check to ensure we have actually been passed a number. If there is no number, then we will assume page number 1.

{% if number is not defined %}
    {%set number = 1 %}
{% else %}

We then pass this number to the getEbayFeed method (which is a twig extension built into the plugin):

{% set ebayFeed = number|getEbayFeed %}

To loop through our feed items, simply add the following to your template:

{% for item in ebayFeed.storeItems %}
    <li>
        <img src={{ item.thumb }}">
        <a href={{ item.link }}">
            <span>{{ item.title }}</span>
        </a>
        <span>{{ item.price }}</span>
    </li>
{% endfor %}

Within this loop you can access the following ebay feed item properties:
  • item.id - The item ID. [type: integer]
  • item.title - The title. [type: string]
  • item.price - The price. [type: string]
  • item.thumb - The thumbnail url. [type: string]
  • item.link - The eBay link. [type: string]
  • item.location - The product's location. [type: string]
  • item.country - The product's country. [type: string]
  • item.returnsAccepted - Whether returns are accepted or not. [type: string]
  • item.condition - The product's condition. [type: string]
  • item.bestOfferEnabled - Is Best Offer enabled. [type: boolean]
  • item.buyItNowAvailable - Is Buy It Now enabled. [type: boolean]
  • item.startTime - The auction start datetime. [type: datetime]
  • item.endTime - The auction end datetime. [type: datetime]
  • item.listingType - Listing type. [type: string]
  • item.shippingType - Shipping type. [type: array]
  • item.shipToLocations - Ship to locations. [type: array]

3. Output pagination links

To add pagination links to your template, simply add the following:

{% if ebayFeed.showPrevious %}
    <a href="/store/{{ number - 1 }}">Previous</a>
{% endif %}

{% if ebayFeed.showNext %}
    <a href="/store/{{ number + 1 }}">Next</a>
{% endif %}
WHERE CAN I GET IT?

YOU'VE COME TO THE RIGHT PLACE

BUY NOW

FAQ

  • 1. Does this plugin require that I have an eBay developer account?
    Yes, and you must also register and application, in order to provide an App ID.

SUPPORT

  • Need help setting up?...
  • Would you like to see a new feature added?...
  • Found a bug?...

...please feel free to get in touch with us, we'd love to hear from you!

BESPOKE PLUGIN DEVELOPMENT

If you have an idea for a plugin and want to see it come to fruition, contact our team to see how we can help.