Results 1 to 10 of 22

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Posts
    113
    Plugin Contributions
    0

    Default Moving Attribute above Add to cart

    Currently the attributes menu (in this case Small, Medium, Large, etc. --shirt size) is sitting to the left & below "add to cart." I would like to move it so it is above the "add to cart."
    How would I do this?

  2. #2

    Default Re: Moving Attribute above Add to cart

    I believe you would need to open includes/templates/YOUR_TEMPLATE/product_info_display.php

    find:

    Code:
    <!--bof Attributes Module -->
    <?php
      if ($pr_attr->fields['total'] > 0) {
    ?>
    <?php
    /**
     * display the product atributes
     */
      require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
    <?php
      }
    ?>
    <!--eof Attributes Module -->
    and move the whole chunk up above:
    Code:
    <!--bof Add to Cart Box -->
    If you wanted them both on the right hand side, you would need to wrap them in <div> tags.

    You could now find:

    Code:
    <!--bof Attributes Module -->
    and change to:

    Code:
    <!--bof Attributes Module --><div style="float:right"> 
    and close the <div> tag:

    Code:
    </div><!--eof Attributes Module -->
    and do the same for the add to cart:

    Code:
    <!--bof Add to Cart Box -->
    changed to:

    Code:
    <!--bof Add to Cart Box --><div style="float:right">
    and the closing <div> tag:
    Code:
    </div><!--eof Add to Cart Box-->

    If you preferred, you could move the styles to the style sheet by giving the <div> an id such as: #attributeRight{float:right} #AddToCart{float:right} or whatever you want to call it.

  3. #3
    Join Date
    Jun 2007
    Location
    Texas, USA
    Posts
    1,400
    Plugin Contributions
    1

    Default Re: Moving Attribute above Add to cart

    Quote Originally Posted by rainthebat View Post
    I believe you would need to open includes/templates/YOUR_TEMPLATE/product_info_display.php

    find:

    Code:
    <!--bof Attributes Module -->
    <?php
      if ($pr_attr->fields['total'] > 0) {
    ?>
    <?php
    /**
     * display the product atributes
     */
      require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
    <?php
      }
    ?>
    <!--eof Attributes Module -->
    and move the whole chunk up above:
    Code:
    <!--bof Add to Cart Box -->
    If you wanted them both on the right hand side, you would need to wrap them in <div> tags.

    You could now find:

    Code:
    <!--bof Attributes Module -->
    and change to:

    Code:
    <!--bof Attributes Module --><div style="float:right"> 
    and close the <div> tag:

    Code:
    </div><!--eof Attributes Module -->
    and do the same for the add to cart:

    Code:
    <!--bof Add to Cart Box -->
    changed to:

    Code:
    <!--bof Add to Cart Box --><div style="float:right">
    and the closing <div> tag:
    Code:
    </div><!--eof Add to Cart Box-->

    If you preferred, you could move the styles to the style sheet by giving the <div> an id such as: #attributeRight{float:right} #AddToCart{float:right} or whatever you want to call it.

    When I do this with my 1.3.8a cart the attributes field totally disappears.... also the add to cart disappears....

    So I tried this which also causes the attributes to disappear....

    .wrapperAttribsOptions {
    margin: 0.3em 0em;
    float:right;
    }

  4. #4
    Join Date
    May 2009
    Posts
    30
    Plugin Contributions
    0

    Default Re: Moving Attribute above Add to cart

    i think this topic should be set to sticky

  5. #5
    Join Date
    Nov 2010
    Location
    Miami, Florida
    Posts
    57
    Plugin Contributions
    0

    Default Re: Moving Attribute above Add to cart

    I totally agree. I've been looking for a post like this for two days.
    Anywho, the post and threads were VERY VERY helpful. I'm just having one problem:
    I'd like for the size and color to be on one row.
    Here's what it looks like now http://www.thousandstitches.com/shop...&products_id=5

    Please advise.

  6. #6
    Join Date
    Jan 2008
    Posts
    113
    Plugin Contributions
    0

    Default Re: Moving Attribute above Add to cart

    That worked PERFECTLY!
    Thanks so much!!!!

  7. #7

    Default Re: Moving Attribute above Add to cart

    Great, I was a little nervous it might mess things up for you. Happy to hear it worked!

  8. #8
    Join Date
    Jan 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: Moving Attribute above Add to cart

    Hi, this is my first post here, so be gentle. :)

    I've been working on my cart for upwards of 12 hours straight (and that's just today), and I'm a bit bleary-eyed and feeling frazzled. What did me in was, I moved my attribute box above my add to cart box, using float: right. The problem is, the text "Please Choose" is still hanging out on the left side of the page. The text is fine, it's the position of the text that I need to change, and I can't find where that is located.

    I'm sure it's probably something super-simple that I'm missing, and I'll feel pretty silly when someone tells me.

    BTW, this forum is fantastic. I've been able to find answers to all of my questions up til now. I was hoping I wouldn't have to post and ask for help, but...those two words have me whipped!

    TIA!

  9. #9

    Default Re: Moving Attribute above Add to cart

    Hi TIA,

    Did you do anything to the tpl_modules_attributes.php file?

    That file contains the following code:
    Code:
    <div id="productAttributes">
    <?php if ($zv_display_select_option > 0) { ?>
    <h3 id="attribsOptionsText"><?php echo TEXT_PRODUCT_OPTIONS; ?></h3>
    <?php } // show please select unless all are readonly ?>
    This line in specific is what controls the display of the text "Please Choose:"
    Code:
    <h3 id="attribsOptionsText"><?php echo TEXT_PRODUCT_OPTIONS; ?></h3>
    It might be good to check in your style sheet what is in the brackets of this id:
    #attribsOptionsText{} If it contains anything such as float:left, that would be a problem.
    If you had to, you could set this to float:right, but that may not correctly solve the problem - then again it may. Also, if this ID doesn't exist, you may want to create it, and do the float:right thing as a test.

    Sorry if this isn't very clear, I'm thinking about making rap music right now, and its difficult to concentrate on what I type!
    Last edited by rainthebat; 23 Jan 2008 at 04:09 PM. Reason: yeah

  10. #10

    Default Re: Moving Attribute above Add to cart

    The only other thing I could think of with your difficulties, is you may have forgot to close the <div> tag that you started at the beginning of the attributes code.

 

 

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. Easy way to move product attribute selection above the "Add to cart" button?
    By shrimp-gumbo-mmmhhh in forum General Questions
    Replies: 3
    Last Post: 9 Jun 2010, 07:57 PM
  3. How can I move my attribute selections *above* the add-to-cart button?
    By JannyM in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 6 Nov 2008, 02:10 PM
  4. Moving 'add to cart' button & aligning attribute drop-downs
    By rlfreshwater in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 14 Sep 2008, 12: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