Shop Widget Instructions

The eBay Commerce Network Widget provides publishers with a pre-formatted shopping content module requiring little to no technical expertise.  Simply follow the steps below and content will be automatically included in your page.

1. Get started with our simple Widget Set-up Tool.

2. Paste the generated code in your web page(s).

3. (Optional) Advanced request parameters.

The eBay Commerce Network Widgets are not currently context sensitive (i.e. they don't automatically detect the content of your page), which  means you will need to define the search parameters manually.  You can either provide a static set of search parameters, or dynamically update these values based on user interactions (e.g. set the widget keyword to a keyword entered into your own sites search box by the user.) 

You must provide at least one search parameter, the options being keyword, categoryId, productId, or offerId. A fifth search parameter, 'attributeValue' may be combined with categoryId and/or keyword, but cannot be used on it's own.

Except for categoryId, you can provide multiple values for any of the search parameters in a single request, separated by double pipes ('||').  This allows you to show results for multiple products, offers, or keywords in the same result.  You can also provide multiple sets of values for any search parameter, which will cause the widget to rotate through those sets randomly for each new page view. 

See below for a few examples of different advanced request configurations.

Advanced Parameters

1. Show results for a single keyword

  1. sdcrequest.keyword = ["womens jeans"];  

2. Show results for a single category and  top products in a category

  1. sdcrequest.categoryId = ["7185"]; 
  2. // Top products by category across the network.
  3. sdcrequest.showTopProducts = "sdc" ;

3. Show results for a single keyword, category, attribute value combination

  1. sdcrequest.keyword = ["sony"];  
  2. sdcrequest.categoryId = ["7185"];  
  3. sdcrequest.attributeValue = ["ultra_compact"];  

4. Show results for a single product

  1. sdcrequest.productId = ["40940647"];  

5. Show results for a single offer

  1. sdcrequest.offerId = ["q_DA7Cut6RIpD486c4U2OQ=="];  

6. Show results for a single keyword and category, with multiple attribute values

  1. sdcrequest.keyword = ["red"];  
  2. sdcrequest.categoryId = ["31515"];  
  3. sdcrequest.attributeValue = ["ap_gender_age_women||dresses"];  

7. Show results for multiple products in the same response

  1. sdcrequest.productId = ["40940647||40741277"];  

8. Show results for multiple offers in the same response

  1. sdcrequest.offerId = ["q_DA7Cut6RIpD486c4U2OQ==||78MFZvt8rlWDaXIR0doseg=="];  

9. Rotate through results for multiple keywords

  1. sdcrequest.keyword = ["digital cameras""lcd tvs"];  

10. Rotate through results for multiple keyword, category and attributeValue combinations

  1. // The same set will be selected from keyword, categoryId, and attributeValue
  2. // when rotating, ensuring parameter combinations make sense.  In this example,
  3. // there are three distinct sets:
  4. // (keyword="red", categoryId="31515", attributeValue=ap_gender_age_women||dresses)
  5. // (keyword="", categoryId="96602, attributeValue="brand_nike")
  6. // (keyword="grey aviator", categoryId="22686", attributeValue="")

  7. sdcrequest.keyword = ["red", ,"grey aviator"];  
  8. sdcrequest.categoryId = ["31515""96602","22686"];  
  9. sdcrequest.attributeValue = ["ap_gender_age_women||dresses""brand_nike"];  

11. Rotate through results for multiple sets of products

  1. sdcrequest.productId = ["40940647||40741277""28328722||84828538"];  

12. Filter by items on sale or items with free shipping

  1. sdcrequest.showFreeShippingOnly = "1";
  2. sdcrequest.showOnSaleOnly = "1";

The above examples cover the most common cases.   Note that you can pass in any API request to the widget.  Reference the API use cases documentaton for more information.

 Back to Top

Display multiple eBay Commerce Network Widgets on the same page

Using the Widget Set-up Tool, you can generate the code for multiple placements to put on the same page.  However, you'll need to make some manual changes in order to make it work.

The standard element id is "sdcWidgetContent", so you'll need to change this id to a unique one.

For example:

<div id="sdcWidgetContentSkyscraper"></div>

You'll also need to update this function call with that unique id.

For example:


Back to Top


Additional Designs Templates

Along with the customizable four widget sizes provided in the Widget Set-up Tool, additional non-standard designs are available below:

designId: 'gallery'    suggested minimum height: 350    suggested minimum width: 640

designId: 'textlike'    suggested minimum height: 520    suggested minimum widght: 700


designId: 'listinglike'    suggested minimum height: 560    suggested minimum widght: 550

Back to Top