Results 1 to 10 of 22

Hybrid View

  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

 

 

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

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