Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to remove the "add to cart" button(s)


PaulHood

Recommended Posts

Posted

Hi,

 

I have been put in a situation where the "add to cart" buttons have to be removed! :( So does anyone know how to remove the add to cart button(s) (Just like the "reviews" buttons removal e.g. 803583)

 

This maybe a two stage process.

First stage like the reviews - if I could find it.

Second stage for the creation of the list/table - again if I could find it.

 

 

Many thanks in advanced :thumbsup:

 

 

Regards,

 

Paul Hood

Posted

Just so others know what to do if they come across this situation!

 

 

To remove the "add to cart button":

 

This is set up just like the reviews button removal! :)

Line 213~ of the product_info.php comment out the PHP tag like so:

<?php // echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

 

 

The Product Listing was a little more complicated for a first time user but I was able to remove the buy now column like so:

Line 60~ of the product_listing.php comment out the PHP tag like so:

 //$lc_text = TABLE_HEADING_BUY_NOW;
Replace with on the following line:
$lc_text = '';

 

&

 

Line 133~ of the product_listing.php comment out the PHP tag like so:

//$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> ';
Replace with on the following line:
$lc_text = ' ';

 

 

All of these changes do not affect the functions of the osCommerce System they just stop the ?add to cart? icons being displayed on the pages. These are easily reversible changes. :thumbsup:

 

 

Regards

 

 

Paul Hood

Archived

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

×
×
  • Create New...