Introduction to the eBay Selling Starter Kit

 

Alan Lewis
eBay

February 2006

Applies to:
   Microsoft ASP.NET 2.0
   Visual Web Developer 2005 Express Edition
   Visual Studio 2005

Summary: Learn how to get started with the eBay Selling Starter Kit, which is available as a free template for Visual Studio 2005 and Visual Web Developer 2005 Express Edition. (19 printed pages)

Contents

Introduction
Installing the Starter Kit
Setting Up the Database
Configuring the Project
Running the Application
Search Screen

Introduction

The eBay Selling Starter Kit is a project template that you can add to Visual Studio 2005 and Visual Web Developer 2005 Express Edition. The starter kit provides a pre-built ASP.NET application that you can use to list items for sale on eBay. It has screens for inventory maintenance, listing items, auction monitoring (shown in figure 1), application maintenance, and eBay search.

Click here for larger image

Figure 1. Auction Monitoring screen (Click on the image for a larger picture)

Creating a custom eBay listing application can be a daunting proposition, but by using the starter kit you can start with something that already works, and then change it to meet your requirements, rather than starting from scratch.

Installing the Starter Kit

The eBay Selling Starter Kit is provided as a Visual Studio Content Installer (.vsi) file. When you run this file you get the following screen:

Click here for larger image

Figure 2. VSI Installer Intro Page (Click on the image for a larger picture)

Click Next and you will get a Warning screen that says no signature has been found for the installer. VSI files can be digitally signed, but at the time of this writing the eBay Selling Starter Kit does not have a digital signature. Click Yes and you will proceed to the next screen.

Click here for larger image

Figure 3. VSI Installer Finish Page (Click on the image for a larger picture)

Click Finish and the Starter Kit will install. Click Close to exit the installer.

Once the Starter Kit is installed, it will appear as a new project template. In Visual Studio 2005 or Visual Web Developer 2005 Express Edition, select File-New-Web Site to bring up the following screen:

Click here for larger image

Figure 4. Creating a new Web site from the Starter Kit (Click on the image for a larger picture)

Click OK and the project will be created. Once you have created the project from the project template, you will need to perform some initial setup before using it.

Setting Up the Database

The Starter Kit requires a database to store both item inventory and eBay category information. By default, the Starter Kit is configured to use a local version of SQL Server Express, although you can easily change this to point to a version of SQL Server running elsewhere. With additional coding, you could also change it to use Access or some other database.

The project has a directory called DB Scripts that contains a batch file that you must run in order to create the database tables used by the project. From a Command Line, run the DB Scripts\buildeBayTraderDB.bat file. If you are not using a local version of SQL Server Express, you will need to edit this file first to point to your instance of SQL Server.

Configuring the Project

The eBay Selling Starter Kit uses eBay Web Services for the communication with eBay. The eBay Web Services allows applications to list items, search eBay listings, manage feedback, and much more. As a user of the Starter Kit, you do not need to understand the ins and outs of how eBay Web Services works, although in order to use the Starter Kit you will need to register as a member of the eBay Developers Program to gain access to eBay Web Services.

The web.config file contains the configuration information for the project. In order to fill in this configuration file, you will need to be a member of the eBay Developers Program, if you are not yet a member. Here are the steps you will need to take to become a member:

  1. Join the eBay Developers Program at http://developer.ebay.com/join. It's free to sign up, and after you complete the registration you will receive a set of Sandbox developer keys.

    The eBay Selling Starter Kit is set up by default to run in the eBay Sandbox environment. This environment is a testing environment for applications that use eBay Web Services, and it mirrors the production eBay site in terms of features and functionality. However, all the data in the testing environment, including user IDs and listings, are kept separate from the production environment, and users of the Sandbox are not charged any eBay fees for listing items.

    When you are ready to use an application that is based on the starter kit in the production eBay environment, you can go through the self-certification process to get production eBay Web service keys.

  2. Use the Sandbox Registration Tool to create a user in the Sandbox environment.

  3. Use the Authentication Token Tool to create an authentication token for the Sandbox environment. On the first page, enter the developer keys that you receive after signing up for the Developers Program. On the second page, enter the Sandbox user ID and password for the test user you created previously. After you enter this information, you are redirected back to a page that contains the authentication token for the test user.

    For security reasons, eBay Web Services uses tokens for authentication instead of the actual username and password.

