Forums / Templates, Stylesheets, Page Layout / how do i change the position of the add to cart button ?

how do i change the position of the add to cart button ?

Started by what44 on 30 Oct 2007, 2:25 PM · Views: 9,227

Results 21 to 40 of 40
7 Nov 2007, 2:50 PM
#21
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

how do i change the position of the add to cart button ?

You have in your stylesheet```
/Shopping Cart Display/
#cartAdd {
float: left;
text-align: left;
margin: 1em;
border: 0px solid #000000;
padding: 1em;
}

margin: 1em;
margin-left:16px; or whatever (1em = 10px in Zen Cart default).

If you want to adjust other margins as well, use the full version:
margin: 10px 15px 20px 5px;
means 10px top, 15px right, 20px bottom, 5px left margins.
21 Jan 2008, 9:10 AM
#22
xman888 avatar

xman888

Zen Follower

Join Date:
Jan 2007
Posts:
226
Plugin Contributions:
0

Re: how do i change the position of the add to cart button ?

Hello gjh42,

With respect to the line of code: margin: 10px 15px 20px 5px;

what do you need to modify if you simply want to move the "add to cart" icon up (higher) on the page?

Kind regards,
Anthony

21 Jan 2008, 9:13 AM
#23
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: how do i change the position of the add to cart button ?

Anthony,

How high and a link to your site

Zen-Venom Get Bitten

21 Jan 2008, 9:18 AM
#24
xman888 avatar

xman888

Zen Follower

Join Date:
Jan 2007
Posts:
226
Plugin Contributions:
0

Re: how do i change the position of the add to cart button ?

Hello Kobra,

Approximately 1 cm up from where it is now.

Kind regards,
Anthony

21 Jan 2008, 9:50 AM
#25
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: how do i change the position of the add to cart button ?

A link to your site???

Zen-Venom Get Bitten

21 Jan 2008, 10:52 AM
#26
xman888 avatar

xman888

Zen Follower

Join Date:
Jan 2007
Posts:
226
Plugin Contributions:
0

Re: how do i change the position of the add to cart button ?

Hello,

Oops, sorry, I forgot the link.

Here it is:

http://www.giftedallsorts.com.au/shop/

Kind regards,
Anthony

21 Jan 2008, 4:29 PM
#27
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: how do i change the position of the add to cart button ?

You may want the add box only 1 cm higher on the screen, but it won't be able to move higher while it is using the currrent "floated" positioning.

Your best bet is to move the <!--bof Add to Cart Box --> code block to just after <!--eof Main Product Image-->, or maybe after <!--eof Product Name --> depending on exactly what you want.

22 Jan 2008, 6:38 AM
#28
xman888 avatar

xman888

Zen Follower

Join Date:
Jan 2007
Posts:
226
Plugin Contributions:
0

Re: how do i change the position of the add to cart button ?

Hello gjh42,

Thanks for the reply

All seems good now.

Cheers,

Anthony

22 Jan 2008, 4:46 PM
#29
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: how do i change the position of the add to cart button ?

xman888,

You have stylesheet.css and stylesheet2.css....

Both of these are being used for css on your site...

If this is your intention OK...if not - all .css files are used in order...

Delete or Rename any you do not want used with any extention other than .css

Zen-Venom Get Bitten

25 Jan 2008, 2:43 AM
#30
xman888 avatar

xman888

Zen Follower

Join Date:
Jan 2007
Posts:
226
Plugin Contributions:
0

Re: how do i change the position of the add to cart button ?

Hi Kobra,

Thanks for that.

I have deleted stylesheet as I am using stylesheet2.

1 small thing.

I have moved the "tell a friend tag" to underneath the "add to cart" tag, as I want the "tell a friend" to be positioned under "add to cart" however it appears to the left of "add to cart".

Here is my link: http://www.giftedallsorts.com.au/shop/index.php?main_page=product_info&cPath=1&products_id=6

Is there some fine tuning that I need to do in the css to get this done?

Kind regards,
Anthony

25 Jan 2008, 7:21 PM
#31
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: how do i change the position of the add to cart button ?

In your template tpl_product_info_display.php or a copy to be placed there find this and add the red entry to see if this assists:

<!--bof Add to Cart Box -->
    <div id="cartAdd">

    Add to Cart: <input type="text" name="cart_quantity" value="1" maxlength="6" size="4" /><br /><br /><input type="hidden" name="products_id" value="6" /><input type="image" src="includes/templates/xman/buttons/english/button_in_cart.gif" alt="Add to Cart" title=" Add to Cart " />
          </div>
<br class="clearBoth" />

<!--eof Add to Cart Box-->

<!--bof Tell a Friend button -->

<div id="productTellFriendLink" class="buttonRow forward"><a href="http://www.giftedallsorts.com.au/shop/index.php?main_page=tell_a_friend&products_id=6&zenid=ec4c40a8ff8d387884f83c3822907ed4"><img src="includes/templates/xman/buttons/english/button_TellAFriend.gif" alt="Tell a Friend" title=" Tell a Friend " width="90" height="36" /></a></div>

<!--eof Tell a Friend button -->

Zen-Venom Get Bitten

25 Jan 2008, 11:21 PM
#32
xman888 avatar

xman888

Zen Follower

Join Date:
Jan 2007
Posts:
226
Plugin Contributions:
0

Re: how do i change the position of the add to cart button ?

Hi Kobra,

Cheers for that - much appreciated.

Now that I have the "tell a friend" under the "add to cart", is there a way to move the "tell a friend" to the left a little, so that it is centered under the "add to cart" icon?

A link is here:

http://www.giftedallsorts.com.au/shop/index.php?main_page=product_info&cPath=1&products_id=2

While I have you here, at that same link, do you know of a way to move the "larger images" text from the left of the images to underneath the images?

One more question actually - sorry about all this. Is there a way to have the images to the left of the "product description"? Since I have added the "List of contents" to the product description, it has pushed the images down too far.

Thanks for all your help so far.

Kind regards,
Anthony

26 Jan 2008, 10:07 AM
#33
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: how do i change the position of the add to cart button ?

Image position - You will have to look at what you did with #productImagesWrapper as this was added by you and not a default

tell a friend: add:

#productTellFriendLink {
        margin-right: 2.7em;
        }

Zen-Venom Get Bitten

27 Jan 2008, 1:28 AM
#34
xman888 avatar

xman888

Zen Follower

Join Date:
Jan 2007
Posts:
226
Plugin Contributions:
0

Re: how do i change the position of the add to cart button ?

Hi Kobra,

Thanks for that - worked a treat.

Kind regards,
Anthony

2 Oct 2010, 5:19 AM
#35
zc_fan avatar

zc_fan

New Zenner

Join Date:
Sep 2010
Location:
SF Bay Area
Posts:
54
Plugin Contributions:
0

Re: how do i change the position of the add to cart button ?

Why is it not recommended to not modify the base copy. It seems to be easier in case I would want to change templates.

Thanks.

2 Oct 2010, 12:09 PM
#36
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: how do i change the position of the add to cart button ?

For one thing, any time you upgrade to a new version, the /template_default/ copy will be erased and replaced with the new one, so you will automatically lose all your work.
Also, having a copy of the original code is useful as a reference, in case your custom template changes don't work right - you can go back and start over.

If you want a customization to apply to a new template, just copy the relevant file into the new template folder.

9 Oct 2010, 6:22 AM
#37
zc_fan avatar

zc_fan

New Zenner

Join Date:
Sep 2010
Location:
SF Bay Area
Posts:
54
Plugin Contributions:
0

Re: how do i change the position of the add to cart button ?

Hi gjh2 but what if you want to change the template for a new look, just different colors and buttons, of your website. You will have to copy all the files from one template to another.

Thanks.

12 Oct 2010, 4:32 PM
#38
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: how do i change the position of the add to cart button ?

If you want to take the risk of losing some or all of your customization when you upgrade, that is up to you. We can tell you what is recommended and what is safe.

It is pretty straightforward to copy all /custom1/ folders and their contents to /custom2/ folders.

11 Feb 2011, 10:25 AM
#39
javen avatar

javen

New Zenner

Join Date:
Jan 2011
Posts:
6
Plugin Contributions:
0

Re: how do i change the position of the add to cart button ?

Hi, I have tried your method of cutting and paste the block of bof shopping cart to under the eof of product name.
But the website wouldnt show anything. Just a blank page. Thus I am not allowed to chage the position of the add to cart.
Would appreciate your help. Thanks.

11 Feb 2011, 4:32 PM
#40
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: how do i change the position of the add to cart button ?

You have obviously cut/moved too much or too little, or some other error. It works when you do it correctly - there's no such thing as "you're not allowed".
Post the content of your tpl_product_info_display.php (in ```
[php] and [/php]