Hello All, I've read through

Steel Rat's picture
Offline
Joined: 07/19/2009
Juice: 51
Hello All, I've read through

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">&raquo; <?php print $links?></div><?php }; ?>
  </div>

Any ideas?

Thanks!

Nifty Products Tutorial Part 1 By: mykz- (168 replies) Wed, 03/19/2008 - 20:04
  • Show discounted price by uc_discount module By: madjoe@drupal.org (02/14/2010 - 23:42)
  • Product Attributes By: rhysemt (01/17/2010 - 02:04)
  • Why? By: Foaman (10/17/2009 - 02:32)
  • Re: Nifty Products Tutorial Part 1 By: stasparshin (08/17/2009 - 13:24)
  • This is really useful. I've By: Ms_Kristina (07/16/2009 - 19:30)
  • Re: Nifty Products Tutorial Part 1 By: melanie_me (07/01/2009 - 16:43)
  • For images, I don't think this is the right way... By: cfab (07/01/2009 - 01:50)
  • Re: Nifty Products Tutorial Part 1 By: PepeMty (05/22/2009 - 15:21)
  • almost working... By: dontpanic (04/05/2009 - 03:01)
  • Re: Nifty Products Tutorial Part 1 By: RidolfiDesigns (03/31/2009 - 08:27)
  • Thickboc with Jquery Cycle By: matshep1 (03/10/2009 - 14:29)
  • Page title By: acbmse (03/05/2009 - 08:41)
  • Attributes working with node-product. By: perfectmatch (10/30/2008 - 17:02)
  • About Thickbox intergration By: adshill (10/23/2008 - 11:40)
  • Regarding to the images: if By: fossie@drupal.org (09/24/2008 - 09:03)
  • Using Tabs By: mach5_kel (09/06/2008 - 23:07)
  • Default node-product.tpl.php By: NecroHill (09/06/2008 - 16:50)
  • Modifing the Categories and Product Listings Pages By: maestrojed (08/28/2008 - 17:39)
  • Option Images not displaying/swatching on custom template By: beerismypoison (08/26/2008 - 16:25)
  • Re: Nifty Products Tutorial Part 1 By: end user (08/07/2008 - 18:05)
  • Re: Nifty Products Tutorial Part 1 By: seutje (06/18/2008 - 00:36)
  • Re: Nifty Products Tutorial Part 1 By: johnny5w (06/01/2008 - 20:16)
  • Re: Nifty Products Tutorial Part 1 By: seutje (05/29/2008 - 02:29)
  • Re: Nifty Products Tutorial Part 1 By: seutje (05/26/2008 - 10:17)
  • Reduced Price By: Alaska (05/25/2008 - 05:10)
  • Need thickbox for picture By: ericmalone (05/22/2008 - 16:06)
  • Re: Nifty Products Tutorial Part 1 By: end user (05/20/2008 - 01:26)
  • Hi, I tried out the code By: blueeeeie (05/19/2008 - 11:17)
  • Preselection radio button By: vincent@drupal.org (05/19/2008 - 03:48)
  • Re: Nifty Products Tutorial Part 1 By: seutje (05/15/2008 - 03:07)
  • Re: Nifty Products Tutorial Part 1 By: end user (04/22/2008 - 01:54)
  • Re: Nifty Products Tutorial Part 1 By: TutusForToddlers (04/08/2008 - 10:31)
  • Re: Nifty Products Tutorial Part 1 By: spasmody (04/08/2008 - 06:33)
  • Re: Nifty Products Tutorial Part 1 By: darkbrewery (03/21/2008 - 08:10)
  • Re: Nifty Products Tutorial Part 1 By: darkbrewery (03/20/2008 - 05:35)