Many thanks to all who have helped me out so far along my epic journey
What I am trying to do now is replace the price and the quantity input field in my product listing with 'Call for Price' if the products price is 0.00 but leave the fields as they are if the products price is greater than 0.00
[img]http://i56.tinypic.com/976stk.jpg[/img]
The code I currently have is
case 'PRODUCT_LIST_PRICE':
if (tep_not_null($listing['specials_new_products_price'] > '0')) {
$prod_list_contents .= ' <td width="20%" align="center"><del>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span></td>';
} else {
$prod_list_contents .= ' <td width="20%" align="center">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>';
}
break;
case 'PRODUCT_LIST_BUY_NOW':
if (tep_not_null($listing['specials_new_products_price'] > '0')) {
$prod_list_contents .= '<td width="20%" align="left">' . TEXT_QTY . ' <input type="text" name="add_id['.$number_of_products.']" value="" size="4">';
$prod_list_contents .= '<input type="hidden" name="products_id['.$number_of_products.']" value="'.$listing['products_id'].'"></td><td width="2px"> </td>';
}else{
$prod_list_contents .= '<td width="20%" align="left">' . TEXT_QTY . ' <input type="text" name="add_id['.$number_of_products.']" value="" size="4">';
$prod_list_contents .= '<input type="hidden" name="products_id['.$number_of_products.']" value="'.$listing['products_id'].'"></td><td width="px"> </td>';
}
break;
Can this be done with a simple if/else statement and if so how?
Thanks
Mark















