vrob Posted May 12, 2009 Share Posted May 12, 2009 Hi. I want to put a custom "add to cart" image that already has the text "add to cart". How can I remove just the text add to cart but keep the button's functionality? Is it something I can do with display:none; in the global.css (havent' found where yet) or is it in the product.tpl or somewhere else? I've worked at this for awhile and would appreciate any ideas.Thanks! Link to comment Share on other sites More sharing options...
Masino Sinaga Posted May 12, 2009 Share Posted May 12, 2009 All you have to do is just simply edit \themes\prestashop\product.tpl file.Find this: <input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /> ... then replace with your image code, such as: If you implement more than one theme, don't forget to edit the same file in that/those another theme(s). Link to comment Share on other sites More sharing options...
vrob Posted May 12, 2009 Author Share Posted May 12, 2009 Thanks! That put me on the right track, but I had to add input type instead of just the img src. Here's what works: <input type="image" height="40" width="150" src="http://mysite-button.gif" border="0" /> The only thing is that the margin:0 auto; that's in the global.css for this div doesn't center the image anymore. I tried making my own css reference: #add_to_cart input{margin:0 auto;} but that doesn't help and I can't find the issue using firebug. Any ideas on how to center the button? Link to comment Share on other sites More sharing options...
Psychodays Posted May 13, 2009 Share Posted May 13, 2009 first can you give us your site?the button has two classes: one is "exclusive" and the other is "ajax_add_to_cart_button". You may edit one of this class to add a background image using the css : {background-image: url(../path to your image/image.jpg) repeat none, top left;} and erase the value of the button (the actual text Add to Cart) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now