Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Panel Aukcji Allegro
S3baso
post
Post #1





Grupa: Zarejestrowani
Postów: 24
Pomógł: 0
Dołączył: 16.07.2010

Ostrzeżenie: (0%)
-----


PLIK: Pobierz_Aukcje.php wygląda tak:
  1. <?php
  2. $op['login'] = 'xxxx';
  3. $op['haslo'] = 'xxxx';
  4. $op['country_code'] = '1'; // dla allegro
  5. $op['webapi_key'] = 'xxxx';
  6.  
  7. require_once('./allegro.inc.php');
  8.  
  9. $all = new Allegro($op);
  10. $all -> getAuctionsFromAllegro(6);
  11. ?>


Witajcie, próbuję napisać własny panel aukcji allegro i napotkałem 1 problem a mianowicie gdy otwieram plik pobierz_aukcje.php wyskakuje mi taki error:
Kod
Fatal error: Call to undefined method Allegro::getAuctionsFromAllegro() in pobierz_aukcje.php on line 10


Prosiłbym o jak najszybszą pomoc (IMG:style_emoticons/default/smile.gif)




#EDIT
#phpion
hahaha OMG nie spojrzalem, ze klucz jest niepoprawny

Ten post edytował S3baso 19.07.2011, 10:31:26
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
S3baso
post
Post #2





Grupa: Zarejestrowani
Postów: 24
Pomógł: 0
Dołączył: 16.07.2010

Ostrzeżenie: (0%)
-----


Gdyby byla nie prawidłowa wywaliło by error: No such file or directory, owszem jest prawidłowa

No i ok, dodałem sobie taką funkcję do klasy Allegro:
  1. public function getAuctionsFromAllegro()
  2. {
  3. $msg = array(
  4. 'user-id' => $this->user_id,
  5. 'webapi-key' => $this->webapi_key,
  6. 'country-id' => $this->country_code,
  7. 'offset' => $this->offset
  8. );
  9. $allAuctions = $this->soap->__call('doGetUserItems', $msg);
  10.  
  11. }


Ale teraz wywala mi taki error(i tak miałem w kółko) :

Kod
Fatal error: Call to a member function __call() on a non-object in /home/seba/public_html/tester/n/dodatki/allegro.inc.php on line 43

Linia 43:
Kod
     $allAuctions = $this->soap->__call('doGetUserItems', $msg);


Umieszczona w

Kod
    public function getAuctionsFromAllegro()
    {
         $msg = array(
            'user-id' => $this->user_id,
            'webapi-key' => $this->webapi_key,
            'country-id' => $this->country_code,
            'offset' => $this->offset
        );
     $allAuctions = $this->soap->__call('doGetUserItems', $msg);    
  
   }





#EDIT

Emm... Tak się teraz zastanawiam i sądzę, że może to być spowodowane tym, że nie mam teraz istniejących aukcji ?

Ten post edytował S3baso 19.07.2011, 09:33:04
Go to the top of the page
+Quote Post
phpion
post
Post #3





Grupa: Moderatorzy
Postów: 6 072
Pomógł: 861
Dołączył: 10.12.2003
Skąd: Dąbrowa Górnicza




Pokaż zawartość pliku allegro.inc.php bo obawiam się, że jest on niekompletny. Błąd:
Cytat(S3baso @ 19.07.2011, 10:30:56 ) *
Kod
Fatal error: Call to a member function __call() on a non-object in /home/seba/public_html/tester/n/dodatki/allegro.inc.php on line 43

mówi o tym, ze $this->soap nie jest obiektem, a próbujesz na nim wywołać metodę.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.10.2025 - 14:38