Guest Posted May 25, 2004 Posted May 25, 2004 I would like it if anyone has an idea on how to add code so that if a product's weight is 0, a free shipping graphic would appear after the product. I am looking to do this on the product category page itself where all the products in the same category are listed. Has anyone else done something like this? Thanks, Gary. My web site by the way is Juicers For Less
Acheron Posted May 28, 2004 Posted May 28, 2004 Well, you should just be able to add the field for product_weight (whatever it is) to the product query in whatever files you want it to display. Then add something like ... <td><?php if ($product[products_weight] != '0') { echo tep_image ...; } else { <td><?php echo tep_image(placeholder.gif', '100%', '10'); ?></td>; } ... to wherever you want it to display. The } else { with the 2nd image would be to keep you from having the page look differently if there was no graphic. Just make a transparent image of the same size to keep it simple and put that in the else statement.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.