question

auctionrssfeed avatar image
0 Likes"
auctionrssfeed asked

Unable to use PictureURLLarge in findItemsAdvanced

I have tried everything I can think of to make this work, but only galleryURL seems to work (GalleryInfo works sorta, but the images are too big, and about 95 images are missing. if(isset($_POST['SellerID'])) { $s_endpoint = 'http://open.api.ebay.com/shopping'; // Shopping $f_endpoint = 'http://svcs.ebay.com/services/search/FindingService/v1'; // Finding $responseEncoding = 'XML'; // Format of the response $s_version = '667'; // Shopping API version number $f_version = '1.4.0'; // Finding API version number $appID = 'XXXXXXXXXX'; //replace this with your AppID $debug = true; $debug = (boolean) $_POST['Debug']; $str = preg_replace('#^https?://#', '', ($_POST['SellerID'])); //$str = str_replace('\\', '/', ($_POST['SellerID'])); $sellerID = urlencode (utf8_encode($str)); // cleanse input $globalID = urlencode (utf8_encode($_POST['GlobalID'])); $sitearray = array( 'EBAY-US' => '0', 'EBAY-ENCA' => '2', 'EBAY-GB' => '3', 'EBAY-AU' => '15', 'EBAY-DE' => '77', ); $siteID = $sitearray[$globalID]; $pageResults = ''; $pageResults .= getUserProfileResultsAsHTML($sellerID); $pageResults .= getFindItemsAdvancedResultsAsHTML($sellerID); A little later on.... function getFindItemsAdvancedResultsAsHTML($sellerID) { global $globalID, $f_endpoint, $responseEncoding, $f_version, $appID, $debug; $maxEntries = 100; $itemType = urlencode (utf8_encode($_POST['ItemType'])); $itemSort = urlencode (utf8_encode($_POST['ItemSort'])); $results = ''; // local to this function // Construct the FindItems call $apicall = "$f_endpoint?OPERATION-NAME=findItemsAdvanced" . "&version=$f_version" . "&GLOBAL-ID=$globalID" . "&SECURITY-APPNAME=$appID" // replace this with your AppID . "&RESPONSE-DATA-FORMAT=$responseEncoding" . "&itemFilter(0).name=Seller" . "&itemFilter(0).value=$sellerID" . "&itemFilter(1).name=ListingType" . "&itemFilter(1).value=$itemType" . "&outputSelector(0)=PictureURLLarge" . "&paginationInput.entriesPerPage=$maxEntries" . "&sortOrder=$itemSort" . "&affliate.networkId=9" // fill in your information in next 3 lines . "&affliate.trackingId=123456789" . "&affliate.customId=456"; if ($debug) { print " findItemsAdvanced call =
$apicall
"; } // Load the call and capture the document returned by the Finding API $resp = simplexml_load_file($apicall); // Check to see if the response was loaded, else print an error if ($resp->ack == "Success") { $results .= 'Total items : ' . $resp->paginationOutput->totalEntries . " "; $results .= ' ' . ""; $results .= " ImageTitlePriceTotal Price (Including Shipping)"; // If the response was loaded, parse it and build links foreach($resp->searchResult->item as $item) { if ($item->PictureURLLarge) { $picURL = $item->PictureURLLarge; } else { $picURL = $item->galleryURL; } Any ideas why I am unable to pull the larger images?
pictureurllarge
10 |600

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

helios825 avatar image
1 Like"
helios825 answered
First off, I always recommend using recent API version numbers. Usually it doesn't matter, but sometimes it does. So up your Finding API to 1.12.0 from 1.4.0 and eliminate that potential issue right off the bat. Also, it looks like you're not using the correct version parameter. Use this: &SERVICE-VERSION=1.12.0 ...not this: &version=1.4.0 You're missing this param: &SERVICE-NAME=FindingService Stick this in before your filters n' stuff: &REST-PAYLOAD Also, you don't really need to urlencode your GlobalID, nor UTF8 encode it either. Keep it simple and only urlencode if there'll be characters in there outside of a-z/0-9 and a few other common chars. Same with some of the other input parameters - tone it down on the encoding. (SellerID might need to be urlencoded.) Also, have a closer look [at the docs][1]. The input parameter for a large URL picture is: **PictureURLLarge** Looks like you've got that correct. But the output node is: **pictureURLLarge** And you're not capturing that in your code. It looks like you just need to drop the cap on those leading P's in your foreach loop. So, those are the things I'm noticing while I look through your code; I haven't tested any of it myself. 1 other thing, unrelated... Looks like you want to filter by ItemType. Know that you may need to specify several item types to get what you're seeking. See the [ListingType entry here][2]. [1]: http://developer.ebay.com/DevZone/finding/CallRef/findItemsAdvanced.html [2]: http://developer.ebay.com/DevZone/finding/CallRef/extra/fndItmsAdvncdRqst.tmFltr.nm.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.

auctionrssfeed avatar image
0 Likes"
auctionrssfeed answered
I appreciate it helios825. I updated &SERVICE-VERSION=1.12.0 And change the output to **pictureURLLarge** and everything is working correctly now. Thank you very much!
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.