Jump to content

hungryfrank

Members
  • Content Count

    24
  • Joined

  • Last visited

Everything posted by hungryfrank

  1. i am having a problem parsing the file that ebay returns for error codes $results = new SimpleXMLElement($responseXml); if ( $results->Errors != null ) foreach ($results->Errors as $key => $value) { $longMsg =$results->Errors->LongMessage; $shortMsg = $results->Errors->ShortMessage; $code = $results->Errors->ErrorCode; echo '<P>' . $code . ' : ' . str_replace( ">", ">", str_replace( "<", "<", $shortMsg ) ); if ( $longMsg != '' ) echo '<BR>' . str_replace( ">", ">", str_replace( "<", "<", $longMsg ) ); } echo "<br>"; } but i get the same entery repeated again. here is XML file SimpleXMLElement Object ( [Timestamp] => 2017-08-03T19:38:29.478Z [Ack] => Warning [Errors] => Array ( [0] => SimpleXMLElement Object ( [ShortMessage] => Unrecognized element <ActiveList.EntriesPerPage> in request message. [LongMessage] => The element <ActiveList.EntriesPerPage> was found in the input request message. This is not a declared element in the schema and will be ignored. [ErrorCode] => 21927 [SeverityCode] => Warning [ErrorParameters] => SimpleXMLElement Object ( [@attributes] => Array ( [ParamID] => 0 ) [Value] => ActiveList.EntriesPerPage ) [ErrorClassification] => RequestError ) [1] => SimpleXMLElement Object ( [ShortMessage] => Unrecognized element <ActiveList.PageNumber> in request message. [LongMessage] => The element <ActiveList.PageNumber> was found in the input request message. This is not a declared element in the schema and will be ignored. [ErrorCode] => 21927 [SeverityCode] => Warning [ErrorParameters] => SimpleXMLElement Object ( [@attributes] => Array ( [ParamID] => 0 ) [Value] => ActiveList.PageNumber ) [ErrorClassification] => RequestError ) )
  2. i have this code that enters the values of an array into my db foreach ($results->CategoryArray->Category as $key => $value) { $categories_ids = (int) $value->CategoryID; $CategoryName=$value->CategoryName; if(strcmp($first_name,$CategoryName) <0)$firstID=(int) $value->CategoryID; /// other codes to enter in db } echo $firstID i want to get the value of $categories_ids when the $CategoryName is alphabetically first. but it don't work. i always get the last value of the last one in the array.
  3. thanks. sometimes i get so involved with what i want to do that can't see what is right infront of me my apologise
  4. i didnot want to change the order confirmation page. i wanted to do this in the checkout success page which is just an information page as to what customer has bought. it comes after order confirmation page. the customer has not bought anything in order confirmation page so it would be stupid,regardless of legality issues. newbie doesn't mean stupid or illogical.
  5. the point is minimizing the situation. ebay sends you a notification when an item is sold. based on that notification the stock in the store is reduced. i want to reduce the stock on ebay when an item is sold. there is nothing illegal about that. i can just include the call on ebay in the file. but i want to do this in the background. i don't see what would be illegal about that either. it is totally logical. Instead of a cron doing it, it gets done as soon as a purchase is made. It is more accurate than some predetermined cron.
  6. i don't want to use cron for this, because it can create situations in between crons. if i do this when the purchase is made then there will be no risk of selling an outof stock item on ebay. i will also use ebay notification to adjust the quantity on the store. and finally a cron for the double check just incase. sorry about the confusion i have created
  7. this is an actual problem. here is the situation. customer on the website purchases a product. or multiple products. i will have the order that customer places on the last page presented to the customer. i want to communicate with ebay and change the quantity of the ebay items that are associated with this products at this time. there could be a few api calls. which i don't know how long it will take. i want this last page to load and don't have to wait for my api calls. and the api calls to be done in background
  8. thanks for your response. the first file invoves interaction with the visitor. it involves them completing their purchase in the online store. the second file is just communication with ebay. it is to change quantity of the listing based on the customer purchase. this file gets the order# from the first page before it actually loads. the order id is already created before this page so it is available at the beginning of this page. what i want to do is to not disturb the load time of the first page and start the ebay stuff in parallel. if there is a lock.is there a way to overcome this? is there a better way?
  9. am i correct to assume a- having an fopen of a second file does not effect the process of the primary page if i do not want to use result of the second file? b-opening the second page does not effect the load time of the first page c-if the visitor of the first page closes it the second process will continue to run.
  10. i have an oscommerce site. i want to run a script in the background when the visitor completes his shopping to adjust the quantities of the ebay listings without being effected by his actions. i was thinking of somehow triggering the ebay script in parallel of the last page or start at somepoint in that page. can this be done and any help would be nice
  11. i am getting a syntax error in dreamweaver when i use this code because of blank space. $xml = simplexml_load_string($responseXml); foreach ($xml->Fees as $mes) { $name= $mes->fee->name ; $fee=$mes->fee->Fee currencyID="USD"; if ($name=='ListingFee')$listingfee=$mes->fee->Fee currencyID="USD"; } i am trying to get the listingfee from this <AddItemResponse xmlns="urn:ebay:apis:eBLBaseComponents"> <Timestamp>2016-02-16T18:52:41.543Z</Timestamp> <Ack>Success</Ack> <Version>967</Version> <Build>E967_CORE_BUNDLED_10639415_R1</Build> <ItemID>110043671232</ItemID> <StartTime>2016-02-16T18:52:41.027Z</StartTime> <EndTime>2016-02-23T18:52:41.027Z</EndTime> <Fees> <Fee> <Name>AuctionLengthFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>BoldFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>BuyItNowFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>CategoryFeaturedFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>FeaturedFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>GalleryPlusFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>FeaturedGalleryFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>FixedPriceDurationFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>GalleryFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>GiftIconFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>HighLightFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>InsertionFee</Name> <Fee currencyID="USD">0.25</Fee> </Fee> <Fee> <Name>InternationalInsertionFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>ListingDesignerFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>ListingFee</Name> <Fee currencyID="USD">0.25</Fee> </Fee> <Fee> <Name>PhotoDisplayFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>PhotoFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>ReserveFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>SchedulingFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>SubtitleFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>BorderFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>ProPackBundleFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>BasicUpgradePackBundleFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>ValuePackBundleFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>PrivateListingFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>ExtendedDurationFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>ProPackPlusBundleFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> <Fee> <Name>MotorsGermanySearchFee</Name> <Fee currencyID="USD">0.0</Fee> </Fee> </Fees> </AddItemResponse>
  12. i am getting the result correctly entered in the db with this code. unfortunately i need the data that enters the db changed a little. i want when the value of $value->CategoryParentID is equal to the $value->CategoryID 0 be entered instead of $value->CategoryParentID. $results = new SimpleXMLElement($responseXml); } if ($results->Ack == "Success") { echo tep_db_query("truncate table ebay_categories_description"); tep_db_query("truncate table ebay_categories"); $c = 0; foreach ($results->CategoryArray->Category as $key => $value) { ///// i need to find out if the two values are equal here tep_db_query("insert into ebay_categories (categories_id, parent_id) values (" . $value->CategoryID . ", " . $value->CategoryParentID .")"); tep_db_query("insert into ebay_categories_description (categories_id, categories_name) values (" . $value->CategoryID . ", '" . addslashes($value->CategoryName) . "')"); $c++; } //$results->CategoryArray->Category as $key => $value echo $c . " categories inserted successfully!<br>"; } //$results->Ack == "Success" else { echo "get categories error<br>"; } but when i use an if statement it breaks the process
  13. thanks this works. can you tell me why it didn't work the other way? i am planning to do this with a lot of different calls, so it would be good to know
  14. <?xml version="1.0" encoding="UTF-8"?> <GetMyMessagesResponse xmlns="urn:ebay:apis:eBLBaseComponents"><Timestamp>2016-11-06T18:32:18.485Z</Timestamp><Ack>Success</Ack><Version>963</Version><Build>E963_CORE_APIMSG_17909225_R1</Build><Messages><Message><Sender>mountain_gear_trade</Sender><SendingUserID>38786549</SendingUserID><RecipientUserID>frank1002us</RecipientUserID><SendToName>frank1002us</SendToName><Subject>Other: mountain_gear_trade sent a message about Miele S7580 Bolero Upright HEPA Vacuum Cleaners #252606124491</Subject><MessageID>82713809857</MessageID><ExternalMessageID>1381187481019</ExternalMessageID><Flagged>false</Flagged><Read>true</Read><ReceiveDate>2016-10-31T02:36:28.000Z</ReceiveDate><ExpirationDate>2017-10-31T02:36:28.000Z</ExpirationDate><ItemID>252606124491</ItemID><ResponseDetails><ResponseEnabled>true</ResponseEnabled><ResponseURL>http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252606124491&requested=mountain_gear_trade&qid=1381187481019&redirect=0&messageid=m82713809857</ResponseURL><UserResponseDate>2016-10-31T11:48:00.000Z</UserResponseDate></ResponseDetails><Folder><FolderID>0</FolderID></Folder><MessageType>AskSellerQuestion</MessageType><Replied>true</Replied><ItemEndTime>2016-11-02T18:52:48.000Z</ItemEndTime><ItemTitle> Miele S7580 Bolero Upright HEPA Vacuum Cleaners</ItemTitle></Message><Message><Sender>gzanf92</Sender><SendingUserID>901529120</SendingUserID><RecipientUserID>frank1002us</RecipientUserID><SendToName>frank1002us</SendToName><Subject>Re: Details about item: gzanf92 sent a message about Miele S7580 Bolero Upright HEPA Vacuum Cleaners #252606124491</Subject><MessageID>82678997647</MessageID><ExternalMessageID>1395267626010</ExternalMessageID><Flagged>false</Flagged><Read>true</Read><ReceiveDate>2016-10-28T23:22:37.000Z</ReceiveDate><ExpirationDate>2017-10-28T23:22:37.000Z</ExpirationDate><ItemID>252606124491</ItemID><ResponseDetails><ResponseEnabled>true</ResponseEnabled><ResponseURL>http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252606124491&requested=gzanf92&qid=1395267626010&redirect=0&messageid=m82678997647</ResponseURL><UserResponseDate>2016-10-29T14:31:01.000Z</UserResponseDate></ResponseDetails><Folder><FolderID>0</FolderID></Folder><MessageType>ResponseToASQQuestion</MessageType><Replied>true</Replied><ItemEndTime>2016-11-02T18:52:48.000Z</ItemEndTime><ItemTitle> Miele S7580 Bolero Upright HEPA Vacuum Cleaners</ItemTitle></Message><Message><Sender>rjweber11777</Sender><SendingUserID>1106628674</SendingUserID><RecipientUserID>frank1002us</RecipientUserID><SendToName>frank1002us</SendToName><Subject>rjweber11777 has sent a question about item #252556772355, that ended on Oct-02-16 17:37:47 PDT - electrolux epic 6500 SR Vacuum Cleaner Canister aerus</Subject><MessageID>82656600697</MessageID><ExternalMessageID>1385568368014</ExternalMessageID><Flagged>false</Flagged><Read>true</Read><ReceiveDate>2016-10-28T00:41:34.000Z</ReceiveDate><ExpirationDate>2017-10-28T00:41:34.000Z</ExpirationDate><ItemID>252556772355</ItemID><ResponseDetails><ResponseEnabled>true</ResponseEnabled><ResponseURL>http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252556772355&requested=rjweber11777&qid=1385568368014&redirect=0&messageid=m82656600697</ResponseURL></ResponseDetails><Folder><FolderID>0</FolderID></Folder><MessageType>AskSellerQuestion</MessageType><ListingStatus>Ended</ListingStatus><Replied>false</Replied><ItemEndTime>2016-10-03T00:37:47.000Z</ItemEndTime><ItemTitle>electrolux epic 6500 SR Vacuum Cleaner Canister aerus</ItemTitle></Message><Message><Sender>rjweber11777</Sender><SendingUserID>1106628674</SendingUserID><RecipientUserID>frank1002us</RecipientUserID><SendToName>frank1002us</SendToName><Subject>rjweber11777 has sent a question about item #252556772355, that ended on Oct-02-16 17:37:47 PDT - electrolux epic 6500 SR Vacuum Cleaner Canister aerus</Subject><MessageID>82656600067</MessageID><ExternalMessageID>1385568359014</ExternalMessageID><Flagged>false</Flagged><Read>true</Read><ReceiveDate>2016-10-28T00:41:31.000Z</ReceiveDate><ExpirationDate>2017-10-28T00:41:31.000Z</ExpirationDate><ItemID>252556772355</ItemID><ResponseDetails><ResponseEnabled>true</ResponseEnabled><ResponseURL>http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252556772355&requested=rjweber11777&qid=1385568359014&redirect=0&messageid=m82656600067</ResponseURL><UserResponseDate>2016-10-28T22:03:49.000Z</UserResponseDate></ResponseDetails><Folder><FolderID>0</FolderID></Folder><MessageType>AskSellerQuestion</MessageType><ListingStatus>Ended</ListingStatus><Replied>true</Replied><ItemEndTime>2016-10-03T00:37:47.000Z</ItemEndTime><ItemTitle>electrolux epic 6500 SR Vacuum Cleaner Canister aerus</ItemTitle></Message><Message><Sender>gzanf92</Sender><SendingUserID>901529120</SendingUserID><RecipientUserID>frank1002us</RecipientUserID><SendToName>frank1002us</SendToName><Subject>Details about item: gzanf92 sent a message about Miele S7580 Bolero Upright HEPA Vacuum Cleaners #252606124491</Subject><MessageID>82656443607</MessageID><ExternalMessageID>1394679122010</ExternalMessageID><Flagged>false</Flagged><Read>true</Read><ReceiveDate>2016-10-28T00:28:33.000Z</ReceiveDate><ExpirationDate>2017-10-28T00:28:33.000Z</ExpirationDate><ItemID>252606124491</ItemID><ResponseDetails><ResponseEnabled>true</ResponseEnabled><ResponseURL>http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252606124491&requested=gzanf92&qid=1394679122010&redirect=0&messageid=m82656443607</ResponseURL><UserResponseDate>2016-10-28T22:00:33.000Z</UserResponseDate></ResponseDetails><Folder><FolderID>0</FolderID></Folder><MessageType>AskSellerQuestion</MessageType><Replied>true</Replied><ItemEndTime>2016-11-02T18:52:48.000Z</ItemEndTime><ItemTitle> Miele S7580 Bolero Upright HEPA Vacuum Cleaners</ItemTitle></Message></Messages></GetMyMessagesResponse>
  15. 2016-11-06T18:18:20.910ZSuccess963E963_CORE_APIMSG_17909225_R1lindsayb*1029058233frank1002usfrank1002uslindsayb* has sent a message827662015771391854322013falsetrue2016-11-01T19:54:41.000Z2017-11-01T19:54:41.000Ztruehttp://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&requested=lindsayb*&qid=1391854322013&redirect=0&messageid=m827662015772016-11-01T22:25:27.000Z0ContactEbayMembertruemountain_gear_trade38786549frank1002usfrank1002usOther: mountain_gear_trade sent a message about Miele S7580 Bolero Upright HEPA Vacuum Cleaners #252606124491827138098571381187481019falsetrue2016-10-31T02:36:28.000Z2017-10-31T02:36:28.000Z252606124491truehttp://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252606124491&requested=mountain_gear_trade&qid=1381187481019&redirect=0&messageid=m827138098572016-10-31T11:48:00.000Z0AskSellerQuestiontrue2016-11-02T18:52:48.000Z Miele S7580 Bolero Upright HEPA Vacuum Cleanersgzanf92901529120frank1002usfrank1002usRe: Details about item: gzanf92 sent a message about Miele S7580 Bolero Upright HEPA Vacuum Cleaners #252606124491826789976471395267626010falsetrue2016-10-28T23:22:37.000Z2017-10-28T23:22:37.000Z252606124491truehttp://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252606124491&requested=gzanf92&qid=1395267626010&redirect=0&messageid=m826789976472016-10-29T14:31:01.000Z0ResponseToASQQuestiontrue2016-11-02T18:52:48.000Z Miele S7580 Bolero Upright HEPA Vacuum Cleanersrjweber117771106628674frank1002usfrank1002usrjweber11777 has sent a question about item #252556772355, that ended on Oct-02-16 17:37:47 PDT - electrolux epic 6500 SR Vacuum Cleaner Canister aerus826566006971385568368014falsetrue2016-10-28T00:41:34.000Z2017-10-28T00:41:34.000Z252556772355truehttp://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252556772355&requested=rjweber11777&qid=1385568368014&redirect=0&messageid=m826566006970AskSellerQuestionEndedfalse2016-10-03T00:37:47.000Zelectrolux epic 6500 SR Vacuum Cleaner Canister aerusrjweber117771106628674frank1002usfrank1002usrjweber11777 has sent a question about item #252556772355, that ended on Oct-02-16 17:37:47 PDT - electrolux epic 6500 SR Vacuum Cleaner Canister aerus826566000671385568359014falsetrue2016-10-28T00:41:31.000Z2017-10-28T00:41:31.000Z252556772355truehttp://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252556772355&requested=rjweber11777&qid=1385568359014&redirect=0&messageid=m826566000672016-10-28T22:03:49.000Z0AskSellerQuestionEndedtrue2016-10-03T00:37:47.000Zelectrolux epic 6500 SR Vacuum Cleaner Canister aerus wow i don't know if you can figure it or not? but i thank you for trying
  16. i get the data from ebay api. don't know how to get it in the original format. http://developer.ebay.com/devzone/xml/docs/Reference/eBay/GetMyMessages.html
  17. SimpleXMLElement Object ( [Timestamp] => 2016-11-06T17:53:38.897Z [Ack] => Success [Version] => 963 [Build] => E963_CORE_APIMSG_17909225_R1 [Messages] => SimpleXMLElement Object ( [Message] => Array ( [0] => SimpleXMLElement Object ( [Sender] => lindsayb* [SendingUserID] => 1029058233 [RecipientUserID] => frank1002us [SendToName] => frank1002us [Subject] => lindsayb* has sent a message [MessageID] => 82766201577 [ExternalMessageID] => 1391854322013 [Flagged] => false [Read] => true [ReceiveDate] => 2016-11-01T19:54:41.000Z [ExpirationDate] => 2017-11-01T19:54:41.000Z [ResponseDetails] => SimpleXMLElement Object ( [ResponseEnabled] => true [ResponseURL] => http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&requested=lindsayb*&qid=1391854322013&redirect=0&messageid=m82766201577 [UserResponseDate] => 2016-11-01T22:25:27.000Z ) [Folder] => SimpleXMLElement Object ( [FolderID] => 0 ) [MessageType] => ContactEbayMember [Replied] => true ) [1] => SimpleXMLElement Object ( [Sender] => mountain_gear_trade [SendingUserID] => 38786549 [RecipientUserID] => frank1002us [SendToName] => frank1002us [Subject] => Other: mountain_gear_trade sent a message about Miele S7580 Bolero Upright HEPA Vacuum Cleaners #252606124491 [MessageID] => 82713809857 [ExternalMessageID] => 1381187481019 [Flagged] => false [Read] => true [ReceiveDate] => 2016-10-31T02:36:28.000Z [ExpirationDate] => 2017-10-31T02:36:28.000Z [ItemID] => 252606124491 [ResponseDetails] => SimpleXMLElement Object ( [ResponseEnabled] => true [ResponseURL] => http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252606124491&requested=mountain_gear_trade&qid=1381187481019&redirect=0&messageid=m82713809857 [UserResponseDate] => 2016-10-31T11:48:00.000Z ) [Folder] => SimpleXMLElement Object ( [FolderID] => 0 ) [MessageType] => AskSellerQuestion [Replied] => true [ItemEndTime] => 2016-11-02T18:52:48.000Z [ItemTitle] => Miele S7580 Bolero Upright HEPA Vacuum Cleaners ) [2] => SimpleXMLElement Object ( [Sender] => gzanf92 [SendingUserID] => 901529120 [RecipientUserID] => frank1002us [SendToName] => frank1002us [Subject] => Re: Details about item: gzanf92 sent a message about Miele S7580 Bolero Upright HEPA Vacuum Cleaners #252606124491 [MessageID] => 82678997647 [ExternalMessageID] => 1395267626010 [Flagged] => false [Read] => true [ReceiveDate] => 2016-10-28T23:22:37.000Z [ExpirationDate] => 2017-10-28T23:22:37.000Z [ItemID] => 252606124491 [ResponseDetails] => SimpleXMLElement Object ( [ResponseEnabled] => true [ResponseURL] => http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252606124491&requested=gzanf92&qid=1395267626010&redirect=0&messageid=m82678997647 [UserResponseDate] => 2016-10-29T14:31:01.000Z ) [Folder] => SimpleXMLElement Object ( [FolderID] => 0 ) [MessageType] => ResponseToASQQuestion [Replied] => true [ItemEndTime] => 2016-11-02T18:52:48.000Z [ItemTitle] => Miele S7580 Bolero Upright HEPA Vacuum Cleaners ) [3] => SimpleXMLElement Object ( [Sender] => rjweber11777 [SendingUserID] => 1106628674 [RecipientUserID] => frank1002us [SendToName] => frank1002us [Subject] => rjweber11777 has sent a question about item #252556772355, that ended on Oct-02-16 17:37:47 PDT - electrolux epic 6500 SR Vacuum Cleaner Canister aerus [MessageID] => 82656600697 [ExternalMessageID] => 1385568368014 [Flagged] => false [Read] => true [ReceiveDate] => 2016-10-28T00:41:34.000Z [ExpirationDate] => 2017-10-28T00:41:34.000Z [ItemID] => 252556772355 [ResponseDetails] => SimpleXMLElement Object ( [ResponseEnabled] => true [ResponseURL] => http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252556772355&requested=rjweber11777&qid=1385568368014&redirect=0&messageid=m82656600697 ) [Folder] => SimpleXMLElement Object ( [FolderID] => 0 ) [MessageType] => AskSellerQuestion [ListingStatus] => Ended [Replied] => false [ItemEndTime] => 2016-10-03T00:37:47.000Z [ItemTitle] => electrolux epic 6500 SR Vacuum Cleaner Canister aerus ) [4] => SimpleXMLElement Object ( [Sender] => rjweber11777 [SendingUserID] => 1106628674 [RecipientUserID] => frank1002us [SendToName] => frank1002us [Subject] => rjweber11777 has sent a question about item #252556772355, that ended on Oct-02-16 17:37:47 PDT - electrolux epic 6500 SR Vacuum Cleaner Canister aerus [MessageID] => 82656600067 [ExternalMessageID] => 1385568359014 [Flagged] => false [Read] => true [ReceiveDate] => 2016-10-28T00:41:31.000Z [ExpirationDate] => 2017-10-28T00:41:31.000Z [ItemID] => 252556772355 [ResponseDetails] => SimpleXMLElement Object ( [ResponseEnabled] => true [ResponseURL] => http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252556772355&requested=rjweber11777&qid=1385568359014&redirect=0&messageid=m82656600067 [UserResponseDate] => 2016-10-28T22:03:49.000Z ) [Folder] => SimpleXMLElement Object ( [FolderID] => 0 ) [MessageType] => AskSellerQuestion [ListingStatus] => Ended [Replied] => true [ItemEndTime] => 2016-10-03T00:37:47.000Z [ItemTitle] => electrolux epic 6500 SR Vacuum Cleaner Canister aerus ) ) ) ) i get it from Ebay api i don't know how to get it in the original form but here is a link to the documantation http://developer.ebay.com/devzone/xml/docs/Reference/eBay/GetMyMessages.html
  18. i am having problem with parsing an xml file . i am only getting the first result $results = new SimpleXMLElement($responseXml); if ($results->Ack == "Success") { $this_temp_array = $results->Messages; foreach ($this_temp_array as $key => $value) { if ($key == $n) $Message = $value; //print_r ($Message); $MessageID = $Message->Message->MessageID; $n=$n+1; echo $MessageID; } } i get only the first MessageID and not the other four. here is the result from print SimpleXMLElement Object ( [Message] => Array ( [0] => SimpleXMLElement Object ( [Sender] => lindsayb* [SendingUserID] => 1029058233 [RecipientUserID] => frank1002us [SendToName] => frank1002us [Subject] => lindsayb* has sent a message [MessageID] => 82766201577 [ExternalMessageID] => 1391854322013 [Flagged] => false [Read] => true [ReceiveDate] => 2016-11-01T19:54:41.000Z [ExpirationDate] => 2017-11-01T19:54:41.000Z [ResponseDetails] => SimpleXMLElement Object ( [ResponseEnabled] => true [ResponseURL] => http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&requested=lindsayb*&qid=1391854322013&redirect=0&messageid=m82766201577 [UserResponseDate] => 2016-11-01T22:25:27.000Z ) [Folder] => SimpleXMLElement Object ( [FolderID] => 0 ) [MessageType] => ContactEbayMember [Replied] => true ) [1] => SimpleXMLElement Object ( [Sender] => mountain_gear_trade [SendingUserID] => 38786549 [RecipientUserID] => frank1002us [SendToName] => frank1002us [Subject] => Other: mountain_gear_trade sent a message about Miele S7580 Bolero Upright HEPA Vacuum Cleaners #252606124491 [MessageID] => 82713809857 [ExternalMessageID] => 1381187481019 [Flagged] => false [Read] => true [ReceiveDate] => 2016-10-31T02:36:28.000Z [ExpirationDate] => 2017-10-31T02:36:28.000Z [ItemID] => 252606124491 [ResponseDetails] => SimpleXMLElement Object ( [ResponseEnabled] => true [ResponseURL] => http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252606124491&requested=mountain_gear_trade&qid=1381187481019&redirect=0&messageid=m82713809857 [UserResponseDate] => 2016-10-31T11:48:00.000Z ) [Folder] => SimpleXMLElement Object ( [FolderID] => 0 ) [MessageType] => AskSellerQuestion [Replied] => true [ItemEndTime] => 2016-11-02T18:52:48.000Z [ItemTitle] => Miele S7580 Bolero Upright HEPA Vacuum Cleaners ) [2] => SimpleXMLElement Object ( [Sender] => gzanf92 [SendingUserID] => 901529120 [RecipientUserID] => frank1002us [SendToName] => frank1002us [Subject] => Re: Details about item: gzanf92 sent a message about Miele S7580 Bolero Upright HEPA Vacuum Cleaners #252606124491 [MessageID] => 82678997647 [ExternalMessageID] => 1395267626010 [Flagged] => false [Read] => true [ReceiveDate] => 2016-10-28T23:22:37.000Z [ExpirationDate] => 2017-10-28T23:22:37.000Z [ItemID] => 252606124491 [ResponseDetails] => SimpleXMLElement Object ( [ResponseEnabled] => true [ResponseURL] => http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252606124491&requested=gzanf92&qid=1395267626010&redirect=0&messageid=m82678997647 [UserResponseDate] => 2016-10-29T14:31:01.000Z ) [Folder] => SimpleXMLElement Object ( [FolderID] => 0 ) [MessageType] => ResponseToASQQuestion [Replied] => true [ItemEndTime] => 2016-11-02T18:52:48.000Z [ItemTitle] => Miele S7580 Bolero Upright HEPA Vacuum Cleaners ) [3] => SimpleXMLElement Object ( [Sender] => rjweber11777 [SendingUserID] => 1106628674 [RecipientUserID] => frank1002us [SendToName] => frank1002us [Subject] => rjweber11777 has sent a question about item #252556772355, that ended on Oct-02-16 17:37:47 PDT - electrolux epic 6500 SR Vacuum Cleaner Canister aerus [MessageID] => 82656600697 [ExternalMessageID] => 1385568368014 [Flagged] => false [Read] => true [ReceiveDate] => 2016-10-28T00:41:34.000Z [ExpirationDate] => 2017-10-28T00:41:34.000Z [ItemID] => 252556772355 [ResponseDetails] => SimpleXMLElement Object ( [ResponseEnabled] => true [ResponseURL] => http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252556772355&requested=rjweber11777&qid=1385568368014&redirect=0&messageid=m82656600697 ) [Folder] => SimpleXMLElement Object ( [FolderID] => 0 ) [MessageType] => AskSellerQuestion [ListingStatus] => Ended [Replied] => false [ItemEndTime] => 2016-10-03T00:37:47.000Z [ItemTitle] => electrolux epic 6500 SR Vacuum Cleaner Canister aerus ) [4] => SimpleXMLElement Object ( [Sender] => rjweber11777 [SendingUserID] => 1106628674 [RecipientUserID] => frank1002us [SendToName] => frank1002us [Subject] => rjweber11777 has sent a question about item #252556772355, that ended on Oct-02-16 17:37:47 PDT - electrolux epic 6500 SR Vacuum Cleaner Canister aerus [MessageID] => 82656600067 [ExternalMessageID] => 1385568359014 [Flagged] => false [Read] => true [ReceiveDate] => 2016-10-28T00:41:31.000Z [ExpirationDate] => 2017-10-28T00:41:31.000Z [ItemID] => 252556772355 [ResponseDetails] => SimpleXMLElement Object ( [ResponseEnabled] => true [ResponseURL] => http://contact.ebay.com/ws/eBayISAPI.dll?M2MContact&item=252556772355&requested=rjweber11777&qid=1385568359014&redirect=0&messageid=m82656600067 [UserResponseDate] => 2016-10-28T22:03:49.000Z ) [Folder] => SimpleXMLElement Object ( [FolderID] => 0 ) [MessageType] => AskSellerQuestion [ListingStatus] => Ended [Replied] => true [ItemEndTime] => 2016-10-03T00:37:47.000Z [ItemTitle] => electrolux epic 6500 SR Vacuum Cleaner Canister aerus ) ) ) 82766201577
  19. this works $responseDoc = new DomDocument(); $responseDoc->loadXML($responseXml); //get any error nodes $errors = $responseDoc->getElementsByTagName('Ack'); $code = $errors->item(0)->getElementsByTagName('Ack'); // if($code=='Success') { echo 'success';}
  20. no i changed it to $resp = new simplexml_load_file($responseXml); if ($resp->Ack == "Success") { echo 'success';} but it doesn't i might add that the xml file is nested
  21. first of all let me say that i have no idea about coding. when i went to school we used punch cards now here is the question in the code that i have $responseDoc = new DomDocument(); $responseDoc->loadXML($responseXml); but it is very hard for me to use DomDocument. it would be hundreds of lines (i had a program thet stopped working and i want to just make changes to that) i want to do a way that i can just have lines like $BestOfferCount = $Item->BestOfferDetails->BestOfferCount; i hope i am making myself clear. thanks for your help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.