Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with If price = 0.00 dont display price


POV

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

Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...