Jump to content
Sign in to follow this  
POV

Help with If price = 0.00 dont display price

Recommended Posts

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


-------------------------------

Rob

Huntsville, AL

Share this post


Link to post
Share on other sites
 <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);
}

?>


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! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×