Code Is Live and Working Great

Insurrectus's picture
Offline
Spreading the word - Ubercart for president.
Joined: 08/22/2007
Juice: 364
Code Is Live and Working Great

I have this code running live our site: http://www.hugamonkey.com/single-sided-baby-slings/midnight-black-baby-s... have a look and let me know what you think. I've left the CSS inline for your reference.

<div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
<div class="content">
    <div class="product-top" style="width:700px;">
        <div class="product-image" style="width:210px; float:left;">
<?php $imagePath = $node->field_image_cache['0']['filepath']; ?>
               
                <a href="<?=base_path()?><?=$imagePath?>" rel="lightshow[prod]">
                    <img src="<?=base_path()?>files/imagecache/product/<?=$imagePath?>" alt="<?=$title?>" title="<?=$title?>">
                </a>
                <ul class="other_imgs" style="list-style-type:none; margin-top:10px; text-align:center;">
                    <?php foreach ($node->field_image_cache as $images) { if ($images['filepath'] != $imagePath) { ?>
                    <li style="display:inline; padding:0; margin-left:0;"><a href="<?=base_path()?><?=$images['filepath']?>" rel="lightshow[prod]" title="<?=$title?>">
                    <img src="<?=base_path()?>files/imagecache/thumbnail/<?=$images['filename']?>" alt="<?=$title?>"></a></li>
                    <?php } } ?>
                </ul>
            </div>
            <div class="product-add-to-cart" style="margin-left:10px; width:480px; float:left; clear:right;">
            <h1 class="title" style="color:#000; font-size:1.6em; font-weight:bold;"><?=$title?></h1>
                <span style="font-size:.8em;">Ships Fast &amp; <a href="http://www.hugamonkey.com/info/love-it">Free</a></span>

                <div class="add-to-cart-box" style="width:320px; margin-top:10px; padding:.4em; border:5px solid #ccc; background:#f1f1f1;">
              <div class="add-to-cart-box_pricing-box" style="background:#fff; border-bottom:1px dotted #000; height:2.6em;">
           <div class="add-to-cart-box_price" style="float:left; font-size:2em; font-weight:bold; margin-top:.2em;"><?=uc_currency_format($node->sell_price)?></div>
                    </div>
                <div class="add-to-cart-box_add-to-cart" style="padding:.4em; font-size:.8em;">
                    <a href="<?=base_path()?>files/sitewide/hugamonkey-baby-sling-sizing-chart.png" rel="lightshow[prod]">
                    <img src="<?=base_path()?>themes/dreamy/images/sizingIcon.png" alt="Baby Sling Sizing Chart" /></a><br />
                   <a href="<?=base_path()?>files/sitewide/hugamonkey-baby-sling-sizing-chart.png" rel="lightshow[prod]">Sizing Chart</a>&nbsp;&nbsp;
                   <a href="<?=base_path()?>info/sizing-chart" style="font-size:80%;">[Detailed Instructions]</a>
                        <?php print $node->content['add_to_cart']["#value"]; ?>
                    </div>
              </div>
             
            <div class="product-rating-box" style="margin-top:10px; width:320px; float:left; clear:right; font-size:.8em; padding:.2em; border:2px solid #ccc;">
                <div class="product-rating-box_ratings" style="float:left; width:120px;">
Product Rating: <?php print $node->content["fivestar_widget"]["#value"];  ?>
                    </div>
                    <div class="product-rating-box_reviews" style="float:left;">
                    <?php if ($node->comment_count != 0 ) { ?>
<a href="#comment-field"><?=$node->comment_count;?> Customer Reviews</a><br  />
                   <?php } ?>
                        <?php if ($node->comment_count != 0 ) { ?>
                    <a href="#comment-field">Write A Review</a>
                        <?php } ?>
                         <?php if ($node->comment_count == 0 ) { ?>
                    <a href="#comment-field">Be The First To Write A Review!</a>
                        <?php } ?>
                    </div>
                </div>
          </div>
        </div>
        <br clear="all" />
        <div class="product-bottom" style="width:700px; margin-top:20px;">
        <div class="product-description" style="width:700px;">
            <div style="background:url(<?=base_path()?>themes/dreamy/images/decription-bg.png) no-repeat; width:700px; height:30px; padding:25px 0 0 20px;">
                <h3 style="color:#fff;">Baby Sling Description:</h3>
                </div>
                <div class="product-description_content" style="margin-left:0;">
<?php print $node->content['body']['#value'];  ?>
                </div>
            </div>
            <div class="product-meta">
                <div style="background:url(<?=base_path()?>themes/dreamy/images/product-meta-bg.png) no-repeat; width:700px; height:40px; padding:25px 0 0 20px;">
                    <h3 style="color:#fff;">Spread The Word:</h3>
                </div>
                <div class="product-meta_content">
                <p>Do you love the <?=$title?>? <a href="<?=base_path()?><?php print $node->links['forward_links']['href']; ?>">Spread the word</a>.</p>
    <p>Or, share us at your favorite social bookmarking site:<?=$service_links?></p>
                </div>
            </div>
            <div id="comment-field" style="background:url(<?=base_path()?>themes/dreamy/images/product-comments-bg.png) no-repeat; margin-top:20px; width:700px; height:40px; padding:25px 0 0 20px;">
            <h3 style="color:#fff;">Customer Reviews:</h3>
            </div>
        </div>
</div>
</div>

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