POV Posted September 29, 2006 Posted September 29, 2006 I am very happy with the "If price = 0.00 dont display price" contribution, by mike_the_monk. However, I am having trouble implementing this, on my product_info.php I had added an additional "add to cart" button, at the top of the page. This was due to some of my product information pages being rather long. The additional button was added with the following code: <div align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_IN_CART); ?> The contribution uses the following code to remove the "stock" "add to cart button, at the bottom of the page. <td class="main" align="right"><?php if ($product_info['products_price'] < 0.01){ echo 'Please Phone To Buy'; } else { echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } ?> </td> I am unable to find a working modification, of the code, to cause the "add to cart" button to not appear, when the item's price is $0.00. The bottom "add to cart" button works correctly. Thanks, Rob Quote ------------------------------- Rob Huntsville, AL
241 Posted September 29, 2006 Posted September 29, 2006 <div align="right"><?php if ($product_info['products_price'] < 0.01){ echo 'Please Phone To Buy'; } else { echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } ?> Quote No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.