Jump to content

[Resolved] API Prestashop show categories name


MrAurora

Recommended Posts

EDIT : Resolved, it's just PHP's var_dump func which not allow to display that data.
Just an echo of name will display what I want :)

 

Hello everyone !

 

I am a developer, I'm on Prestashop 1.5.6.2 and I need to work with Prestashop API, but I've something I don't understand, I explain you :

 

1399296498-screen38.png

 

On this screenshot, you can see I display category 17, and we can see his name (with a black line through), ok nice.

 

But, when I try to parse xml with PHP, on my screen, I have got this :

 

1399296498-screen39.png

 

 

I show you a small part of code :

case 'id_category_default' :
    $opt2 = array(
        'resource' => 'categories',
        'id' => '17'
    );
    $xml2 = $webService->get($opt2);
    $resources2 = $xml2->children()->children();
    echo "</table>";
    echo "<pre>";
    var_dump($resources2);
    echo "</pre>";
    die;

My question is : How display categories' name ? Because the xml parsed is really empty...

 

Thank you in advance

Edited by MrAurora (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...