Forums / Templates, Stylesheets, Page Layout / Move "Add to Cart" button to top of page.

Move "Add to Cart" button to top of page.

Locked

Started by jaztechnologies on 2 May 2007, 6:16 AM · Views: 11,053

Results 1 to 20 of 29
This thread is locked. New replies are disabled.
2 May 2007, 6:16 AM
#1
jaztechnologies avatar

jaztechnologies

New Zenner

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

Move "Add to Cart" button to top of page.

How would I move the "Add to Cart" button to the top of the page or even have a second one listed on top. The problem I have is that my dicriotion is so long someone has to go to the bottom to buy.

You can see it here: http://www.jaztechnologies.com/index.php?main_page=product_info&cPath=36_41_101&products_id=256

I'm using a mildy modified version of Gloss Blue.

Thank you for your help,

Chuck

2 May 2007, 7:24 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Move "Add to Cart" button to top of page.

In /includes/templates/your_template/templates/tpl_product_info_display.php, move the block of code beginning with <!--bof Add to Cart Box --> to wherever in the sequence you want it to display. In some cases it will be necessary to tinker with <br class="clearBoth"> tags to get it working just right.

21 May 2007, 10:32 AM
#3
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,571
Plugin Contributions:
60

Re: Move "Add to Cart" button to top of page.

Moving the add to cart button is not a problem. I've placed two of them on each product display.

However, I'd like to line up the box so that it is on the same line as the products detail list.

For an example of what I am talking about, go to this product link at my site: http://www.numinix.com/store/index.php?main_page=product_info&cPath=91&products_id=254

If the button was located vertically aligned with the detail list, then my products description would also be moved up in the page.

21 May 2007, 7:01 PM
#4
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,571
Plugin Contributions:
60

Re: Move "Add to Cart" button to top of page.

Update:

solved my issue only moments after posting. Just delete the <br> of the above item :lookaroun

10 Jul 2007, 8:03 PM
#5
telston01 avatar

telston01

New Zenner

Join Date:
Jun 2006
Posts:
6
Plugin Contributions:
0

Re: Move "Add to Cart" button to top of page.

I'm not having success moving the Add to Cart anywhere unless there aren't any attributes on the page.

I have tried deleting the tpl_product_info_display.php from both the template_default/templates directory and also my CUSTOM/templates directory.

The page still shows up.

The Add to Cart button doesn't move. The tpl_product_info_display.php doesn't disappear. Why not? Where the heck is this page? How can I fix this?

I have to assume that there is another page involved in this.

Thanks,
Tim

10 Jul 2007, 8:27 PM
#6
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,571
Plugin Contributions:
60

Re: Move "Add to Cart" button to top of page.

telston01:

I'm not having success moving the Add to Cart anywhere unless there aren't any attributes on the page.

I have tried deleting the tpl_product_info_display.php from both the template_default/templates directory and also my CUSTOM/templates directory.

The page still shows up.

The Add to Cart button doesn't move. The tpl_product_info_display.php doesn't disappear. Why not? Where the heck is this page? How can I fix this?

I have to assume that there is another page involved in this.

Thanks,
Tim

See the post by gjh42 as this user has clearly stated where the file is and how to move the add-to-cart button or any item in the Product Listing for that matter.

10 Jul 2007, 11:01 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: Move "Add to Cart" button to top of page.

Maybe you didn't understand that
"move the block of code beginning with <!--bof Add to Cart Box --> "
meant the block from there all the way to the <!--eof Add to Cart Box --> comment. Move that whole block to where you want it (but not inside another block).

11 Jul 2007, 6:52 PM
#8
telston01 avatar

telston01

New Zenner

Join Date:
Jun 2006
Posts:
6
Plugin Contributions:
0

Re: Move "Add to Cart" button to top of page.

Hi,
Yes I do understand that and I have been clear and careful on how to move the block. On products with no attributes the Add to Cart Button moves to where ever I want to move it.

When I delete the tpl_product_info_display.php page it doesn't show up on product pages that have no attributes.( I get the message that the page is missing)

What I don't understand is when I delete the the tpl_product_info_display.php (both template_default and my CUSTOM directory the content that is supposed to be on the tpl_product_info_display.php page still shows up on product pages that have attributes. Where else could info from what I assume is supposed to be the tpl_product_info_display.php be coming from?

This would explain to me why when I edit the page it isn't changing the location of Add to Cart button (except on pages with products with no attributes) and why when I delete the tpl_product_info_display.php it is still showing up on pages with product attributes.

I know this should be easy according to what I've read but this is causing some problems for me and isn't acting as expected.

Thanks

11 Jul 2007, 7:07 PM
#9
telston01 avatar

