Sample code for adding to a non-US site. This example is for Australia, but illustrates general differences.
Detailed Description
The PHP 5
samples include a simple AddItem.php example. The AddItem.php
file (along with a couple helper files) can be used to list simple
items to the eBay sandbox (or production) sites.
The PHP 5 sample bundle works "out-of-the-box" for the US site (site
0). Most files in the samples bundle will work for other sites
(ex. ebay.de = site 77) by simply changing the SiteID variable.
However, AddItem requires a number of site-specific settings, even in a
simple case. This article details some of the differences.
Site or country $siteID = 15; <Site>Australia</Site>
<Country>AU</Country>
Category structure
The category structure differs from site to site. The category
numbers associated with listings for a given site can be seen from http://listings.ebay.com (or http://listings.ebay.com.au
etc.) and selecting "Show category numbers". They can be obtained
through the API with the GetCategories
call.
Currency <BuyItNowPrice currencyID=AUD>
<Currency>AUD</Currency>
Shipping The AddItem.php sample does not address shipping; however, in
general shipping is country (site) specific.
Sandbox site URL Please adjust the sandbox (or production URL) as needed.
Here is the list of
international sandbox sites. $linkBase =
"http://cgi.sandbox.ebay.com.au/ws/eBayISAPI.dll?ViewItem&item=";
Other considerations
Cross-site (and cross-border) listing is a common and complex
issue. eBay
Sites and Special Areas is one place to see how to handle this
situation.
Attachments Attached to this article are PHP 5 files including the original
AddItem code for the US site (SiteID = 0 = ebay.com) and modified code
for Australia (SiteID = 15 = ebay.com.au).