/** * @return GetSellerListResponseType * @param GetSellerListRequestType $request */ function GetSellerList($request) { $request->setVersion(EBAY_WSDL_VERSION); return $this->call('GetSellerList', $request); }
public function retrieveSellerSurveyList($params) { $this->session->setRequestToken($params['AuthToken']); $xebayuser_id = $params['xeBayUserID']; $bean = BeanFactory::getBean('xeBaySellerSurveys'); $GLOBALS['db']->query("DELETE FROM xebaysellersurveys WHERE xebaysellersurveys.xebayuser_id ='{$params['xeBayUserID']}'"); $outputSelector = array('HasMoreItems', 'ItemArray.Item.BuyItNowPrice', 'ItemArray.Item.ItemID', 'ItemArray.Item.ListingDetails.ConvertedStartPrice', 'ItemArray.Item.ListingDetails.StartTime', 'ItemArray.Item.ListingDetails.EndTime', 'ItemArray.Item.ListingDetails.ViewItemURL', 'ItemArray.Item.ListingType', 'ItemArray.Item.PictureDetails.PictureURL', 'ItemArray.Item.PrimaryCategory', 'ItemArray.Item.Quantity', 'ItemArray.Item.SellingStatus.QuantitySold', 'ItemArray.Item.StartPrice', 'ItemArray.Item.Title', 'Seller.UserID', 'ItemsPerPage', 'PageNumber', 'ReturnedItemCountActual'); $req = new GetSellerListRequestType(); $req->setDetailLevel('ReturnAll'); $req->setEndTimeFrom($params['EndTimeFrom']); $req->setEndTimeTo($params['EndTimeTo']); $req->setUserID($params['UserID']); $req->setOutputSelector($outputSelector); $pagination = new PaginationType(); $pagination->setEntriesPerPage(200); $pageNumber = 1; $returnedItemCountActual = 0; $hasMoreItems = false; do { $pagination->setPageNumber($pageNumber++); $req->setPagination($pagination); $res = $this->proxy->GetSellerList($req); if ($this->testValid($res)) { $hasMoreItems = $res->getHasMoreItems(); $returnedItemCountActual += $res->getReturnedItemCountActual(); $userID = $res->getSeller()->getUserID(); $itemArray = $res->getItemArray(); if (empty($itemArray)) { break; } foreach ($itemArray as &$item) { $bean->listing_type = $item->getListingType(); $listingType = $item->getListingType(); if ($listingType != 'FixedPriceItem' && $listingType != 'StoresFixedPrice') { continue; } $bean->quantitysold = $item->getSellingStatus()->getQuantitySold(); // if ($bean->quantitysold == 0) // continue; $bean->buyitnowprice = $item->getBuyItNowPrice()->getTypeValue(); $bean->buyitnowprice_currencyid = $item->getBuyItNowPrice()->getTypeAttribute('currencyID'); $bean->itemid = $item->getItemID(); $bean->convertedstartprice = $item->getListingDetails()->getConvertedStartPrice()->getTypeValue(); $bean->convertedstartprice_currencyid = $item->getListingDetails()->getConvertedStartPrice()->getTypeAttribute('currencyID'); $bean->starttime = $item->getListingDetails()->getStartTime(); $bean->endtime = $item->getListingDetails()->getEndTime(); $bean->viewitemurl = $item->getListingDetails()->getViewItemURL(); $bean->picturedetails = $this->fill_picture_details($item); $bean->categoryid = $item->getPrimaryCategory()->getCategoryID(); $bean->categoryname = $item->getPrimaryCategory()->getCategoryName(); $bean->quantity = $item->getQuantity(); $bean->quantitysold_permonth = $bean->quantitysold * 30 / ((time() - strtotime($bean->starttime)) / (60 * 60 * 24)); $bean->startprice = $item->getStartPrice()->getTypeValue(); $bean->startprice_currencyid = $item->getStartPrice()->getTypeAttribute('currencyID'); $bean->name = $item->getTitle(); $bean->xebayuser_id = $xebayuser_id; $bean->id = create_guid(); $bean->new_with_id = true; $bean->save(); } } else { $this->dumpObject($res); return false; } } while ($hasMoreItems); return $returnedItemCountActual; }