Community Forums

customoising the "add to cart" button

Template support & advice for OpenCart v1.x

customoising the "add to cart" button

Postby techadd » Thu Mar 22, 2012 5:53 am

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

Postby florinsith » Thu Mar 22, 2012 4:44 pm

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.
User avatar
florinsith
 
Posts: 2694
Joined: Thu May 13, 2010 6:36 pm

Re: customoising the "add to cart" button

Postby techadd » Tue Apr 03, 2012 10:24 am

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

Postby wrangster » Mon Jun 04, 2012 9:42 am

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

Postby florinsith » Mon Jun 04, 2012 5:08 pm

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.
User avatar
florinsith
 
Posts: 2694
Joined: Thu May 13, 2010 6:36 pm

Re: customoising the "add to cart" button

Postby wrangster » Mon Jun 04, 2012 11:11 pm

I want to make the button look something like this:
Image

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

Postby wrangster » Tue Jun 05, 2012 5:25 am

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


Return to Template Support

Who is online

Users browsing this forum: cosmicx and 9 guests

Hosted by Arvixe Web Hosting