question

$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ Suspended asked

Stuck.....can't figure this out

Hello,

 

I am writing a small program for someone to get all the items out of their ebay store and into their website store. Here is the steps I am using

 

The call to simplexml_load_file($itemcall) is failing..

 

How come I can not look up this ebay item? I need to get all the image locations, shipping information, etc for that specific item

 

 

$pageNum++;

                $resp = simplexml_load_file($apicall);

                if($resp->ack == "Success"){

                        foreach($resp->searchResult->item as $item){

                                $i++;

                                echo $item->title."\n";

                                $itemId = $item->itemId;

                                echo $itemId;

                                echo "item count = $i\n";

                                $itemcall = "$endpoint?";

                                $itemcall .= "OPERATION-NAME=findItemsByProduct";

                                $itemcall .= "&SERVICE-VERSION=$version";

                                $itemcall .= "&SECURITY-APPNAME=$appid";

                                $itemcall .= "&GLOBAL-ID=$globalid";

                                $itemcall .= "&itemId=$itemId";

 

                                $itemResp = simplexml_load_file($itemcall);

                                if($itemResp->ack == "Success"){

 

finditemsbyproductitemid
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
helios825 avatar image
0 Likes"
helios825 answered

I always recommend to folks new to the eBay API to try and build their read-only API calls in Notepad/Word/BBedit first and paste them into the browser, altering parameters as necessary until get get what they want.

From there, you can see how the calls work, and better plan your algorithmic approach to scripting/programming the larger solution.

If you're seeking info on specific items, I recommend using the API call GetSingleItem instead of findItemsbyProduct:

http://developer.ebay.com/DevZone/shopping/docs/CallRef/GetSingleItem.html

You may also consider using findItemsIneBayStores since you're trying to pull data on a specific store:

http://developer.ebay.com/DevZone/finding/CallRef/findItemsIneBayStores.html

10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.