Print Search
Content Actions
Wiki Search
Random Art
Update
 
(XML Parsing Logic)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
== XML Parsing Logic ==
+
__TOC__
  
 +
 +
== Trouble Shooting ==
 +
 +
=== Source Code ===
 +
 +
www/lib/ebay/ebaylib.php
 +
maintenance/update_esales.php
 +
 +
==== Scheduler ====
 +
 +
It is automated through the cron.  When debugging, please comment out the following line.
 +
*/2 * * * * /usr/local/bin/php /home/expresso/maintenance/update_esales.php
 +
 +
 +
=== Test Page ===
 +
 +
http://www.expressobeans.com/lib/ebay/test.php
 +
 +
=== Fixing Broken Listings ===
 +
 +
The automated process will evaluate all items in Sales that have the ''recheck'' set to 1.  To recheck an item, issue the query:
 +
 +
update Sales set recheck=1 where ebayid='555555555555';
 +
 +
== XML Parsing Logic ==
  
 
=== Stage 1:  GetItemRequest ===
 
=== Stage 1:  GetItemRequest ===
Line 19: Line 44:
 
::: else
 
::: else
 
:::: ''price'' =  '''Item->SellingStatus->ConvertedCurrentPrice'''
 
:::: ''price'' =  '''Item->SellingStatus->ConvertedCurrentPrice'''
 +
::: if ''ended''
 +
:::: if sold > 0
 +
::::: ''result'' = 1 // sold
 +
:::: else if ''bids'' > 0
 +
::::: if ''reserveMet''
 +
:::::: ''result'' = 1 // sold
 +
::::: else
 +
:::::: ''result'' = 2 // reserve not met
 +
:::: else
 +
::::: ''result'' = 3 // ended with no bids
 +
::: else
 +
:::: ''result'' = 5 // still pending
 +
::: if ''result'' = 1
 +
:::: Jump to [[EB:EbayLib#Stage_2:__GetAllBiddersRequest|Stage 2]]
  
 
=== Stage 2:  GetAllBiddersRequest ===
 
=== Stage 2:  GetAllBiddersRequest ===
Line 26: Line 65:
 
::: ''price'' =  '''HighestBid'''
 
::: ''price'' =  '''HighestBid'''
 
:: else
 
:: else
::: ''price'' = '''BidArray -> Offer[0] -> HighestBid'''
+
::: ''price'' = '''BidArray -> Offer[0] -> HighestBid -> ConvertedPrice'''

Latest revision as of 09:30, 30 August 2008


Trouble Shooting

Source Code

www/lib/ebay/ebaylib.php
maintenance/update_esales.php

Scheduler

It is automated through the cron. When debugging, please comment out the following line.

*/2 * * * * /usr/local/bin/php /home/expresso/maintenance/update_esales.php 


Test Page

http://www.expressobeans.com/lib/ebay/test.php

Fixing Broken Listings

The automated process will evaluate all items in Sales that have the recheck set to 1. To recheck an item, issue the query:

update Sales set recheck=1 where ebayid='555555555555';

XML Parsing Logic

Stage 1: GetItemRequest

if Item exist
if Item->ListingDetails exsts
date = Item->ListingDetails->EndTime
if Item->SellingStatus exsts
reserveMet = Item->SellingStatus->ReserveMet
bids = Item->SellingStatus->BidCount
sold = Item->SellingStatus->QuantitySold
if Item->SellingStatus->ListingStatus == "Active"
ended = FALSE
else
ended = TRUE
if Item->SellingStatus->CurrentPrice.currency == "USD"
price = Item->SellingStatus->CurrentPrice
else
price = Item->SellingStatus->ConvertedCurrentPrice
if ended
if sold > 0
result = 1 // sold
else if bids > 0
if reserveMet
result = 1 // sold
else
result = 2 // reserve not met
else
result = 3 // ended with no bids
else
result = 5 // still pending
if result = 1
Jump to Stage 2

Stage 2: GetAllBiddersRequest

if HighestBid exists
if HighestBid.currency == "USD"
price = HighestBid
else
price = BidArray -> Offer[0] -> HighestBid -> ConvertedPrice