Guest Posted April 12, 2007 Posted April 12, 2007 Yes, I know I can change the product listing in admin. But in this case, we have a large store with many different products. On some products I want to show the weight colum in product listing, and on other products i dont want to show the weight column. If weight = "0", dont show the column. If weight = "more then 0", show the column. I want the entire weight column, with the header to disapere when wheigt is 0. Any way to do this? *sorry for bad english*
Guest Posted April 13, 2007 Posted April 13, 2007 Yes, I know I can change the product listing in admin. But in this case, we have a large store with many different products. On some products I want to show the weight colum in product listing, and on other products i dont want to show the weight column. If weight = "0", dont show the column. If weight = "more then 0", show the column. I want the entire weight column, with the header to disapere when wheigt is 0. Any way to do this? *sorry for bad english* So - obviously you already have the weight stored in a variable right ? if ($query_var['weight'] != 0) { echo "<tr><td>The weight of this product is ". $query_var['weight'] . " kilograms.</td></tr>"; } or - if the weight is actually NULL and not zero, just do this : if ($query_var['weight']) { echo "<tr><td>The weight of this product is ". $query_var['weight'] . " kilograms.</td></tr>"; } Corrina
Recommended Posts
Archived
This topic is now archived and is closed to further replies.