Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2008
    Posts
    154
    Plugin Contributions
    0

    Default Don't display the add to cart button

    I'd like some products to NOT show the 'Add to Cart' button AND to now show the 'Out of Stock' image. In other words, I'd like nothing to appear. These products will have their own link to a sales page outside of zen cart. I'm sure someone must have done this.

    thanks.
    Website Developer and Search Engine Optimazation Boise Idaho. Details at BoiseWired.com

  2. #2
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Don't display the add to cart button

    One simple way is to create a page-specific (or category-specific) stylesheet, following the directions in the readme file in the default CSS folder. You would simply set those elements you don't want to show to display: none; and they would not appear on those pages.

    You do have to create a stylesheet for each page or category you want this behaviour on, so if there's a lot of them it might be better to do some code smacking, about which others will no doubt advise.

    Rob

  3. #3
    Join Date
    Apr 2008
    Posts
    154
    Plugin Contributions
    0

    Default Re: Don't display the add to cart button

    yikes... are there any examples anywhere - that went way over my head..

    thanks...
    Website Developer and Search Engine Optimazation Boise Idaho. Details at BoiseWired.com

  4. #4
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Don't display the add to cart button

    Do you mean that what I said went over your head? Or was it the readme file's explanation?

    In either case, here's how it would work. If you go to your site and click on a category and then on a product, you'll see something like this in the address bar of your browser...

    http: // www. somesite .com /catalog/index.php?main_page=product_info&cPath=6&products_id=8
    That indicates that it is product id #8 in category id #6. (You can also get this from the admin/products and categories listings.)

    So to make a stylesheet for that particular product, you'd make a blank document in a suitable text editor (not a word processor) and name it p_8.css, or if you wanted one for all products in that category, you'd name it c_6.css. If it was a subcategory, you'd name it maybe c_6_11.css or whatever numbers were required.

    Then, in these custom stylesheets, you'd put something like this...

    #cartAdd { display: none; }

    That would have the effect of hiding the div that contains the Add To Cart button and the field where you enter a quantity. There's no need for anything except those lines used for hiding elements in this stylesheet. Your regular stylesheet will still be used by Zen Cart for everything else.

    When you've got your custom stylesheets done, ftp them into your custom folder's css folder and you're done.

    Try it; it can't hurt.

    Rob

  5. #5
    Join Date
    Apr 2008
    Posts
    154
    Plugin Contributions
    0

    Default Re: Don't display the add to cart button

    thanks so much for taking the time to help me..

    that worked partially.. it got rid of the cart but added an image of a shopping cart and an image of 'zen cart' watermark.. very strange.. see http://www.skinzee.com/website-templ...ordpress-p-114

    the only css i put in that file was
    @charset "utf-8";
    /* CSS Document */
    #cartAdd { display: none; }



    any ideas??
    Website Developer and Search Engine Optimazation Boise Idaho. Details at BoiseWired.com

  6. #6
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Don't display the add to cart button

    The cart image and the other one appear to be extra images for that product. When I disabled that page-specific stylesheet momentarily using the Web Developer tools in Firefox, the add to cart area reappeared. Those extra images were still there.

    You must have added extra images of the product, or at least have some images which have been named in such a way that they appear as extra images.

    Rob

  7. #7
    Join Date
    Apr 2008
    Posts
    154
    Plugin Contributions
    0

    Default Re: Don't display the add to cart button

    so sorry about that - i didn't think to check that.. you're right, i have no idea how those images got there on that product but when i removed them, it works fine..
    Website Developer and Search Engine Optimazation Boise Idaho. Details at BoiseWired.com

  8. #8
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Don't display the add to cart button

    Glad I could help.

    Rob

  9. #9
    Join Date
    Jan 2006
    Posts
    55
    Plugin Contributions
    0

    Default Re: Don't display the add to cart button

    Hi,

    I created a c_122.css file with #cartAdd { display: none; } in it and that is whats removed it from each individual product description page, however when you click on the category and view all products together it still shows each with an add to catr button underneath it (but not in each product description). The items are marked as £0 price and I say in description they wont be shipped but I am fairly sure some customers will still try to buy them - is there anyway to remove the add to cart from the category when all items viewed together?

  10. #10
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Don't display the add to cart button

    In admin, under Configuration/Product listing, find this one...

    Display Product Price/Add to Cart

    ... and set it to 0.

    I think that'll do the trick. But it is a site-wide switch, so if you only want this to happen for certain products, this won't work.

    Rob

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Quantity and add to shopping cart button don't show up.
    By magma in forum Setting Up Categories, Products, Attributes
    Replies: 17
    Last Post: 27 Jan 2016, 07:36 PM
  2. Add to cart, don't display product_info?
    By scrap in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 5 Apr 2009, 11:43 AM
  3. how to add the add-to-cart-button to the new products box on the home page?
    By ebloger in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 10 Nov 2008, 10:30 AM
  4. Display Product Add to Cart Button
    By marcink in forum General Questions
    Replies: 1
    Last Post: 2 Dec 2007, 07:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR