question

improveyourlife avatar image
0 Likes"
improveyourlife asked

How to get the quantity of a fixed product

I'm using this URL to get the details of a fixed price or auction style listing, the user enters itemId and the following looks for it $url = ' http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsAdvanced'; $url .= '&SERVICE-NAME=FindingService&SERVICE-VERSION=1.0.0&GLOBAL-ID=EBAY-GB'; $url .= '&SECURITY-APPNAME=' . $appid . '&RESPONSE-DATA-FORMAT=XML'; $url .='&keywords=' . $itemnumber; This does not work $url = ' http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=' . $appid . '&siteid=0&version=967&ItemID=' . $itemnumber . "IncludeSelector=Description,ItemSpecifics"; My problem is Quantity is not available for this service and i should use GetMultipleItems or GetSingleItem problem is I'm using this method to get the details from the itemId $itemid = (string) $item->itemId; $shipcost = (string) $item->shippingInfo->shippingServiceCost; $shippingType = (string) $item->shippingInfo->shippingType; $pricestr = (string) $item->sellingStatus->currentPrice; $reservepricestr = (string) $item->sellingStatus->reservePrice; $titlestr = (string) $item->title; $payment = (string) $item->paymentMethod; $urlstr = (string) $item->viewItemURL; $listingType =(string) $item->listingInfo->listingType; $bestoffer = (string) $item->listingInfo->bestOfferEnabled; $condition = (string) $item->condition->conditionDisplayName; $categoryName = (string) $item->primaryCategory->categoryName; $subtitle = (string) $item->subtitle; $postcode = (string) $item->postalCode; $city = (string) $item->location; $quantity = (string) $item->quantity; Is this information also available for GetSingleItem or not? its a lot of work to swap over
xml
10 |600 characters needed characters left characters exceeded

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

xiang.developersupport avatar image
0 Likes"
xiang.developersupport answered
Hi @improveyourlife I am sorry that I don't quite understand your problem description. Would you please recap your description? For example, reproduce steps, complete (exclude the secret info like token, key set) request and response,the current behavior (which is not expected) and the expected behavior. Best Regards,
10 |600 characters needed characters left characters exceeded

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

improveyourlife avatar image
0 Likes"
improveyourlife answered
Out the array i need to grab quantity from GetSingleItem same as i do for FindItemsAdvanced but what ever i do its null $payment = (string) $item->paymentMethod; According to the xml it should be $quantity = (string) $xml2->item->Quantity; //quantity is empty it should be 1 or above on my live auctions
10 |600 characters needed characters left characters exceeded

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

clickimusprime avatar image
0 Likes"
clickimusprime answered
Already explained that the output of the APIs is different. You can't use the same code to extract fields. XML is case sensitive and you seemed to be using case randomly regarding quantity. As pointed out in the other thread it's Item->Quantity. https://forums.developer.ebay.com/questions/24347/using-getsingleitem-with-simplexmlelement.html?page=2&pageSize=10&sort=votes#
10 |600 characters needed characters left characters exceeded

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.