Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2004
    Posts
    246
    Plugin Contributions
    0

    Default Disable CSS buttons for some buttons and not others

    Hi

    I'd like to change the add to cart button to something a bit more fancy. All of the other buttons within my store use CSS and look fine. Can I disable the css button for add to cart and use my own graphic button instead and if so how.

    Thanks
    UK based Zen Cart Web Designer here www.handcoded.co.uk

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Disable CSS buttons for some buttons and not others

    That would require custom coding, but you can change the CSS on a particular button to make it stand out from the others.

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Disable CSS buttons for some buttons and not others

    Darn seven-minute edit limit. You could add something like this to stylesheet_css_buttons.css:

    .button_in_cart {background-image: url(../images/tile_back.gif);}

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Disable CSS buttons for some buttons and not others

    Since the add-to-cart button is a submit-type button, the default button-processing won't call the CSS button function if the button's alt-text is longer than 30 characters. So you can just change the define (in /includes/languages/english/YOUR_TEMPLATE/button_names.php)
    Code:
    define('BUTTON_ADD_TO_CART_ALT', 'Add This to My Cart');
    to have move than 30 characters and the add-to-cart button image will be loaded instead!

  5. #5
    Join Date
    Jul 2004
    Posts
    246
    Plugin Contributions
    0

    Default Re: Disable CSS buttons for some buttons and not others

    Thanks for that.

    Unfortunately that didn't work. Here is my code for the add to cart button.

    <input class="cssButton button_in_cart" onmouseover="this.className='cssButtonHover button_in_cart button_in_cartHover'" onmouseout="this.className='cssButton button_in_cart'" type="submit" value="Add to Cart" style="width: 80px;">
    UK based Zen Cart Web Designer here www.handcoded.co.uk

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Disable CSS buttons for some buttons and not others

    My bad, I gave you the wrong button ... change
    Code:
    define('BUTTON_IN_CART_ALT', 'Add to Cart');

  7. #7
    Join Date
    Jul 2004
    Posts
    246
    Plugin Contributions
    0

    Default Re: Disable CSS buttons for some buttons and not others

    Brilliant!

    That worked a treat. I didn't know about the 30 character limit.

    Thanks very much.
    UK based Zen Cart Web Designer here www.handcoded.co.uk

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Disable CSS buttons for some buttons and not others

    Quote Originally Posted by longstockings View Post
    Brilliant!

    That worked a treat. I didn't know about the 30 character limit.

    Thanks very much.
    You're very welcome! Remember that the 30-character limit applies only to submit-type buttons.

  9. #9
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Disable CSS buttons for some buttons and not others

    Quote Originally Posted by longstockings View Post
    Hi

    I'd like to change the add to cart button to something a bit more fancy. All of the other buttons within my store use CSS and look fine. Can I disable the css button for add to cart and use my own graphic button instead and if so how.

    Thanks
    For this I always use the old css button module from Paulm : http://www.zen-cart.com/downloads.php?do=file&id=169

    This one automatically uses css when no image is available

 

 

Similar Threads

  1. Help with using css buttons, "update cart' does not use the css buttons?
    By trinitypres in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 1 Jan 2011, 04:34 PM
  2. CSS default style for buttons works for some only
    By safeg in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 1 Dec 2010, 11:20 AM
  3. CSS buttons not fully working for some buttons in my shopping_cart page
    By chasery in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 13 Apr 2010, 07:37 PM
  4. Some CSS buttons not rendering
    By phatkodi in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 21 Jul 2008, 04:48 AM
  5. Using CSS Buttons yet still see graphic buttons on some pages
    By newbie73 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 Jul 2007, 12:51 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