2 replies [Last post]
lucsar's picture
Joined: 06/07/2012
Juice: 87
Was this information Helpful?


I'm trying to customize my product page positioning elements (add-to-cart, datasheets, product images, info text area, tables) and price too of course.

First, I use to display elements like this (node--product.tpl):

print render($content['add_to_cart']);
print '<div class="custom-class">custom text</div>';
print render($content['field_product_datasheet']);

The problem is when I try to render price:

print render($content['display_price']);

This create different classes for the element: product-info,display-price, and uc-product-46

Now, I need to override display-price class attributes for the correct position in the page.

So, I try with:

print '<div class="my-custom-class">'.$content['display_price']['#value'].'</div>'

that's work fine but I have no currency symbol displayed, € in this case. I get only raw price.

How can I get this symbol? or perhaps can I reach my scope in different way?

Thank you all for help.

DanZ's picture
Joined: 08/07/2011
Juice: 1738
Try theme_uc_price() or
lucsar's picture
Joined: 06/07/2012
Juice: 87
Re: Try theme_uc_price() or

added this In node--product.tpl.php:

$output_price =  uc_currency_format($content['display_price']['#value'], $sign = NULL, $thou = NULL, $dec = NULL);

it returns me currency and value. Nice Eye-wink

I wonder if i can get this using theme template.php instead like in theme_preprocess_node() function.