Bestseller block - remove selling price

Posts: 86
Joined: 02/06/2008

How can I remove Sell Price column on the Best seller block ?

Posts: 86
Joined: 02/06/2008

My Bestseller block appears with Image, Item Name & Sell Price columns. How can I get rid of the Sell Price Column ?

Posts: 46
Joined: 11/22/2007

I made a phptemplate_uc_bestsellers_products() function for it. It goes like this:

function phptemplate_uc_bestsellers_products($products){
$output = "<div id=\"view-bestsellers\">";
$nr = 1;
foreach($products as $p){
$node = node_load((int)$p);
//var_dump($node);
$vars['nid'] = $node->nid;
$vars['nr'] = $nr;
$vars['name'] = $node->title;
$vars['description'] = $node->body;
$vars['image'] = (file_exists($node->field_image_cache[0]['filepath']))?l(theme('imagecache', 'product_list', $node->field_image_cache[0]['filepath']), "node/".$node->nid, array(), null, null, false, true):'';
$vars['list_price'] = $node->list_price;
$vars['sell_price'] =  $node->sell_price;
$vars['recupel'] =  ((float)$node->field_recupel[0]['value'] > 0)?$node->field_recupel[0]['value']:'';
$vars['link'] =  url('node/'.$node->nid);
$recupel = ((float)$node->field_recupel[0]['value'] > 0)?$node->field_recupel[0]['value']." &euro; recupel + ":'';
$vars['kosten'] = $recupel . t('Tax included');
$output .= _phptemplate_callback('bestsellers', $vars);
$nr++;
}
return $output."</div>";
}

In my bestsellers.tpl.php, our designer can do anything he wants... You might not need all the code for this, it depends on what you want to change, but the phptemplate_uc_bestsellers_products function is the key.

Posts: 25
Joined: 12/26/2007

And if theming scares you, find the appropriate CSS selector for that piece of information, then nuke it from your stylesheet:

#bestseller-block #bestseller-price {
display: none;
}

(I don't quickly see the bestseller block, otherwise I'd give you the selector to use.)