Once you have this information, you are ready to set up the configuration file. Open the web.config file, and examine the appSettings section:

   <appSettings>
      <!--  eBay Specific elements -->
      <add key="eBayDevID" value="INSERT YOUR DEV ID"/>
      <add key="eBayAppID" value="INSERT YOU APP ID"/>
      <add key="eBayCertID" value="INSERT YOUR CERT ID"/>
      <add key="eBayAuthToken" value="INSERT YOUR TOKEN"/>
      <!-- change SoapApiServerUrl, PhotoServerURL and eBayViewItem to run out of sandbox or production -->
      <add key="SoapApiServerUrl" value="https://api.sandbox.ebay.com/wsapi" />
      <add key="PhotoServerURL" value="http://msa-e1.sandbox.ebay.com/ws/eBayISAPI.dll?EpsBasicApp&amp;com.ebay.presentation.ForceXmlDownload=true" />
      <add key="eBayViewItem" value="http://cgi.sandbox.ebay.com/ws/eBayISAPI.dll?ViewItem&amp;item=" />
      <!-- Database elements -->
      <add key="InventoryDBConnection" value="data source=INSERT YOUR SQL SERVER;initial catalog=eBayTrader;Integrated Security=true"/>
      <add key="ExceptionFile" value="INSERT YOUR EXCEPTION FILE HERE"/>
      <add key="SellerLocation" value="INSERT YOUR LOCATION" />
      <add key="SellerPayPalAddress" value="INSERT YOUR PAYPAL EMAIL ADDRESS" />
      <add key="LocalImageDirectory" value="INSERT YOUR IMAGE DIRECTORY HERE" />
   </appSettings>

Fill in the configuration settings as follows:

  • Put the developer keys and authentication token in the eBay Specific elements section.
  • Leave the URLs alone for now. When you use the application in production, you will need to remove the sandbox part of the URL in order for the application to work against the production eBay environment.
  • In the Database elements section, for InventoryDBConnection, replace INSERT YOUR SQL SERVER with the location of your SQL Server instance. If you are using the default, local version of SQL Server express, enter localhost\sqlexpress.
  • For ExceptionFile, enter a file location for the log file, such as C:\logs\eBayErrors.log.
  • For SellerLocation, enter your physical location, such as San Jose, California. This value is entered in the listings created with the application.
  • For SellerPayPalAddress, enter the e-mail address at which you accept PayPal payments. You can sign up for a PayPal account if you don't have one, or if you are just testing the application you can enter a fake address like test@example.com.
  • For LocalImageDirectory, enter a directory that can be used for temporary storage of uploaded images. Make sure that the directory location you enter actually exists, because the application will not create it for you.

As a final step, in Visual Studio, mark the inventory.aspx file as the Start Page by right-clicking the file and selecting Set As Start Page:

Aa479331.ebaystrtkt05(en-us,MSDN.10).gif

Figure 5. Setting the Start Page

That's it! Without too much hassle (hopefully) you are now ready to run the eBay Selling Starter Kit.

Running the Application

To run the application, select Debug -> Start Without Debugging:

Aa479331.ebaystrtkt06(en-us,MSDN.10).gif

Figure 6. Starting the application

When you start the application, you'll see this screen in your browser:

Click here for larger image

Figure 7. Startup screen (Click on the image for a larger picture)

The application has four main sections that correspond to the tabs on the top of the page:

  • Inventory Maintenance
  • Auction Maintenance
  • Application Maintenance
  • eBay Search

In the following sections we'll look at each of these sections.

Application Maintenance

When you start using the application, you must first use the Application Maintenance screen to synchronize your local database with the category information from eBay. Each eBay site (US, UK, Germany, and so on) has its own set of categories, and the category structure changes frequently in response to changes in the types of items that sellers are listing. Since there are many thousands of categories for each site, this information has to be stored locally by applications that use eBay Web Services in order to maintain reasonable performance.

Click Maintenance, and then click Categories to synchronize the category structure:

Click here for larger image

Figure 8. Synchronizing the Category structure (Click on the image for a larger picture)

This process takes a few minutes, after which you'll get a confirmation message that the synchronization is complete.

Inventory Maintenance

Click Inventory to load the Inventory Maintenance page. This page allows you to maintain a simple inventory from which item information can be used to create auctions. Using this page you can:

  • Add items to inventory.
  • Edit items in inventory.
  • Delete items from inventory.
  • Add an action for an item.

Inventory Maintenance Page

The Inventory Maintenance page (inventory.aspx) provides the functions for maintaining the local inventory of items.

Click here for larger image

Figure 9. Inventory maintenance (Click on the image for a larger picture)

From this screen, you can view the list of items in inventory, shown in the first column of the grid, and manage those items using the links in the second column of the grid.

  • To edit an existing item, click on the edit link.
  • To delete an existing item, click on the delete link.
  • To add an action for an item, click on the Add Action link.

You can add new items to inventory by clicking on the Add Item link above the grid.

Inventory Item Maintenance Page

The Inventory Item Maintenance page (ItemAdd.aspx) provides the details for an inventory item. If you select the Add Item link or edit link on the Inventory Maintenance screen, the Inventory Item Maintenance page is displayed, as shown in figure 10.

