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

move add to cart button to above description

Views: 1,247

Results 1 to 14 of 14
24 Jan 2012, 8:28 PM
#1
mdiwade avatar

mdiwade

New Zenner

Join Date:
Apr 2011
Location:
Montana
Posts:
13
Plugin Contributions:
0

move add to cart button to above description

Hello, I have searched but not found an answer for a question.

I am using 1.3.9h and the template CSS is the only mod from the default.

I want to change the add to cart button from the bottom of the description to just above the description. I have looked and tried a couple different config options in the admin but no change.

Is this something I will need to modify in a template and if so which file?

Thank for any help.

Wade

24 Jan 2012, 8:38 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: move add to cart button to above description

As always, a link to your site would help us help you, but you might look at tpl_product_info_display.php.

24 Jan 2012, 11:39 PM
#3
mdiwade avatar

mdiwade

New Zenner

Join Date:
Apr 2011
Location:
Montana
Posts:
13
Plugin Contributions:
0

Re: move add to cart button to above description

Thanks stevesh. My bad, I thought I had pasted it. I guess I need to proof read better before submitting.
http://www.hilinerecords.com/shop/cd-dvd/live-at-the-tractor

I created my template based on the classic template provided in the install. It did not contain the tpl_product_info_display.php file. I copied it to the folder in my template but I'm thinking the hook is not there to catch this file as it makes no difference to the generated page. The code for action=add_product is the first form on this page.

Shoppers are not seeing the dropdown to select the option so I am thinking that having it at the top will make a difference.

25 Jan 2012, 12:34 AM
#4
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: move add to cart button to above description

Copy the file
templates/template_default/templates/tpl_product_info_display.php
paste it in
templates/YOU_CUSTOM_TEMPLATE/templates/tpl_product_info_display.php

Move the code between

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

and

<!--eof Add to Cart Box -->
25 Jan 2012, 4:54 PM
#5
mdiwade avatar

mdiwade

New Zenner

Join Date:
Apr 2011
Location:
Montana
Posts:
13
Plugin Contributions:
0

Re: move add to cart button to above description

@keneso Thanks, that is what I had tried with no change. I moved it to several different places in the file.

I see in the product_info file header "* Loaded automatically by index.php?main_page=product_info.<br />" When I open the index.php file I don't see any reference to that specific file but I do see "require($template->get_template_dir('main_template_vars.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/main_template_vars.php');"

I am not new to .php manipulation but I am not a programer so I am not sure, but this looks like a hook for the templates for individual pages.

Is this template not being found or referenced?

I'm learning!

25 Jan 2012, 5:20 PM
#6
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: move add to cart button to above description

Forget about the coment at the beginning of the file, and go look for the part of code I referenced.
I am not so into the ZC code, but my understanding is that
templates/YOU_CUSTOM_TEMPLATE/templates/tpl_product_info_display.php
is loaded within the main template - the one that assmbles various chunks of code, from different places, and delivers the final page.

you can move those parts, and in case add your own css to better control it, although in almost all cases the ZC css is more than enough.

Again this is the file you need to work on
templates/YOU_CUSTOM_TEMPLATE/templates/tpl_product_info_display.php

and this is the chunk you should move up
Move the code between

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

and

<!--eof Add to Cart Box -->
25 Jan 2012, 6:11 PM
#7
mdiwade avatar

mdiwade

New Zenner

Join Date:
Apr 2011
Location:
Montana
Posts:
13
Plugin Contributions:
0

Re: move add to cart button to above description

Yep, Yep, and nope.

I have copied the file, I have moved the code, It made no difference. I moved different segments in the file (review, tell a friend) nothing I moved made a difference.

I have looked at the similar questions below as well, same answer as I have been given here. Curious how when I did a search for those exact words none of them showed up in results.

I'm wondering why what works for others will not work on mine.

25 Jan 2012, 6:16 PM
#8
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: move add to cart button to above description

I jsut used firebug to do it, and it does work, might it be that you edit the dafault file, and have an override file, and that you upload the edited file in the default folder, rather than the CUSTOM override?

25 Jan 2012, 7:17 PM
#9
mdiwade avatar

mdiwade

New Zenner

Join Date:
Apr 2011
Location:
Montana
Posts:
13
Plugin Contributions:
0

Re: move add to cart button to above description

Not a clue, I moved the file to the common folder and sideboxes just for process of elimination but no change in display.

Gonna have to wait patiently on this one I guess.

25 Jan 2012, 8:05 PM
#10
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: move add to cart button to above description

Not a clue, I moved the file to the common folder

tpl_product_info_display.php doesn't go in the common folder. It goes in includes/templates/your_template/templates.

25 Jan 2012, 11:23 PM
#11
mdiwade avatar

mdiwade

New Zenner

Join Date:
Apr 2011
Location:
Montana
Posts:
13
Plugin Contributions:
0

Re: move add to cart button to above description

RescoCCC:

tpl_product_info_display.php doesn't go in the common folder. It goes in includes/templates/your_template/templates.

I understand this, As I said earlier I did put it there to begin with and then tried it in the other folders trying process of elimination. I have put it and modified it exactly as the given instructions suggest several times. I even went in and got an untouched copy from a different install with no success.

I am hoping it is something simple that is causing a conflict but I sure can't find it. I don't want to go hacking a lot of core files to try and find it either.

25 Jan 2012, 11:58 PM
#12
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: move add to cart button to above description

Ok I think I got it ... well I hope so.

We ... actually you ;) are editing the WRONG file ... ok, ok, I suggested it ...

Try with this file
templates/YOUR_TEMPLATE/templates/tpl_product_music_info_display.php

I assumed wrongly, and apologize for it that it was set as a general product, thus suggesting the tpl_product_info_display.php

26 Jan 2012, 12:36 AM
#13
mdiwade avatar

mdiwade

New Zenner

Join Date:
Apr 2011
Location:
Montana
Posts:
13
Plugin Contributions:
0

Re: move add to cart button to above description

I said probably something simple!:clap:

I'm glad that we meaning you were able to help me figure it out. I quickly perused the folder but completely missed the file with music in the name.

Thanks a bunch!

26 Jan 2012, 10:07 AM
#14
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: move add to cart button to above description

Welcome, glad we made it. ;)

If I may, I'd suggest you move the code above productMainImage as it would better align graphically, although it's a subjective matter; and also copy it in its original place as well, so if someone gets to the end of the page has it visible as well.