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
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
That would require custom coding, but you can change the CSS on a particular button to make it stand out from the 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);}
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)
to have move than 30 characters and the add-to-cart button image will be loaded instead!Code:define('BUTTON_ADD_TO_CART_ALT', 'Add This to My Cart');
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
My bad, I gave you the wrong button ... changeCode:define('BUTTON_IN_CART_ALT', 'Add to Cart');
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
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
Zen cart installation / maintenance / customisation / hosting
Supported Modules: Dutch language pack, Multi site, Dynamic Price Updater and more.
Bookmarks