Post by oc5 » Fri Jan 28, 2011 1:08 am

i'm wondering how to change the add to cart button image, it is so small, i would prefer a wide rectangle one if possible, i tried to replace the image file, but it only show a small tall rectangle, can somebody help me please thank you, :)

oc5
New member

Posts

Joined
Fri Jan 07, 2011 7:50 pm

Post by Chones » Fri Jan 28, 2011 2:59 am

You need to change the images button_left.png and button_right.png

Then in the stylesheet, in .button span, you need to change the padding
The default is padding: 4px 12px 5px 5px;

It goes round like a clock, so first is top, then right, bottom and left.

To widen the button you could therefore try padding: 4px 24px 5px 17px;

http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk


User avatar
Active Member

Posts

Joined
Wed Mar 24, 2010 9:07 pm
Location - London

Post by oc5 » Fri Jan 28, 2011 11:57 am

Hi Chones, glad to hear from you again & thanks for your replied :) the button i mention are not the one when viewing the product then add to cart, but the one in the Latest Product/Featured, with the (Little Plus Sign at each product's right bottom) +. :)

oc5
New member

Posts

Joined
Fri Jan 07, 2011 7:50 pm

Post by Chones » Fri Jan 28, 2011 3:16 pm

Ah, sorry. You need to change the styles for .button_add_small

If you're making it much bigger it might be worth also adding some text in each template too. Instead of

Code: Select all

<a class="button_add_small" href="<?php echo $products[$j]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" >&nbsp;</a>
Use

Code: Select all

<a class="button_add_small" href="<?php echo $products[$j]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" >Add to Cart</a>
Hope that helps.

http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk


User avatar
Active Member

Posts

Joined
Wed Mar 24, 2010 9:07 pm
Location - London

Post by oc5 » Fri Jan 28, 2011 7:00 pm

Hi Chones,
It helps :) You are genius :) Thank you very much for your help, it fits perfectly what i wanted to :D much appreciate :)

oc5
New member

Posts

Joined
Fri Jan 07, 2011 7:50 pm

Post by Sidecutter » Sun Jan 30, 2011 1:28 pm

Hi Chones, I found this thread and was hoping you could help me as well. I want to take that same tiny little "add to Cart" button, replace it with a much more reasonably sized (and themed) button, and drop it down one line so it is under the product price instead of to the right of the product's price.

Can you point me to the right files and changes for this, other than simply replacing the button?

I also want to replace the Add to Cart button on the detailed product page with a variation on this same button, but as that one seems to be composed of several elements I'm not sure what all needs changing.

Any help will be greatly appreciated!

Active Member

Posts

Joined
Tue Jan 18, 2011 6:58 am

Post by Chones » Sun Jan 30, 2011 5:53 pm

Hi Sidecutter, the small Add to cart is added using this code

Code: Select all

<a class="button_add_small" href="<?php echo $products[$j]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" >&nbsp;</a>
You will find it, or something very similar, in the category template, product template, and most of the module templates.
You can change it to a big button by copying one of the other buttons - so basically giving it the class "button" and adding a <span>, like this.

Code: Select all

<a class="button" href="<?php echo $products[$j]['add']; ?>"><span><?php echo $button_add_to_cart; ?></span></a>
Notice I also removed the title, and used it for the text on the button instead.

http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk


User avatar
Active Member

Posts

Joined
Wed Mar 24, 2010 9:07 pm
Location - London

Post by Sidecutter » Mon Jan 31, 2011 12:24 am

Hi Chones,

Thank you. What I actually want to do though is substitute an image of my own which already exists, and has the text embedded in it as part of the image, not to have it replicate the large button button which is created on the fly by the cart. I want to use this same button in place of the one the cart generates on the product page. Would it help if I was to do a quick mockup in photoshop?

Active Member

Posts

Joined
Tue Jan 18, 2011 6:58 am

Post by Chones » Tue Feb 01, 2011 2:18 am

Hi Sidecutter,

Just edit the .button_add_small style in the stylesheet, and give it enough padding so that it is big enough to show your whole image e.g. padding: 5px 12px 5px 12px;

That should do it.

http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk


User avatar
Active Member

Posts

Joined
Wed Mar 24, 2010 9:07 pm
Location - London

Post by Sidecutter » Wed Feb 02, 2011 9:48 am

That doesn't fix the button on the actual product page though, or move the button in the product previews (homepage, category list of products, etc) down under the price...

Active Member

Posts

Joined
Tue Jan 18, 2011 6:58 am

Post by Chones » Wed Feb 02, 2011 3:43 pm

To move it under the price you'll need to edit the category template, latest_ome template etc. and add a <br /> before the button. Or firstly you could try adding display: block; to the style.

The Add to Cart on the Product page is a different button - it has the class "button" like the search button and the continue button on information pages etc.

If you want to change that, but not all the others, you'll need to give it a new class in the product template, then add your own styles for that class in your stylesheet.

http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk


User avatar
Active Member

Posts

Joined
Wed Mar 24, 2010 9:07 pm
Location - London
Who is online

Users browsing this forum: No registered users and 13 guests