telston01

New Zenner

Join Date:
Jun 2006
Posts:
6
Plugin Contributions:
0

Re: Move "Add to Cart" button to top of page.

OK,
Let me rephrase that.

On pages where I have checked off a single attribute (an additional download attribute will be enabled soon) the Add to Cart button appears below the attribute as I would expect.
http://rememberthewater.com/zencart/index.php?main_page=product_info&cPath=3&products_id=180

On pages with more than one attribute where one needs to be checked off the Add to Cart button appears above the attributes.

http://rememberthewater.com/zencart/index.php?main_page=product_music_info&cPath=62&products_id=182

Does this help explain the issue?

11 Jul 2007, 7:12 PM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Move "Add to Cart" button to top of page.

You are using both product_info and product_music ... any particular reason you are using the 2 different product types?

You are also using checkboxes vs radiobuttons ... Radiobuttons you can force a selection and checkboxes you cannot ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Jul 2007, 7:21 PM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: Move "Add to Cart" button to top of page.

If you delete your custom tpl_product_info_display.php, the one in /template_default/templates/ will automatically be applied. You won't get any error message because it doesn't know there should be a custom file unless one is there.

You should never touch files in /template_default/ except to copy them to your custom directory. If you delete the /template_default/ copy while leaving the copy in your custom directory, that may cause a malfunction - there needs to be a file in /template_default in order for the custom one to be selected.

Zen Cart does not use different tpl_product_info_display.php files for products with attributes - there is only one for the active template and the backup in /template_default/.

You didn't say that you were using different product types on the products that were behaving differently. This may well be relevant, though as I haven't used music products I can't offer advice on them.

11 Jul 2007, 11:58 PM
#12
telston01 avatar

telston01

New Zenner

Join Date:
Jun 2006
Posts:
6
Plugin Contributions:
0

Re: Move "Add to Cart" button to top of page.

Linda,
Well that certainly helped!

Was not aware of the two product types and changed music product types to general product types in the database and also changed to radio buttons.

I just worked from the basic product layout that zencart originally sets up with.

Thank you,
Tim

13 Jul 2007, 1:53 PM
#13
james739 avatar

james739

Zen Follower

Join Date:
Jun 2007
Posts:
210
Plugin Contributions:
0

Re: Move "Add to Cart" button to top of page.

Hi, how do I incorporate the add to cart and the quantity option when viewing products list.

Here is an example of what I want
http://www.numinix.com/index.php?main_page=index&cPath=117_126
WIth the add to cart and quantity option

13 Jul 2007, 2:58 PM
#14
gjh42 avatar

gjh42

Black Belt

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

Re: Move "Add to Cart" button to top of page.

Configuration > Product Listing > Display Product Add to Cart Button (0=off; 1=on; 2=on with Qty Box per Product)

(You probably need Display Multiple Products Qty Box Status and Set Button Location set to 0.)

14 Jul 2007, 4:51 AM
#15
james739 avatar

james739

Zen Follower

Join Date:
Jun 2007
Posts:
210
Plugin Contributions:
0

Re: Move "Add to Cart" button to top of page.

Hi, thanks for the prompt reply. I tried what you suggested, but it did not work. Still not getting the add to card option

http://fashionntoys.com/index.php?main_page=index&cPath=2_8

14 Jul 2007, 6:04 AM
#16
gjh42 avatar

gjh42

Black Belt

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

Re: Move "Add to Cart" button to top of page.

Your products (shoes) all have attributes, so they cannot have add to cart buttons on the listing page. The customer will always need to make a size choice before adding to cart, and this can only be done on the product info page.

15 Jul 2007, 4:59 AM
#17
james739 avatar

james739

Zen Follower

Join Date:
Jun 2007
Posts:
210
Plugin Contributions:
0

Re: Move "Add to Cart" button to top of page.

I forgot about that. Thanks again!

15 Jul 2007, 5:00 AM
#18
james739 avatar

james739

Zen Follower

Join Date:
Jun 2007
Posts:
210
Plugin Contributions:
0

Re: Move "Add to Cart" button to top of page.

Do u know anything about zen lightbox. Mine hangs for additional images!

15 Jul 2007, 3:22 PM
#20
jmacdoug avatar

jmacdoug

New Zenner

Join Date:
Jun 2007
Location:
NJ
Posts:
84
Plugin Contributions:
0

Re: Move "Add to Cart" button to top of page.

Would anyone have any ide why I cannot find this file in my site??

tpl_product_info_display.php

/includes/templates/your_template/templates/tpl_product_info_display.php

The file DOES NOT exist!! Am I crazy or blind??

Jeff