Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    May 2009
    Location
    Junction City, Oregon
    Posts
    315
    Plugin Contributions
    0

    Default Moving Add to Cart selections to top of product page?

    I'm wondering how to move my Add to Cart options from the bottom of my product page template up to the top. If you'd like to check the page out, you can see it at http://tinyurl.com/nosvkr . (I shortened it for you.) Ideally, I'd like to move the selections & attributes from the bottom up to right under the Release Date.

    Thanks for any help!

    -KismetDesign

  2. #2
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Moving Add to Cart selections to top of product page?

    It is a relatively simple edit of tpl_product_info_display.php. This is a really well commented file, so I am sure that you'll find the right blocks of code to move - and where to move them to.

    Any problems, just reply here and we'll have a look.

    On the default version of this file it is lines 89-143 that get moved. Slot them back in around line 75. But I suspect yours is not a default version.
    Last edited by niccol; 22 Jul 2009 at 05:28 PM.

  3. #3
    Join Date
    May 2009
    Location
    Junction City, Oregon
    Posts
    315
    Plugin Contributions
    0

    Default Re: Moving Add to Cart selections to top of product page?

    Well, I've done a ton of design & extra development work on this template that I started with, because of my client's specifications. I'm hoping by the time we launch I'll have a whole lot more experience with Zen Cart and be able to give back in the forums here.

    You said to edit the tpl_product_info_display.php

    I've got four of those, 2 located in my includes folder, one in my main cart folder, and one in my edit_cart folder. I'm assuming I need to change one of the files in the includes folder?

    Thanks for your help! I really appreciate it.

  4. #4
    Join Date
    May 2009
    Location
    Junction City, Oregon
    Posts
    315
    Plugin Contributions
    0

    Default Re: Moving Add to Cart selections to top of product page?

    Okay, I found the right file.

    I moved the two modules that I needed, up to the top of the page, but.... take a look at how it is now ??? http://tinyurl.com/nosvkr

    It moved the 'Please Choose' up to the right place, but the rest of it has moved down the page. I wanted everything right underneath.

    Hoping this can be fixed

  5. #5
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Moving Add to Cart selections to top of product page?

    Oh, yes, oops - should have thought about that.

    It has to do with the way the elements are positioned using floats. I am not sure how much you know / want to know about positioning so if you want the long explanation just ask.

    In the source code of your page you will see:

    Code:
    <!--bof Attributes Module -->
    <div id="productAttributes">
    <h3 id="attribsOptionsText">Please Choose: </h3>
    
    <div class="wrapperAttribsOptions">
    <h4 class="optionName back">eBook Format</h4>
    <div class="back">
    <input type="checkbox" name="id[1][45]" value="45" id="attrib-1-45" /><label class="attribsCheckbox" for="attrib-1-45">Adobe Digital Editions</label><br />
    <input type="checkbox" name="id[1][16]" value="16" id="attrib-1-16" /><label class="attribsCheckbox" for="attrib-1-16">Microsoft Reader</label><br />
    <input type="checkbox" name="id[1][25]" value="25" id="attrib-1-25" /><label class="attribsCheckbox" for="attrib-1-25">Mobipocket Reader</label><br />
    
    </div>
    <br class="clearBoth" />
    </div>
    
    <br class="clearBoth" />
    
    </div><!--eof Attributes Module -->
    
    <!--bof Add to Cart Box -->
    
    <div id="cartAdd">
    It is the <br class="clearBoth" /> that are causing the text to be pusshed down below the image ( which is floated left on the page).

    We need to edit them.

    In tpl_modules_attributes.php find:

    Code:
    <div class="wrapperAttribsOptions">
    <h4 class="optionName back"><?php echo $options_name[$i]; ?></h4>
    <div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>
    <br class="clearBoth" />
    
    </div>
    <?php if ($options_comment[$i] != '' and $options_comment_position[$i] == '1') { ?>
        <div class="ProductInfoComments"><?php echo $options_comment[$i]; ?></div>
    <?php } ?>
    
    <?php
    if ($options_attributes_image[$i] != '') {
    ?>
    <?php echo $options_attributes_image[$i]; ?>
    <?php
    }
    
    ?>
    <br class="clearBoth" />
    <?php
        }
    ?>
    You need to change the two <br class="clearBoth" /> (red) to <br/>.

    Have a look and see what that does.

    It is probably needed / a good idea to change the two blue 'back' to 'attrib-back' this will disable them for the time being but will allow us the option of re-instating them later.

    You may want to test this on a page with multiple attributes if you have any The problem you might have is that the text wraps around the image in a weird way. If this is the case then it probably makes sense to change the image from the left of the page to the right of the page. This isn't hard to do. Let me know!

    Hope this helps

  6. #6
    Join Date
    May 2009
    Location
    Junction City, Oregon
    Posts
    315
    Plugin Contributions
    0

    Default Re: Moving Add to Cart selections to top of product page?

    I'm going to attach a screenshot of what my code looks like on the product listing. It doesn't look like what you wrote above, but the second item of code you posted does....

    So I changed the second one anyway, hoping it would help... uploaded it... no change.

    Should I try changing the code in the first file to what you wrote and see what happens? I am backing up my original files, FYI.

    KismetDesign

  7. #7
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Moving Add to Cart selections to top of product page?

    OK the first code was what is being output to the browswer ( got by view source in firefox) It is there to show you which elements in the page we are trying to get rid of. (It is actually taken from your page so I know its the right one)

    If you are having layout problems always look at the source code of the page. In firefox it is view>>>page source. In IE it is something similar but I can't remember exactly what.

    The second block of code was taken from a default version of tpl_module_attributes.php. I'd be surprised if your version of this file was majorly different.

    Make the changes to tpl_module_attributes.php that I have suggested and let me know and I will have a look at the page.

  8. #8
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Moving Add to Cart selections to top of product page?

    And do you know that on this page you say that Walter Cronkite is a accomplished chef, pastry chef and baker.

    Which he may have been. It would be nice to think so. But I think you mean Russel.

  9. #9
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Moving Add to Cart selections to top of product page?

    And yes, you can put the attributes and buy now under the image but you are going to have a similar issue with the floats and the clear:both s.

  10. #10
    Join Date
    May 2009
    Location
    Junction City, Oregon
    Posts
    315
    Plugin Contributions
    0

    Default Re: Moving Add to Cart selections to top of product page?

    Obviously I had made that change before my morning coffee had settled in. LOL. It's fixed now.

    I did make the changed you suggested to the tpl_modules_attributes, and had already uploaded those changes when I took that screenshot I sent over to you.

    Sounds like it might be a style sheet issue? I do know about the view page source code, and I also use firebug to target code. Sometimes it works out well, sometimes not so well.

    Ah... I'm really hoping there is still a way to fix this so that the attributes are right up underneath of the 'Please Choose' text.

    If you can't help me though, I'll completely understand. You've already gone well enough out of your way to get me this far.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v154 Need Help Moving Attribute Selections Above Add To Cart
    By Zappa Aviaries in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 9 Feb 2015, 06:17 AM
  2. Moving Add to Cart on the product page
    By scottwoodhead in forum Basic Configuration
    Replies: 2
    Last Post: 21 Dec 2009, 12:30 AM
  3. Moving Add To Cart to top part of page?
    By bogie in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 Dec 2009, 12:37 AM
  4. Moving Add to Cart button to top right
    By Winks in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Sep 2009, 06:23 PM
  5. Product Info page - moving the Add To Cart button to very top.
    By marknotgeorge in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 15 Oct 2008, 09:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR