customoising the "add to cart" button
7 posts
• Page 1 of 1
customoising the "add to cart" button
i like to customise the "add to cart" button on opencart 1.5.2.1 default theme to be a little smaller or maybe even replace it with a custom button instead, can anyone point me out to which files i need to edit in order to achieve it?


- techadd
- Posts: 5
- Joined: Mon Mar 05, 2012 4:46 am
Re: customoising the "add to cart" button
Currently al buttons in default theme , use the same class, button, to alter that one, edit the file catalog/view/theme/yourtheme/stylesheet/stylesheet.css and look at the blocks a.button and input.button and change the properties you want. If you want a custom one for the add to cart, first , you would need to edit every tpl file that contains the add to cart button, and edit the add to cart class to a new one and then style it in css.
-

florinsith - Posts: 2694
- Joined: Thu May 13, 2010 6:36 pm
Re: customoising the "add to cart" button
ok thank you very much for your answer 

- techadd
- Posts: 5
- Joined: Mon Mar 05, 2012 4:46 am
Re: customoising the "add to cart" button
Hi! I have the same wish, but this sounded like a lot of work. Is it possible to insert a little icon before the text on the cart-button? I use the Alternative Default template from Florinsith. 

- wrangster
- Posts: 28
- Joined: Mon Jun 04, 2012 9:27 am
Re: customoising the "add to cart" button
If you insert an image, there are chances that the button wont look aligned anymore, maybe if you use a 12px high image would work, but what could you see in that. The best way is still trough css, and its not that much work.
-

florinsith - Posts: 2694
- Joined: Thu May 13, 2010 6:36 pm
Re: customoising the "add to cart" button
I want to make the button look something like this:

I got it to show this buttonimage through css, but then it showed that image for the login-button and continue-buttons and so on.
I tryed to make a buybutton-class, but I could not make that work either.
I tryed to make a 12px icom of a shopping-cart and insert it before the "add to cart"-text, but I could not make it show.

I got it to show this buttonimage through css, but then it showed that image for the login-button and continue-buttons and so on.
I tryed to make a buybutton-class, but I could not make that work either.
I tryed to make a 12px icom of a shopping-cart and insert it before the "add to cart"-text, but I could not make it show.
- wrangster
- Posts: 28
- Joined: Mon Jun 04, 2012 9:27 am
Re: customoising the "add to cart" button
I also have a little problem with the alternative-template. The logout-button that appears in the welcome-text while logged in, does not work. I tryed replacing the %s-code with the actual url, but still it's not working. The cursor doesn't turn in to a hand when hovering, and nothing happens when clicking. When logged out both login and register works fine.
- wrangster
- Posts: 28
- Joined: Mon Jun 04, 2012 9:27 am
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: cosmicx and 9 guests














