![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 36 Pomógł: 1 Dołączył: 18.10.2008 Ostrzeżenie: (0%) ![]() ![]() |
witam,
udało mi się przerobić po wielu bojach starą metodę pobierania informacji o aukcjach na nową (w końcu zrozumiałem czemu ktoś w internecie napisał że to Allegro API to koszmar programisty), nie otrzymuję już błędów przy pobieraniu informacji, mam jednak problem z paginacją (stronicowaniem), załączam cały kod, być może przyda się komuś do przejścia na nową metodę:
problem w tym że serwer zwraca błąd: Kod PHP Notice: Undefined offset: 0 PHP Notice: Undefined offset: 1 PHP Notice: Undefined offset: 2 PHP Notice: Undefined offset: 3 PHP Notice: Undefined offset: 4 PHP Notice: Undefined offset: 5 PHP Notice: Undefined offset: 6 PHP Notice: Undefined offset: 7 PHP Notice: Undefined offset: 8 PHP Notice: Undefined offset: 9 PHP Notice: Undefined offset: 10 PHP Notice: Undefined offset: 11 przypuszczam że mam błąd w kodzie, jednak przejrzałem go już tyle razy i nie mam pojęcia w czym problem, proszę o pomoc Ten post edytował Aquarius 23.07.2015, 10:24:14 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 36 Pomógł: 1 Dołączył: 18.10.2008 Ostrzeżenie: (0%) ![]() ![]() |
mniej więcej tak to wygląda:
Kod array(5) { ["itemsCount"]=> int(501) ["itemsFeaturedCount"]=> int(0) ["itemsList"]=> object(stdClass)#3 (1) { ["item"]=> array(100) { [0]=> object(stdClass)#4 (14) { ["itemId"]=> int(5118545340) ["itemTitle"]=> string(36) "RENAULT TRAFIC 2011 2,5 DCI KOMPLET" ["leftCount"]=> int(1) ["bidsCount"]=> int(0) ["biddersCount"]=> int(0) ["quantityType"]=> string(6) "pieces" ["timeToEnd"]=> string(27) "do wyczerpania przedmiotów" ["categoryId"]=> int(50851) ["conditionInfo"]=> string(4) "used" ["promotionInfo"]=> int(0) ["additionalInfo"]=> int(0) ["sellerInfo"]=> object(stdClass)#5 (5) { ["userId"]=> int(4921350) ["userLogin"]=> string(9) "xxxxxx" ["userRating"]=> int(225) ["userIcons"]=> int(10) ["countryId"]=> int(1) } ["priceInfo"]=> object(stdClass)#6 (1) { ["item"]=> array(2) { [0]=> object(stdClass)#7 (2) { ["priceType"]=> string(6) "buyNow" ["priceValue"]=> float(14000) } [1]=> object(stdClass)#8 (2) { ["priceType"]=> string(12) "withDelivery" ["priceValue"]=> float(14160) } } } ["photosInfo"]=> object(stdClass)#9 (0) { } } [1]=> object(stdClass)#10 (14) ... pominąłem konwersję na zmienne:
i chcę teraz wywołać dane w ten sposób:
jednak tak jest jeszcze gorzej: Kod PHP Fatal error: Cannot use object of type stdClass as array
Ten post edytował Aquarius 23.07.2015, 06:58:56 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 15.10.2025 - 10:58 |