Using the Amazon CCK field allows me to retreive all data - in my case for a CD album.

I gather the available items by printing out all variables by $variables['node']->{0} in my preprocess_node function.

This gives me a field named numerofdiscs, which always returns a value of 0 instead of the actual amount of discs.

I think this is a bug as all other variables can be retreived correctly
note: I am rather a newby to Drupal, so I hope this information is sufficient and the bugreport posted correctly.

Comments

rfay’s picture

Status: Active » Fixed

As far as I can tell, this is working correctly.

Remember, you can't just get it out of the node, because a node may have multiple ASIN fields in it, of different types.

But you can get it in the processing of amazon_item.

For example, this snippet can replace amazon_item.tpl, and it does print out correctly. You'd want to add more finesse, of course.

<div class="<?php print $classes; ?>">
<?php if (!empty($smallimage)) { print $smallimage; } ?>
<div><strong><?php print l($title, $detailpageurl, array('html' => TRUE)); ?></strong></div>
<strong><?php print "Number of discs:" . $numberofdiscs; ?></strong>
</div>

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.