PDA

View Full Version : Can I retrieve info for specific products?


vesper
20-12-07, 10:40
Hi,

I want to pass 5 Product IDs to the shopwindow database and retieve the product details for those 5 products and display the results in a list. Pretty much like a search page but instead of a search query I give the system 5 products to return.

Can someone please let me know if this is possible? Any 'snippets' would also be hugely appreciated!

Kind regards,

Vesper

vesper
20-12-07, 11:10
OK, so I've worked out that the following line retrieves the information for the given Product IDs.

$params4 = array('aProductIds'=>array(productID1, productID2, productID3, productID4, productID5));
$response = $oClient->call('getProduct', $params4);

So now I need to know how I access the individual information held in the $params4 array!

vesper
21-12-07, 08:33
I have managed to sort this out myself. Help no longer needed, thanks.

Best of luck with your own projects!

Merry Christmas, or Season's Greetings if you do not celebrate Christmas, and a Very Happy New Year!

Vesper

Amoochi
21-12-07, 10:21
Could you share with us how you managed to sort it please.

Might come in handy for someone else at some point. :)

vesper
21-12-07, 10:39
Hi Amoochi,

Very basically (as far as I have got), this is how to get the product details of a specified product or number of products:

$aProductParams = array('aProductIds'=> array(id1, id2, etc.));
$oProduct = $oClient->call('getProduct', $aProductParams);
$this->oProduct = $oProduct->getProductReturn[0]; // first product
$this->oProduct->sName // display title. :)

Amoochi
23-12-07, 18:26
Thanks for that. :)