Aa479331.ebaystrtkt10(en-us,MSDN.10).gif

Figure 10. Inventory Item Maintenance Screen

You can then maintain the following information about the inventory item:

  • Name—Name of the item.
  • Code—A code to group similar items.
  • Description—Description of the item.
  • Qty in stock—Number of the items in stock.
  • Cost—Cost of the item.
  • Retail Price—Suggested price to buyers of the item, used as default auction price.
  • Status—Status of the item in inventory.
  • Category—eBay Category for the item.

Some of the values entered are used as defaults when an auction is created for the item.

Auction Management

The Auction Management functions let you create and track the sale of items on eBay. Using these functions you can:

  • Review all current and recent auctions.
  • Create a new auction.
  • Edit an auction.
  • Cancel an auction.
  • Monitor Feedback.
  • Leave Feedback.

Auction Management Page

The Auction Management page (Auctions.aspx) lets you see the status of current and recently completed auctions and provides options for managing those actions.

Click here for larger image

Figure 11. Auction Management Page (Click on the image for a larger picture)

From this screen, you can view basic information about the auctions. The grid contains the following information:

  • Item Number—Unique item number given to the item by eBay.
  • Title—Name of the item.
  • Action Status—Status of the auction.
  • Start Price—Starting action price.
  • Start Time—Starting time of the auction.
  • End Time—Ending time of the auction.
  • Highest Bid—Highest bid for the auction.

Also, the screen contains several links that let you access other auction management functions. You can create a new auction by clicking the New Auction link above the grid. You can also display an item on eBay by clicking on the Item Number link. Clicking on the item's Auction Status will bring up the Monitor Auction page.

Add/Edit Auction Pages

Adding a new auction or editing an existing auction is accomplished by stepping through three pages that gather description, image, and shipping information. If you access these pages through the Add Auction link on the Inventory Maintenance screen or the Edit Item link on the Monitor Auction Screen, certain fields on the three screens will be pre-filled with information from the inventory item or existing auction.

Add/Edit Auction Page 1 of 3-Description

The first page (add_item_1.aspx) lets the user enter information that describes the item being sold and the auction.

Click here for larger image

Figure 12. Add/Edit Auction Page 1 of 3 (Click on the image for a larger picture)

Add/Edit Auction Page 2 of 3-Images

The images page (add_item_2.aspx) lets the user associate images with the listing.

Click here for larger image

Figure 13. Add/Edit Auction Page 2 of 3 (Click on the image for a larger picture)

Add/Edit Auction Item Page 3 of 3-Shipping

On this shipping page (add_item_3.aspx), the item's shipping and payment information is entered. Once the user presses the finish button, the information will be used to create a new auction or, if editing an existing auction, update the existing auction.

Click here for larger image

Figure 14. Add/Edit Auction Page 3 of 3 (Click on the image for a larger picture)

Monitor Auction Page

The Monitor Auction page (MonitorAuction.aspx) provides information about a specific auction. It is accessible by clicking on the Auction Status link on the Auction Management page.

Click here for larger image

Figure 15. Monitor Auction Page (Click on the image for a larger picture)

The page displays the item, description, and the Bid history. From this page the user can also edit the auction item, cancel the auction, or manage the feedback related to the auction.

eBay Listing Page

At several places in the application, including the Auction Management page, the Monitor Action page, and the Search Results page, you can click on an item number link and see the eBay listing of that item. This listing is displayed in a separate window that pops up and shows the listing as it appears on eBay. An example is shown in figure 16.

Click here for larger image

Figure 16. The Item Page on eBay (Click on the image for a larger picture)

Feedback Page

On the Monitor Auction page, if an item is completed you are provided a link to the Feedback page (ManageFeedback.aspx). The Feedback page allows the user to see any feedback associated with the sale and leave feedback for the buyer. The screen is shown in figure 17.

Click here for larger image

Figure 17. Feedback Page (Click on the image for a larger picture)

The eBay Search functions allow the user to search eBay for particular items.

Search Screen

The Search Screen lets the user search the eBay system for items that match the specified criteria. As figure 18 shows, you can search for specific text, a price range, Buy It Now flag, and Seller ID. The text search will search both the item's title and description fields.

Aa479331.ebaystrtkt18(en-us,MSDN.10).gif

Figure 18. Search Entry Screen

The items matching the search criteria are displayed in a table, as shown in figure 19. Users can click the hyperlinked item number to see the complete listing in a pop-up window.

Click here for larger image

Figure 19. Search Results Page (Click on the image for a larger picture)

The search functionality in the application is very basic. One way to customize the application would be to integrate search in the listing process, so that a user could see the current prices of items similar to the one he or she wants to list.

You have now learned how to get started using the eBay Selling Starter Kit. A future article will discuss how to customize the application pages and code.

© Microsoft Corporation. All rights reserved.