I´m trying to display Ebay GetSingleItem response (http://developer.ebay.com/devzone/shopping/docs/callref/GetSingleItem.html) and I´m having problems displaying array ["ItemSpecifics"]. The call is working ok and I´m receiving the following information:
["ItemSpecifics"] => object(DTS\eBaySDK\Shopping\Types\NameValueListArrayType)#208 (2) {
["values":"DTS\eBaySDK\Types\BaseType":private] => array(1) {
["NameValueList"] => object(DTS\eBaySDK\Types\UnboundType)#129 (5) {
["data":"DTS\eBaySDK\Types\UnboundType":private] => array(8) {
[0] => object(DTS\eBaySDK\Shopping\Types\NameValueListType)#207 (2) {
["values":"DTS\eBaySDK\Types\BaseType":private] => array(2) {
["Name"] => string(6) "Format"
["Value"] => object(DTS\eBaySDK\Types\UnboundType)#191 (5) {
["data":"DTS\eBaySDK\Types\UnboundType":private] => array(1) {
[0] => string(10) "DVD/HD-DVD"
}
["position":"DTS\eBaySDK\Types\UnboundType":private] => int(0)
["class":"DTS\eBaySDK\Types\UnboundType":private] => string(44) "DTS\eBaySDK\Shopping\Types\NameValueListType"
["property":"DTS\eBaySDK\Types\UnboundType":private] => string(5) "Value"
["expectedType":"DTS\eBaySDK\Types\UnboundType":private] => string(6) "string"
}
}
["attachment":"DTS\eBaySDK\Types\BaseType":private] => array(2) {
["data"] => NULL
["mimeType"] => NULL
}
}
[1] => object(DTS\eBaySDK\Shopping\Types\NameValueListType)#65 (2) {
["values":"DTS\eBaySDK\Types\BaseType":private] => array(2) {
["Name"] => string(5) "Genre"
["Value"] => object(DTS\eBaySDK\Types\UnboundType)#152 (5) {
["data":"DTS\eBaySDK\Types\UnboundType":private] => array(1) {
[0] => string(16) "Sci-Fi & Fantasy"
}
["position":"DTS\eBaySDK\Types\UnboundType":private] => int(0)
["class":"DTS\eBaySDK\Types\UnboundType":private] => string(44) "DTS\eBaySDK\Shopping\Types\NameValueListType"
["property":"DTS\eBaySDK\Types\UnboundType":private] => string(5) "Value"
["expectedType":"DTS\eBaySDK\Types\UnboundType":private] => string(6) "string"
}
}
["attachment":"DTS\eBaySDK\Types\BaseType":private] => array(2) {
["data"] => NULL
["mimeType"] => NULL
}
}
[2] => object(DTS\eBaySDK\Shopping\Types\NameValueListType)#180 (2) {
["values":"DTS\eBaySDK\Types\BaseType":private] => array(2) {
["Name"] => string(7) "Edition"
["Value"] => object(DTS\eBaySDK\Types\UnboundType)#253 (5) {
["data":"DTS\eBaySDK\Types\UnboundType":private] => array(1) {
[0] => string(10) "Widescreen"
}
["position":"DTS\eBaySDK\Types\UnboundType":private] => int(0)
["class":"DTS\eBaySDK\Types\UnboundType":private] => string(44) "DTS\eBaySDK\Shopping\Types\NameValueListType"
["property":"DTS\eBaySDK\Types\UnboundType":private] => string(5) "Value"
["expectedType":"DTS\eBaySDK\Types\UnboundType":private] => string(6) "string"
}
So in my controller I put the following information:
$event = array();
foreach($item->ItemSpecifics->NameValueList as $data){
$event[] = $data;
}
I set the data using: ->setCollection($event)
and in my html page (view) I used:
<?php $res = $this->getCollection() ?>
<?php foreach ($res as $row)
{
echo "<tr id='0' class='0'>
<td>
<div class='name'>" . $row->Name . " </div>
</td>
<td>
<div class='value'>" . $row->Value . " </div>
</td>
</tr>";
} ?>
but my problem is that the data included in NAME only is retrieved. the information in Value is not retrieved into the view. just to put more in clear with an example. The information = FORMAT is displayed but DVD/HD-DVD is not.
["Name"] => string(6) "Format"
["Value"] => object(DTS\eBaySDK\Types\UnboundType)#191 (5) {
["data":"DTS\eBaySDK\Types\UnboundType":private] => array(1) {
[0] => string(10) "DVD/HD-DVD"
}
$row->Value->data[0]
.