Jump to content



Latest News: (loading..)

- - - - -

Tip: Remove [Add to Cart] button


  • Please log in to reply
7 replies to this topic

#1   Arctic Fox

Arctic Fox
  • Members
  • 89 posts
  • Real Name:Арктическая Зимняя Лиса
  • Gender:Not Telling

Posted 28 December 2007 - 09:28 PM

I hate installing a bunch of code for something simple. I've a few things that I either am not actually selling (free downloads), or am displaying an item that is not/no longer for sale, but information might need to stay on my site (for a history of reviews).

So when I don't want the [Add to Cart] button to show up on one or two pages (or 50), I use this bit of code in the "Products Description":

<style>
TD.main input {display:none;}
</style>


It's a hack job, I know - I got that idea from messing with my MySpace page. It works.

#2   Arctic Fox

Arctic Fox
  • Members
  • 89 posts
  • Real Name:Арктическая Зимняя Лиса
  • Gender:Not Telling

Posted 01 January 2008 - 09:37 PM

Another idea I may work on is a PHP script that will remove the [Add to Cart] button if my supplier's inventory is < #.

#3   EricK

EricK
  • Members
  • 313 posts
  • Real Name:Eric_K
  • Gender:Male
  • Location:Atlanta, GA USA

Posted 05 January 2008 - 01:55 AM

You can easily hide the Add to Cart button on catalog/product_info.php using this contribution.

Easy Call for Price v1.0
http://addons.oscommerce.com/info/3211

When you set a product's price to zero, the script displays whatever you want. I replaced my Add to Cart button code with this:
<?php // bof: BEGIN EASY CALL FOR PRICE v1.0
	if ($product_info_values['products_price'] == CALL_FOR_PRICE_VALUE){
	 echo '<a href=contact_us.php>' . TEXT_CALL_FOR_PRICE . '</a>';
	} else {
	echo tep_image_submit('button_add_to_cart.gif', IMAGE_BUTTON_ADD_TO_CART); }
// eof: END EASY CALL FOR PRICE v1.0
?>
Cheers,
EricK

#4   jerrymc

jerrymc
  • Members
  • 65 posts
  • Real Name:Jerry McDonald

Posted 22 February 2008 - 10:46 PM

Eric:

Where is the cart button code located? What page? The Easy Call For Price v1.0 directs one to alter code on products_info.php but that page does not exist in my new, clean install (2.2). I'd really like to use the contrib but I'm stumped.

thanks,


View PostArctic Fox, on Jan 1 2008, 01:37 PM, said:

Another idea I may work on is a PHP script that will remove the [Add to Cart] button if my supplier's inventory is < #.


#5   Coopco

Coopco
  • Members
  • 9,557 posts
  • Real Name:Leslie Cooper
  • Gender:Male
  • Location:Sea Lake, Victoria, Australia

Posted 23 February 2008 - 01:13 AM

View Postjerrymc, on Feb 23 2008, 09:46 AM, said:

Eric:

Where is the cart button code located? What page? The Easy Call For Price v1.0 directs one to alter code on products_info.php but that page does not exist in my new, clean install (2.2). I'd really like to use the contrib but I'm stumped.

thanks,
It is in the catalog dircetory, or root directory if store is in the root.


The Coopco Underwear Shop



If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

#6   desiredin

desiredin
  • Members
  • 278 posts
  • Real Name:Wayne Stevenson

Posted 10 April 2008 - 09:59 PM

View PostArctic Fox, on Jan 1 2008, 09:37 PM, said:

Another idea I may work on is a PHP script that will remove the [Add to Cart] button if my supplier's inventory is < #.
Beautiful. Helped me out of a couple hours of bashing my head aimlessly before giving up, while trying to work out an update to the Hide Add To Cart contribution.
http://www.oscommerce.com/community/contributions,1765

I've used that contribution on a couple stores to disable the product when books, DVDs, etc go out of print. I still want those products listed because most of them eventually will get a second printing run done so I don't want to lose my search engine status for those pages.

I want this now for my new shop which will be selling downloadable instructional videos. There are pre-requisite knowledges needed for the downloads, so I've bundled the products as a Get 1 Free ( http://www.oscommerce.com/community/contributions,4990 ) item, but I do not want to sell that file. Just have it as a download. So I want customers to not be able to add it through the reviews, and product listings.

I prefer the Hide Add To Cart contribution, as I can see all the products that have their add to cart button listed in a couple clicks. Plus I can also quickly change it by removing the manufacturer listing. But I'm having a heck of a time changing the code over to work with my OSC2.2 RC2.

$25 Paypal to anyone who can update that contribution to work with OSC2.2 RC2 in the next few days. It isn't much, but I'm serious....... [/incentive].

#7   Olivia_Kinc

Olivia_Kinc
  • Members
  • 13 posts
  • Real Name:Karen
  • Gender:Female
  • Location:Toronto

Posted 01 April 2012 - 10:30 PM

Thanks, this worked great. Except the Add to Cart button is gone from the product page but still exists on the category page. Can I remove this?

#8   bajka

bajka
  • Members
  • 1 posts
  • Real Name:Weronika
  • Gender:Female

Posted 23 May 2012 - 09:07 PM

View PostOlivia_Kinc, on 01 April 2012 - 10:30 PM, said:

Thanks, this worked great. Except the Add to Cart button is gone from the product page but still exists on the category page. Can I remove this?
up!
How to change the code (in new_products.php I suppose..) ? Help me, please