Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

buy now and add to cart buttons


Steel

Recommended Posts

Posted

I am currently trying to remove the buy now and add to cart buttons when I have a price of $0.00 listed in the admin and am having little luck. I got the add to cart solved but now need to fix the buy now button. I have removed the add to cart button by changing this code in product_info.php:

 

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

to this code

 

<? if ($product_info['products_price'] > 0) { ?> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td><? } ?>
<? if ($product_info['products_price'] == 0) { ?> <td class="main" align="right"> </td><? } ?>

 

Now I have been looking at the product_listing.php file at this:

 

case 'PRODUCT_LIST_BUY_NOW':

            $lc_align = 'center';

            $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

            break;

        }

But cant seem to get it, any suggestions? am I even on the right track or totaly off?

I have tried a 2 contribs "free call for prices and hide add to cart" but they are just not what I want or are not working the way I need them. If I could get this one code fixed I would have my problem solved.

 

Thanks

Steel

Posted

Or coupld it be in here?

case 'PRODUCT_LIST_BUY_NOW':
       $lc_text = TABLE_HEADING_BUY_NOW;
       $lc_align = 'center';
       break;
   }

   if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
     $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
   }

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...