Hello! Thank you very much for your work on this module! It works fantastic with ususal product nodes, but not working if you theme them.

Here is how I'm printing price and “Add to cart” button in node-product.tpl.php:

<div class="price">Price:<br /><?php print uc_currency_format($node->sell_price); ?></div>
<?php print $node->content['add_to_cart']["#value"]; ?>

Maybe I should do it in a different way?

Comments

jantoine’s picture

Hi olenaumov,

This module requires that certain css classes be used in the div tag surrounding the prices. In your case, you are using the sell_price and should include the "sell_price" class in your div tag (see the code below). You can also use the "display_price" class.

<div class="sell_price">Price:<br /><?php print uc_currency_format($node->sell_price); ?></div>
<?php print $node->content['add_to_cart']["#value"]; ?>

Let me know if this doesn't solve your problem.

Cheers,

Jon Antoine
www.antoinesolutions.com
Open Source Development Tutorials & Documentation

jantoine’s picture

Status: Active » Fixed
olegnaumov’s picture

Status: Fixed » Closed (won't fix)

Thank you very much for your suggestion, but unfortunately it didn't work for me..
But it still works with node-product.tpl.php removed.

You can check it out here: http://cdsouls.ru/cd/shorokh-or-2008

Kindly asking for more help.

olegnaumov’s picture

Status: Closed (won't fix) » Active

Please, anyone?

cyu’s picture

Did you also follow instructions from the project page?

*This module requires product node divs have an identifier in the same form as the garland theme. For instance, trying to use bluemarine theme without adding the following code to node.tpl.php will result in the module not working.

id="node-<?php print $node->nid; ?>"
olegnaumov’s picture

Status: Active » Closed (fixed)

Guys, thank you! I've read the instructions, but I forgot to add that code. It works perfectly now!

benitezv1ang’s picture

Version: 5.x-1.4 » 6.x-2.x-dev
Component: Miscellaneous » Code
Priority: Normal » Critical
Status: Closed (fixed) » Active

PLEASE NEED HELP!!
I've spent a week trying to make Ajax Attribute Calculations work with node-product.tpl.php
I'm using bluemarine theme it works if i remove node-product.tpl.php. But does not work with node-product.tpl.php when is uploaded.

This modules I'm using
drupal 6.20
Ubercart 6.x-2.4
Ajax Attribute Calculations 6.x-2.1

This is what I have in node-product.tpl.php file

<?php print $node->content['add_to_cart']["#value"]; ?>
<div class="sell_price">sell Price:<br /><?php print uc_currency_format($node->sell_price); ?></div>

This is what I have in node.tpl file

<?php
// $Id: node.tpl.php,v 1.7 2007/08/07 08:39:36 goba Exp $
?>
<div id="node-<?php print $node->nid; ?>"

  <div class="node<?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 }; ?>
    <span class="submitted"><?php print $submitted?></span>
    <div class="taxonomy"><?php print $terms?></div>
    <div class="content"><?php print $content?></div>
    <?php if ($links) { ?><div class="links">&raquo; <?php print $links?></div><?php }; ?>
  </div>


Please help me. I will appreciate a lot.
Thanks

jday’s picture

this is how I was able to get it to work with node-product.tpl.php

<div id="node-<?php print $node->nid; ?>"> 
  <div class="product-info product display">
        <span class="uc-price-product uc-price-display uc-price"><?php print uc_currency_format($node->sell_price); ?></span>
  </div>
</div>
BigMike’s picture

@ jday #8: I am using node-product.tpl.php and have confirmed that this works.

Thank you Sir,
BigMike