InfoSpace - Shopping
SDK Home | Client Side Results SDK - Home
Page last modified: 24 Apr 2017

Note: You have to implement the following steps in your site before your partner manager enables shopping for your segment.

IMPLEMENTATION STEPS

This documentation assumes you already have the search results page up and running on your site. If this is not the case, please refer to the implementation page.


THE SHOPPING VERTICAL AND THE DETAILS PAGE

There are two types of results that are returned within the shopping vertical. These two types are offer results and product results. Offer results link directly to the merchants website. Product results provide more detailed information about the product and have multiple sellers that are offering this product. Because of this, we have created a product details page that will need to be implemented in your site.

Product Details URL Format

You will need to create a shopping section in the doSearch() call on all your pages. In this section you will need to include the productDetailsUrlFormat. This will allow CSR to correctly generate product details page URLs that point to your servers.

This is an example of the shopping section with the product details page format.

shopping: 
{
    productDetailsUrlFormat: 'http://localhost:6676/ProductDetails.aspx',
}

Creating the product details page

This page will look similar to the search results page, but it will be less complex.

Below is an example of what the doSearch() method might look like:

<script type="text/javascript">
    insp.search.doSearch({
        category: 'shopping',
        signature: '<%: Signature %>',
        accessId: 'Site.Segment',
        containers: {
            'main': { id: 'main'}
        },
        shopping: {
            productDetailsUrlFormat: 'http://localhost:6676/ProductDetails.aspx',
        },
        onComplete: handleOnComplete,
        onError: handleOnError,
        sort: '<%= SortBy %>'
    });
</script>

Note: You will have to regenerate the signature on the product details page because this page does not have a query term. This also means you will have to recalculate the timestamp.

Sorting options

You can sort the shopping search results by the following categories if you pass in one of them into the Sort property of the doSearch call.

Term Description
NotSpecified This is the default and based on the maximized yield.
Relevance A score calculated by the eBay Commerce Network search engine to indicate how well the result relates to the search criteria.
Price The total price of the offer in descending order. (base price if total price isn't available.)
Price/asc The total price of the offer in ascending order. (base price if total price isn't available.)
Rating The average rating (between 0 and 5) of the product.

Note: Sorting will be disabled if multiple shopping content sources are enabled for your segment. You can check to see if this is true in your site by examining the "sortingForbidden" value in the details array of the callback.

SHOPPING IN THE WEB VERTICAL

If you would like to have shopping results returned with your web results, add the supplemental shopping container to the list of containers in the doSearch call of the search results page.

'supplementalshopping' : { id: 'supplementalshopping' }

Note: Your partner manager will have to configure your segments for universal shopping so shopping results will come back with the web results. Also note that you will have to enable the shopping vertical and details page above to be able to receive shopping results in the web vertical.

Deals

IMPLEMENTATION STEPS

Deals/Coupons can easily be added to your shopping experience. These steps assume you already have shopping set up and working.

DEALS IN THE SHOPPING OR WEB VERTICAL

If you would like to have deal results returned with your shopping or web results, add the deals container to the list of containers in the doSearch call of the search results page.

'shoppingdeals': { id: 'shoppingDeals' }

Note: Your partner manager will have to enable deals results on either the web or shopping vertical for your segment before you will be able to receive deals results.