Hi Dave,<div><br></div><div>Thanks so much, this is what prints out, following your instructions. the yellow part is the part that I'm interested in:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><span class="Apple-style-span" style="font-size: 12px; border-collapse: collapse; color: rgb(102, 102, 102); line-height: 15px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><font class="Apple-style-span" face="'courier new', monospace">stdClass Object ( [order_product_id] => 65 [uc_order_products_qty] => 2 [uc_order_products_title] => Rosh Hashanah Day 1 [uc_orders_billing_last_name] => Eizen <span class="Apple-style-span" style="background-color: rgb(255, 255, 153);">[uc_order_products_data] => a:5:{s:6:"kit_id";s:3:"570";s:6:"module";s:14:"uc_product_kit";s:10:"attributes";a:2:{s:9:"Attending";a:1:{i:0;s:26:"Irene Eizen, Bernard Eizen";}s:4:"Note";a:1:{i:0;s:45:"We are friends of Eric Sack and Sandy Steiker";}}s:9:"shippable";s:1:"0";s:9:"unique_id";s:23:"4c7d632a8090c7.95333579";} </span>[uc_order_products_nid] => 565 )</font></span></div>
<div><span class="Apple-style-span" style="font-size: 12px; border-collapse: collapse; color: rgb(102, 102, 102); line-height: 15px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><font class="Apple-style-span" face="'courier new', monospace"><br>
</font></span></div></blockquote><font class="Apple-style-span" color="#666666" face="'courier new', monospace" size="3"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 12px; line-height: 15px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">Shai<br>
</span></font><div><br><div class="gmail_quote">On Thu, Sep 2, 2010 at 7:22 PM, Metzler, David <span dir="ltr"><<a href="mailto:metzlerd@evergreen.edu">metzlerd@evergreen.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">Try changing this to this to see what the properties really
are. If you don't understand what you get there, then tell me the
results, and I'll try and interpret them for you. </font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span>
<div><font face="Courier New">$orderattributes
= <span>print_r(</span>$row<span>,1)</span>;</font></div>
<div><font face="'courier new', monospace">print
$orderattributes;</font></div></span></div>
<div> </div>
<div><font face="Courier New"></font><br> </div>
<div lang="en-us" dir="ltr" align="left">
<hr>
<font face="Tahoma" size="2"><div class="im"><b>From:</b> <a href="mailto:support-bounces@drupal.org" target="_blank">support-bounces@drupal.org</a>
[mailto:<a href="mailto:support-bounces@drupal.org" target="_blank">support-bounces@drupal.org</a>] <b>On Behalf Of </b>Shai
Gluskin<br></div><b>Sent:</b> Thursday, September 02, 2010 2:01 PM<br><b>To:</b>
<a href="mailto:support@drupal.org" target="_blank">support@drupal.org</a><br><b>Subject:</b> Re: [support] Unserializing Data for Use
in a View<br></font><br></div><div><div></div><div class="h5">
<div></div>David and all,
<div><br></div>
<div>David, thanks for the response:</div>
<div><br></div>
<div>I just tried</div>
<div><br></div>
<div>
<div><font face="'courier new', monospace">$orderattributes =
$row->{$field->data};</font></div>
<div><font face="'courier new', monospace">print
$orderattributes;</font></div>
<div><br></div>I get a php fatal error: "Cannot access empty property"</div>
<div><font face="Arial" color="#0000ff" size="2"></font><br></div>
<div>The following is from Views "Theme information": Field uc_order_products:
data (ID: data)</div>
<div><br>Ideas?</div>
<div>
<div class="gmail_quote"><br></div>
<div class="gmail_quote">Thanks much,</div>
<div class="gmail_quote"><br></div>
<div class="gmail_quote">Shai</div>
<div class="gmail_quote"><br></div>
<div class="gmail_quote">On Thu, Sep 2, 2010 at 4:31 PM, Metzler, David <span dir="ltr"><<a href="mailto:metzlerd@evergreen.edu" target="_blank">metzlerd@evergreen.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:#ccc 1px solid">
<div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">I'm not an
expert here, but I'm reading the coments differently than you are.
</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">I think
you should be working with $row->data ( or at least $row) and not with
$output. That's got html in it, right? </font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">Dave</font></span></div><br>
<div lang="en-us" dir="ltr" align="left">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:support-bounces@drupal.org" target="_blank">support-bounces@drupal.org</a> [mailto:<a href="mailto:support-bounces@drupal.org" target="_blank">support-bounces@drupal.org</a>] <b>On Behalf Of </b>Shai
Gluskin<br><b>Sent:</b> Thursday, September 02, 2010 1:24 PM<br><b>To:</b> <a href="mailto:support@drupal.org" target="_blank">support@drupal.org</a><br><b>Subject:</b> [support]
Unserializing Data for Use in a View<br></font><br></div>
<div>
<div></div>
<div>
<div></div>I'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" target="_blank">http://drupal.org/project/tw</a>).
<div><br></div>
<div>The product attribute info is stored serialized in the "data" 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="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:rgb(204,204,204) 1px solid"><font face="'courier new', monospace">a:5:{s:6:"kit_id";s:3:"570";s:6:"module";s:14:"uc_product_kit";s:10:"attributes";a:2:{s:9:"Attending";a:1:{i:0;s:26:"Jane
Doe, John Doe";}s:4:"Note";a:1:{i:0;s:45:"We are friends of Eric Smith and
Sandy
Smith";}}s:9:"shippable";s:1:"0";s:9:"unique_id";s:23:"4c7d632a8090c7.95333579";}</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 style="color:rgb(34,34,34)"><font face="'courier new', monospace">Array<br>(<br>[kit_id] => 570<br>[module]
=> uc_product_kit<br>[attributes] => Array<br>(<br>[Attending] =>
Array<br>(<br>[0] => Jane Doe, John Doe<br>)<br><br>[Note] =>
Array<br>(<br>[0] => We are friends of Eric Smith and Sandy
Smith<br>)<br><br>)<br><br>[shippable] => 0<br>[unique_id] =>
4c7d632a8090c7.95333579<br>)</font></span></div>
<div><font face="'courier new', monospace" color="#222222" size="2"><span style="font-size:10px"><br></span></font></div>
<div><font color="#222222"><font face="arial, helvetica, sans-serif">I want to
print out: Jane Doe, John Doe</font></font></div>
<div><font color="#222222"><font face="arial, helvetica, sans-serif"><br></font></font></div>
<div><font color="#222222"><font face="arial, helvetica, sans-serif">Here is
what views-view-field.tpl.php has to say:</font></font></div>
<div><font color="#222222"><font face="arial, helvetica, sans-serif"><br></font></font></div>
<div><font color="#222222"><font face="arial, helvetica, sans-serif">
<div><font face="'courier new', monospace">// $Id: views-view-field.tpl.php,v
1.1 2008/05/16 22:22:32 merlinofchaos Exp $</font></div>
<div><font face="'courier new', monospace"> /**</font></div>
<div><font face="'courier new', monospace"> * This template is used
to print a single field in a view. It is not</font></div>
<div><font face="'courier new', monospace"> * actually used in
default Views, as this is registered as a theme</font></div>
<div><font face="'courier new', monospace"> * function which has
better performance. For single overrides, the</font></div>
<div><font face="'courier new', monospace"> * template is perfectly
okay.</font></div>
<div><font face="'courier new', monospace"> *</font></div>
<div><font face="'courier new', monospace"> * Variables
available:</font></div>
<div><font face="'courier new', monospace"> * - $view: The view
object</font></div>
<div><font face="'courier new', monospace"> * - $field: The field
handler object that can process the input</font></div>
<div><font face="'courier new', monospace"> * - $row: The raw SQL
result that can be used</font></div>
<div><font face="'courier new', monospace"> * - $output: The
processed output that will normally be used.</font></div>
<div><font face="'courier new', monospace"> *</font></div>
<div><font face="'courier new', monospace"> * When fetching output
from the $row, this construct should be used:</font></div>
<div><font face="'courier new', monospace"> * $data =
$row->{$field->field_alias}</font></div>
<div><font face="'courier new', monospace"> *</font></div>
<div><font face="'courier new', monospace"> * The above will
guarantee that you'll always get the correct data,</font></div>
<div><font face="'courier new', monospace"> * regardless of any
changes in the aliasing that might happen if</font></div>
<div><font face="'courier new', monospace"> * the view is
modified.</font></div>
<div><font face="'courier new', monospace"> */</font></div>
<div><font face="'courier new', monospace"><br></font></div>
<div>This is what I'm putting in views-view-field.tpl.php:</div>
<div><font face="'courier new', monospace"><br></font></div>
<div><font face="'courier new', monospace">$data =
unserialize($output);</font></div>
<div><font face="'courier new', monospace">print
$data['Attending'][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></div></div></div><br>--<br>[ Drupal
support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a>
]<br></blockquote></div><br></div></div></div></div>
<br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br></div>