I&#39;m creating a view of ubercart order products. I got the necessary data to be accessible to Views using Table Wizard (<a href="http://drupal.org/project/tw">http://drupal.org/project/tw</a>).<div><br></div><div>The product attribute info is stored serialized in the &quot;data&quot; field on the uc_order_products table. Here is an example of the raw serialized data:</div>
<div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">a:5:{s:6:&quot;kit_id&quot;;s:3:&quot;570&quot;;s:6:&quot;module&quot;;s:14:&quot;uc_product_kit&quot;;s:10:&quot;attributes&quot;;a:2:{s:9:&quot;Attending&quot;;a:1:{i:0;s:26:&quot;Jane Doe, John Doe&quot;;}s:4:&quot;Note&quot;;a:1:{i:0;s:45:&quot;We are friends of Eric Smith and Sandy Smith&quot;;}}s:9:&quot;shippable&quot;;s:1:&quot;0&quot;;s:9:&quot;unique_id&quot;;s:23:&quot;4c7d632a8090c7.95333579&quot;;}</font></blockquote>
<div><br></div><div>I have no problem printing it out like above. </div><div><br></div><div>Unserialized it looks like this:</div><div><br></div><div><span class="Apple-style-span" style="color: rgb(34, 34, 34); "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Array<br>
(<br>[kit_id] =&gt; 570<br>[module] =&gt; uc_product_kit<br>[attributes] =&gt; Array<br>(<br>[Attending] =&gt; Array<br>(<br>[0] =&gt; Jane Doe, John Doe<br>)<br><br>[Note] =&gt; Array<br>(<br>[0] =&gt; We are friends of Eric Smith and Sandy Smith<br>
)<br><br>)<br><br>[shippable] =&gt; 0<br>[unique_id] =&gt; 4c7d632a8090c7.95333579<br>)</font></span></div><div><font class="Apple-style-span" color="#222222" face="&#39;courier new&#39;, monospace" size="2"><span class="Apple-style-span" style="font-size: 10px;"><br>
</span></font></div><div><font class="Apple-style-span" color="#222222"><font class="Apple-style-span" face="arial, helvetica, sans-serif">I want to print out: Jane Doe, John Doe</font></font></div><div><font class="Apple-style-span" color="#222222"><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br>
</font></font></div><div><font class="Apple-style-span" color="#222222"><font class="Apple-style-span" face="arial, helvetica, sans-serif">Here is what views-view-field.tpl.php has to say:</font></font></div><div><font class="Apple-style-span" color="#222222"><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br>
</font></font></div><div><font class="Apple-style-span" color="#222222"><font class="Apple-style-span" face="arial, helvetica, sans-serif"><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">// $Id: views-view-field.tpl.php,v 1.1 2008/05/16 22:22:32 merlinofchaos Exp $</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"> /**</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * This template is used to print a single field in a view. It is not</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * actually used in default Views, as this is registered as a theme</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * function which has better performance. For single overrides, the</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * template is perfectly okay.</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  *</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * Variables available:</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * - $view: The view object</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * - $field: The field handler object that can process the input</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * - $row: The raw SQL result that can be used</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * - $output: The processed output that will normally be used.</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  *</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * When fetching output from the $row, this construct should be used:</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * $data = $row-&gt;{$field-&gt;field_alias}</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  *</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * The above will guarantee that you&#39;ll always get the correct data,</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * regardless of any changes in the aliasing that might happen if</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  * the view is modified.</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  */</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br>
</font></div><div>This is what I&#39;m putting in views-view-field.tpl.php:</div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">$data = unserialize($output);</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">print $data[&#39;Attending&#39;][0];</font></div><div><br></div><div>Nothing gets returned.</div><div><br></div><div>What am I doing wrong?</div>
<div><br></div><div>thanks,</div><div><br></div><div>Shai</div></font></font></div>