Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add to cart button layout order

Add to cart button layout order

Locked

Views: 3,040

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
17 Feb 2007, 11:10 AM
#1
obife avatar

obife

New Zenner

Join Date:
Apr 2005
Location:
Portugal
Posts:
15
Plugin Contributions:
0

Add to cart button layout order

Can someone please tell me how I can change the postion of the "Add To Cart" button?

At hte moment it appears just above and to the right of any "options" drop down menus or radio buttons I may have. I would like that these option controls come before the add to cart button.

Help, please.

Phil

17 Feb 2007, 11:24 AM
#2
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Add to cart button layout order

You have 2 options - use CSS positioning (preferred option) or you can edit includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php

17 Feb 2007, 11:49 AM
#3
obife avatar

obife

New Zenner

Join Date:
Apr 2005
Location:
Portugal
Posts:
15
Plugin Contributions:
0

Re: Add to cart button layout order

Ah, I thought that there was a way in setting out the layout order within the Admin area. (in fact I'm sure I did it that wat a couple of years ago with an older version of Zen)

17 Feb 2007, 11:58 AM
#4
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Add to cart button layout order

That's for the listing pages, not the Product Info page

17 Feb 2007, 12:21 PM
#5
obife avatar

obife

New Zenner

Join Date:
Apr 2005
Location:
Portugal
Posts:
15
Plugin Contributions:
0

Re: Add to cart button layout order

Right, thanks for the help and it was good help.

But (there's always one of those devils) got the add to cart button below the option thingies but the tell a friend and write review went where they shouldn't, well they were in a neat horizontal line then after moving the Add2 they ended up one top of each other and to the left of the Add2. I then changed the Add2 to apear below these two buttons only to have the "when added" text apear to the left of the Add2 button.

I'm not that hot with php (useless more like) I understand HTML and that's about it. I can't see anything that tells me where what is aligned, maybe if I could I might be able to re-arrange it.

The ideal thing would be to have the options (on one line so to speak) then followed by the Add2 button, then the 2 other buttons (in line like they were) under the Add2 and finally the when added text.

Any ideas?

Phil

PS: If you go here you will see what I mean:http://www.carpas-a-vista.com/Loja/index.php?main_page=product_info&cPath=65&products_id=309

17 Feb 2007, 12:36 PM
#6
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Add to cart button layout order

Are you trying to physically move it or are you using css?

17 Feb 2007, 12:44 PM
#7
obife avatar

obife

New Zenner

Join Date:
Apr 2005
Location:
Portugal
Posts:
15
Plugin Contributions:
0

Re: Add to cart button layout order

I'm doing it by the tpl_product_info_display.php you mentioned.

CSS! LOL, You're having a laugh arn't you? That's even more confusing than php in my mind lol

If I can just get the Add2 on it's own on the line below the options thingy and with the "Tell a..." & ""Coment..." buttons on the line below it (and in line with each other horizontally) I'll be bloody happy.

17 Feb 2007, 1:40 PM
#8
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Add to cart button layout order

I don't have the time to explain the details of how to edit php files, but if you want to send me a copy of your tpl_product_info_display.php (the backup copy you made before you changed it!) I'll fix it for you.

Zip it and upload it here as an attachment.

17 Feb 2007, 3:00 PM
#9
obife avatar

obife

New Zenner

Join Date:
Apr 2005
Location:
Portugal
Posts:
15
Plugin Contributions:
0

Re: Add to cart button layout order

Cheers Ryk

17 Feb 2007, 3:14 PM
#10
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Add to cart button layout order

The file you sent me has the Add2cart where you want it, so the most likely thing is that this is a css issue. Put back the file you've just sent me, then let me know. (Rather than cluttering up the forum, go to https://www.rnscomputing.co.uk and click the boldchat link)

19 Feb 2007, 2:51 AM
#11
chksdtr avatar

chksdtr

New Zenner

Join Date:
Feb 2007
Posts:
18
Plugin Contributions:
0

Re: Add to cart button layout order

Hiya! Sorry to be a pest, but this is what I am trying to do. Can you say what it is that I need to change? I haven't tried to play with the tpl page yet (don't understand PHP that much)! But will give it a go. Hopefully you will reply with the how to do this :blush:
Kristal

19 Feb 2007, 9:02 AM
#12
ryk avatar

ryk

Totally Zenned

Join Date:
Oct 2004
Location:
Southport, UK
Posts:
3,644
Plugin Contributions:
6

Re: Add to cart button layout order

You adjust the positioning in your stylesheet using css; the class you need to apply it to is #cartAdd

This is not the place for a detailed tutorial on css (and I'm not qualified to give a detailed tutorial! :D ), but a basic summary of positioning is that using ```
position: relative; top : 50px; right: 100px;


position: absolute; top : 50px; right: 100px;


Bear in mind that moving one element will often require adjustment of others.

As has been said often, one of the best things you can do for yourself is to download Firefox and the Web Developer Toolkit add-on, then you can play around with the CSS tools, changing it on the fly and saving your changes if you wish.
19 Feb 2007, 3:47 PM
#13
chksdtr avatar

chksdtr

New Zenner

Join Date:
Feb 2007
Posts:
18
Plugin Contributions:
0

Re: Add to cart button layout order

Well thank you very much! I will give that a go then! I appreciate the response. Take care.
Kristal

19 Feb 2007, 4:45 PM
#14
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Add to cart button layout order

19 Feb 2007, 4:47 PM
#15
chksdtr avatar

chksdtr

New Zenner

Join Date:
Feb 2007
Posts:
18
Plugin Contributions:
0

Re: Add to cart button layout order

Well YEAH!!!! I got the Add to Cart box centered now working on the Write Review and Tell Friend buttons to be centered! Isn't it funny how we fix one thing only to find that there is now something else we want fixed?? lol
Okay, back to firefox and the css editor thing, but I think I need to to that in a template somewhere....hmm maybe not, I have an idea!
Thanks for the advice with Firefox btw! Very cool! :yes:
Kristal

19 Feb 2007, 7:08 PM
#16
chksdtr avatar

chksdtr

New Zenner

Join Date:
Feb 2007
Posts:
18
Plugin Contributions:
0

Re: Add to cart button layout order

I did it!
I am so excited, had to post! :yes:

Here

Kristal