Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / move add to cart button

move add to cart button

Locked

Views: 3,582

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
30 May 2008, 1:52 AM
#1
marypotter avatar

marypotter

New Zenner

Join Date:
May 2008
Location:
Virginia Beach, Virginia, United States
Posts:
52
Plugin Contributions:
0

move add to cart button

http://intelligenttease.com/store/index.php?main_page=product_info&products_id=1

I would like to get the "add to cart" button to be on the same line as the "size" and "quantity". I managed to get quantity and size on the same line. I can't figure out how to add that button on that same line.

Also, does anyone know how I could move the word "quantity" over a little so it doesn't run right up against the size options?

Please help!

30 May 2008, 3:12 AM
#2
marypotter avatar

marypotter

New Zenner

Join Date:
May 2008
Location:
Virginia Beach, Virginia, United States
Posts:
52
Plugin Contributions:
0

Re: move add to cart button

Just wanted to post a message saying I figured it out.
http://intelligenttease.com/store/index.php?main_page=product_info&products_id=1

What I did was:

  1. change
    size="4" /><br />' . zen_get

to
size="4" />' . zen_get
<i>(that is, remove the br)</i>

  1. then change
    $_GET['products_id']) . '<br />' . zen_draw_hidden_field

to
$_GET['products_id']) . zen_draw_hidden_field
<i>(remove the br and keep only one .)</i>

  1. then add <br style="clear:both"> after the <div> tag so my border wouldn't be all wonky.

Then to get the "quantity" to move, I added this in the stylesheet.css:
#cartAdd {
float: left;
margin-left: 1em;
}

30 May 2008, 3:17 AM
#3
marypotter avatar

marypotter

New Zenner

Join Date:
May 2008
Location:
Virginia Beach, Virginia, United States
Posts:
52
Plugin Contributions:
0

Re: move add to cart button

I did find that in ie 6 that the border still acts a fool. Anyone have any suggestions on that?

30 May 2008, 3:22 AM
#4
marypotter avatar

marypotter

New Zenner

Join Date:
May 2008
Location:
Virginia Beach, Virginia, United States
Posts:
52
Plugin Contributions:
0

Re: move add to cart button

I added

#cartAdd input {
vertical-align: middle;
}

to the stylesheet.css

and that fixed it.

Problem solved. I hope this is helpful to other people.

31 May 2008, 6:09 AM
#5
nev avatar

nev

New Zenner

Join Date:
Nov 2007
Location:
Canada
Posts:
49
Plugin Contributions:
0

Re: move add to cart button

i'd love to know how you got the get quantity and size on the same line.

i found too many divs in the attribute block to get that to work nicely

however you still have a problem that when there is an item in the cart it breaks your line with a "quantity of items in cart : 1" and throws the quantity and the add to cart button to the next line

2 Jun 2008, 5:06 AM
#6
marypotter avatar

marypotter

New Zenner

Join Date:
May 2008
Location:
Virginia Beach, Virginia, United States
Posts:
52
Plugin Contributions:
0

Re: move add to cart button

I'm not real sure what you are asking me. The coding above is how I got everything to go on the same line. But I'm not sure what you were saying about the shopping cart saying 1.

2 Jun 2008, 8:09 AM
#7
nev avatar

nev

New Zenner

Join Date:
Nov 2007
Location:
Canada
Posts:
49
Plugin Contributions:
0

Re: move add to cart button

add an item to the cart, go back to the same item product page
you will see that you have the attribute drop down. then in the same line is written "quantity of items in cart : 1"
then the quantity and the add to cart button underneath in the next line

when there is an item in the cart and you on the product page of that item, zen cart will display this message "quantity of items in cart : 1" it can be 2 if you have 2 of that specific product in the cart. its to advise the customer that he already has x# of that product in the cart

2 Jun 2008, 4:05 PM
#8
marypotter avatar

marypotter

New Zenner

Join Date:
May 2008
Location:
Virginia Beach, Virginia, United States
Posts:
52
Plugin Contributions:
0

Re: move add to cart button

that isn't happening for me. i'm not getting the quantity of item in cart: 1 after adding the item to the cart and returning to the product page. so i'm not real sure what's going on. can you post a screen shot of what you are talking about so i can see?

3 Jun 2008, 3:25 AM
#9
nev avatar

nev

New Zenner

Join Date:
Nov 2007
Location:
Canada
Posts:
49
Plugin Contributions:
0

Re: move add to cart button

3 Jun 2008, 2:03 PM
#10
marypotter avatar

marypotter

New Zenner

Join Date:
May 2008
Location:
Virginia Beach, Virginia, United States
Posts:
52
Plugin Contributions:
0

Re: move add to cart button

thats crazy. what version of ie are you using and what operating system? i have to look into it so i can fix it.

ie is going to be the death of me. i know it.

4 Jun 2008, 12:06 AM
#11
nev avatar

nev

New Zenner

Join Date:
Nov 2007
Location:
Canada
Posts:
49
Plugin Contributions:
0

Re: move add to cart button

the image is taken on ie7 on vista 64bit, but i get the same on Firefox & opera on vista, on ie and Firefox and opera on xp

this has nothing to do with the browser or operating system.

it seems to work a bit "strange" on your site, on mine from whatever page you go back to the product page that has an item in the shopping cart this message displays, on yours it doesn't always display, when you go back using the browser back button from the shopping cart, or come to the page from the product category you don't see it. when you are in the shopping cart and click the link in the shopping cart to go back to that product you see the msg.

from what i understand of how it’s "supposed" to work, the quantity in cart msg is supposed to always display on a product page when that product has a quantity in the shopping cart. so in a way the problem on your cart is actually occurring not when it displays, but when it does not. I know you don’t want it, and especially not where it is, but the underlying code is written to put it there.

hope this helps in recreating the situation in the image
nev

4 Jun 2008, 4:47 AM
#12
marypotter avatar

marypotter

New Zenner

Join Date:
May 2008
Location:
Virginia Beach, Virginia, United States
Posts:
52
Plugin Contributions:
0

Re: move add to cart button

well i got it to display on one line. i just need to figure out how to put a space in it. i don't know why it only shows some of the time though. i didn't even realize it was suppose to show at all.