Last updated April 20, 2012. Created on April 20, 2012.
Edited by compujohnny. Log in to edit this page.

This page refers to the module Ubercart Make an Offer It describes how to remove the occurrence of the zero price at all.

You can add the following code to your theme to replace the $0.00 sell and list price with a Call for price using the following code (using the marinelli theme as an example)

function marinelli_uc_price($value, $context, $options) {
  // Fixup class names.
  if (!is_array($context['class'])) {
    $context['class'] = array();
  foreach ($context['class'] as $key => $class) {
    $context['class'][$key] = 'uc-price-'. $class;
  $context['class'][] = 'uc-price';
  // Class the element.
  $output = '<span class="'. implode(' ', $context['class']) .'">';
  // Prefix(es).
  if ($options['label'] && isset($options['prefixes'])) {
    $output .= '<span class="price-prefixes">'. implode('', $options['prefixes']) .'</span>';
  // Value.
  $output .= $value;
  // Suffix(es).
  if ($options['label'] && isset($options['suffixes'])) {
    $output .= '<span class="price-suffixes">'. implode('', $options['suffixes']) .'</span>';
  $output .= '</span>';

  if($value == t('$0.00')){
  $output = '<span class="'. implode(' ', $context['class']) .'">'.t('Call for price').'</span>';

  return $output;

function marinelli_uc_product_price($price, $context, $options = array()) {
  if ($price !=0) {
    $output = '<div class="product-info '. implode(' ', (array)$context['class']) .'">';
    $output .= uc_price($price, $context, $options);
    $output .= '</div>';
  return $output;

Looking for support? Visit the forums, or join #drupal-support in IRC.


xl_cheese’s picture

Thanks for this chunk of code! It worked for me, but it also conflicted with the UberPOS module. My receipts started coming up as call for price! hahah.