Display eBay categories in AJAX.
This code is meant as an example for you to incorporate into your application. So, you will most-likely be taking the HTML & PHP code that is within here and editing it as needed and putting it into your own format.
Author: Thomas Deliduka
License: Lesser GNU General Public License (LGPL)
How to Run This Code
- Download the code.
The table.sql file contains the structure of the table that is used in the code. If you are an eBay developer, you should already have your own system for gathering the category information from eBay and putting it into a local format.
This code relies on the information being within a MySQL database. If your table structure is different, edit your SQL statements to follow your table's structure.
Note: An API to download the category listings into the table is not included in this code.
- Download the latest file from the Xajax project. It should be named xajax.inc.php. Put it in either your PHP code path or somewhere where you can include it in your code.
- Edit ebaycats.php and put in your own database connection information at the top. Optionally, you can edit the SQL statements to connect to your own table.
- Upload it to your server where you can connect to a database and then execute!
Key sections of code
- The PHP code at the top of ebaycats.php, this contains the xajax object calls and the fuction which will be executed when category boxes are called.
- The HTML form which has the table and the first box defined as well as the final category field. That is the field that will contain the number of the category to be passed through the XML or SOAP API for that ebay listing.