* Sort the results by current price. */ $request->sortOrder = 'CurrentPriceHighest'; /** * Limit the results to 10 items per page and start at page 1. */ $request->paginationInput = new Types\PaginationInput(); $request->paginationInput->entriesPerPage = 10; $request->paginationInput->pageNumber = 1; /** * Send the request to the findItemsByProduct service operation. * * For more information about calling a service operation, see: * http://devbay.net/sdk/guides/getting-started/#service-operation */ $response = $service->findItemsByProduct($request); if (isset($response->errorMessage)) { foreach ($response->errorMessage->error as $error) { printf("%s: %s\n\n", $error->severity === Enums\ErrorSeverity::C_ERROR ? 'Error' : 'Warning', $error->message); } } /** * Output the result of the search. * * For more information about working with the service response object, see: * http://devbay.net/sdk/guides/getting-started/#response-object */ printf("%s items found over %s pages.\n\n", $response->paginationOutput->totalEntries, $response->paginationOutput->totalPages); echo "==================\nResults for page 1\n==================\n"; if ($response->ack !== 'Failure') { foreach ($response->searchResult->item as $item) {