PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Finding items

There are five available methods to search items:

  • findItemsByKeywords($keywords)

  • findItemsByProduct($productId)

  • findItemsByCategory($categoryId)

  • findItemsAdvanced($keywords)

  • findItemsInEbayStores($storeName)

Example 815. Many ways to find items

<?php
$finding  
= new Zend_Service_Ebay_Finding('my-app-id');
$response $finding->findItemsByKeywords('zend framework book');
foreach (
$response->searchResult->item as $item) {
    
$item->title;
    
$item->listingInfo->buyItNowPrice;
    
$item->listingInfo->viewItemURL;

    
// inner call, find for items of same current product
    // like $finding->findItemsByProduct($item->productId, $item->attributes('productId', 'type'))
    
$response2 $item->findItemsByProduct($finding);

    
// inner call, find for items of same store
    // like $finding->findItemsInEbayStores($item->storeInfo->storeName)
    
$response3 $item->storeInfo->findItems($finding);
}

Zend Framework