Get product Images with Prestashop webservice
<p>I am trying to get images for a product in Prestashop Webservice. Currently I've managed to get description, price, title etc. But when I try to get the images it only gives me the ID of the images, not the complete url. If I go to <a href="http://your-url.com/...cts/XproductidX" rel="nofollow">http://your-url.com/...cts/XproductidX</a> I can with no problem get the images, but doing this through the webservice, is apparently a bit more complicated.</p>

<p>Here is my code so far: </p>

<pre><code>$opt = array(
        'resource' =&gt; 'products',
        'display' =&gt; 'full',
        'limit' =&gt; 5,
    );
    $xml = $webService-&gt;get($opt);
    $resources = $xml-&gt;children()-&gt;children();

    foreach($resources as $product){
        if($product-&gt;id[0] == 286){

            $title = $product-&gt;meta_title-&gt;language;
            $description = $product-&gt;meta_description-&gt;language;
            $description_short = $product-&gt;description_short;
            $quantity = $product-&gt;quantity;
            $price = $product-&gt;price;
            $wholesale_price = $product-&gt;wholesale_price;

            $images = $product-&gt;associations-&gt;images;
            print_r($images);
        }
    }
</code></pre>

<p>With that print_r at the bottom, I am able to receive following:</p>

<pre><code>    SimpleXMLElement Object
(
    [@attributes] =&gt; Array
        (
            [nodeType] =&gt; image
            [api] =&gt; images
        )

    [image] =&gt; Array
        (
            [0] =&gt; SimpleXMLElement Object
                (
                    [id] =&gt; 34
                )

            [1] =&gt; SimpleXMLElement Object
                (
                    [id] =&gt; 35
                )

            [2] =&gt; SimpleXMLElement Object
                (
                    [id] =&gt; 36
                )

            [3] =&gt; SimpleXMLElement Object
                (
                    [id] =&gt; 37
                )

            [4] =&gt; SimpleXMLElement Object
                (
                    [id] =&gt; 38
                )

            [5] =&gt; SimpleXMLElement Object
                (
                    [id] =&gt; 39
                )

            [6] =&gt; SimpleXMLElement Object
                (
                    [id] =&gt; 40
                )

        )

)
</code></pre>

<p>This gives me the ID of the images. Is there any way to get the full url, or at least get image url through an resource?
Perhaps I am doing this the wrong way? :-)</p>

<p>Regards, Simon</p>