Hello All,
I've read through much of this thread trying to suss out how to theme the product detail to my liking. There are a lot of code snippets, but I can't seem to get one working that shows the main image for the product. All it shows is the link as text. I made sure the images are actually there (checked the path, and when editing the product, the image thumb is showing.)
Here's a link to the site/a product to show what I mean: http://thymeforrosemary.com/store/node/7
I'm using the following code for my node-product.tpl.php
<div class="node-<?php print $node->nid; ?><?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
<?php if ($picture) {
print $picture;
}?>
<?php if ($page == 0) { ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php }; ?>
<div class="content">
<table cellpadding="0" cellspacing="0" class="product">
<tr>
<td align="center" class="product_image">
<?php
// Grabs the firsts image path and sets $imagePath.
$imagePath = $node->field_image_cache['0']['filepath'];
?>
<br /><?php print l(
theme('imagecache', 'product', $field_image_cache[0]['filepath'], $field_image_cache[0]['alt'], $field_image_cache[0]['title']),
$field_image_cache[0]['filepath'],
array('class' => 'thickbox'), NULL, NULL, FALSE, TRUE); ?>
</td>
<td class="product_info">
<div id="node">
<?php // product title ?>
<p class="product-title"><?php print $title ?></p>
<p class="product-titles">Product Details</p>
<?php print $node->content['weight']["#value"]; ?>
<?php print $node->content['dimensions']["#value"]; ?>
<p class="product-titles">Product Rating</p>
<?php print $node->content["fivestar_widget"]["#value"]; ?>
<p class="product-titles">Product Reviews:</p>
Product Reviews <?php print $node->comment_count; ?> | <a href="/<?php print $node->links['comment_add']['href']; ?>#comment-form">Review Product</a> | <a href="#read_reviews">Read Reviews</a>
</div>
<br />
<div id="cartContainer">
<div id="cartAdd">
<?php // add to cart buttons ?>
<?php print $node->content['add_to_cart']["#value"]; ?>
</div>
<div id="cartPrice">
<?php // list price and sell price display ?>
<p class="product-titles">PNW Everyday Low Price</p>
<p id="productPrices" class="productGeneral"><?php print uc_currency_format($node->sell_price); ?></p>
</div>
<div id="spacer"><!-- nothing --></div>
</div>
</td>
</tr>
</table>
<hr />
<?php print $productupsell ?>
<br />
<p class="product-titles">Description:</p>
<?php // product description ?>
<?php print $node->content['body']['#value']; ?>
<br />
<a href="/<?php print $node->links['comment_add']['href']; ?>#comment-form" name="read_reviews">Review Product</a>
</div>
<?php if ($links) { ?><div class="links">» <?php print $links?></div><?php }; ?>
</div>Any ideas?
Thanks!
